From 43fd89a550b0cb628bd726ecbb1e59135aca4ae8 Mon Sep 17 00:00:00 2001 From: ggow Date: Sun, 21 Apr 2019 09:13:04 +0100 Subject: [PATCH] Remove unused defconfigs and mt8127 machine types --- arch/arm/configs/acs5k_defconfig | 86 - arch/arm/configs/acs5k_tiny_defconfig | 80 - arch/arm/configs/ag5evm_defconfig | 83 - arch/arm/configs/am200epdkit_defconfig | 108 - arch/arm/configs/ap4evb_defconfig | 56 - arch/arm/configs/ape6evm_defconfig | 95 - arch/arm/configs/armadillo800eva_defconfig | 153 - arch/arm/configs/assabet_defconfig | 60 - arch/arm/configs/at91_dt_defconfig | 198 - arch/arm/configs/at91rm9200_defconfig | 323 -- arch/arm/configs/at91sam9260_defconfig | 91 - arch/arm/configs/at91sam9261_defconfig | 158 - arch/arm/configs/at91sam9263_defconfig | 166 - arch/arm/configs/at91sam9g20_defconfig | 127 - arch/arm/configs/at91sam9g45_defconfig | 210 - arch/arm/configs/at91sam9rl_defconfig | 79 - arch/arm/configs/at91x40_defconfig | 48 - arch/arm/configs/badge4_defconfig | 122 - arch/arm/configs/bcm2835_defconfig | 117 - arch/arm/configs/bcm_defconfig | 114 - arch/arm/configs/bockw_defconfig | 94 - arch/arm/configs/bonito_defconfig | 72 - arch/arm/configs/cerfcube_defconfig | 75 - arch/arm/configs/clps711x_defconfig | 90 - arch/arm/configs/cm_x2xx_defconfig | 189 - arch/arm/configs/cm_x300_defconfig | 178 - arch/arm/configs/cns3420vb_defconfig | 75 - arch/arm/configs/colibri_pxa270_defconfig | 180 - arch/arm/configs/colibri_pxa300_defconfig | 73 - arch/arm/configs/collie_defconfig | 94 - arch/arm/configs/corgi_defconfig | 273 -- arch/arm/configs/da8xx_omapl_defconfig | 137 - arch/arm/configs/davinci_all_defconfig | 198 - arch/arm/configs/dove_defconfig | 141 - arch/arm/configs/ebsa110_defconfig | 75 - arch/arm/configs/em_x270_defconfig | 194 - arch/arm/configs/ep93xx_defconfig | 123 - arch/arm/configs/eseries_pxa_defconfig | 118 - arch/arm/configs/exynos4_defconfig | 68 - arch/arm/configs/exynos_defconfig | 130 - arch/arm/configs/ezx_defconfig | 420 -- arch/arm/configs/footbridge_defconfig | 127 - arch/arm/configs/h3600_defconfig | 79 - arch/arm/configs/h5000_defconfig | 82 - arch/arm/configs/hackkit_defconfig | 49 - arch/arm/configs/imote2_defconfig | 392 -- arch/arm/configs/imx_v4_v5_defconfig | 200 - arch/arm/configs/imx_v6_v7_defconfig | 261 -- arch/arm/configs/integrator_defconfig | 90 - arch/arm/configs/iop13xx_defconfig | 124 - arch/arm/configs/iop32x_defconfig | 135 - arch/arm/configs/iop33x_defconfig | 91 - arch/arm/configs/ixp4xx_defconfig | 205 - arch/arm/configs/jornada720_defconfig | 112 - arch/arm/configs/kirkwood_defconfig | 200 - arch/arm/configs/kota2_defconfig | 121 - arch/arm/configs/kr076_debug_defconfig | 3238 ------------- arch/arm/configs/kr076_defconfig | 3225 ------------- arch/arm/configs/kr076_nand_debug_defconfig | 3255 ------------- arch/arm/configs/kr076_nand_defconfig | 3242 ------------- arch/arm/configs/ks8695_defconfig | 75 - arch/arm/configs/kzm9d_defconfig | 88 - arch/arm/configs/kzm9g_defconfig | 149 - arch/arm/configs/lart_defconfig | 75 - arch/arm/configs/lpc32xx_defconfig | 208 - arch/arm/configs/lpd270_defconfig | 65 - arch/arm/configs/lubbock_defconfig | 56 - arch/arm/configs/mackerel_defconfig | 156 - arch/arm/configs/magician_defconfig | 182 - arch/arm/configs/mainstone_defconfig | 55 - arch/arm/configs/marzen_defconfig | 113 - arch/arm/configs/mini2440_defconfig | 385 -- arch/arm/configs/mmp2_defconfig | 98 - arch/arm/configs/msm_defconfig | 137 - arch/arm/configs/multi_v7_defconfig | 87 - arch/arm/configs/mv78xx0_defconfig | 139 - arch/arm/configs/mvebu_defconfig | 100 - arch/arm/configs/mxs_defconfig | 190 - arch/arm/configs/neponset_defconfig | 90 - arch/arm/configs/netwinder_defconfig | 87 - arch/arm/configs/netx_defconfig | 86 - arch/arm/configs/nhk8815_defconfig | 128 - arch/arm/configs/nuc910_defconfig | 60 - arch/arm/configs/nuc950_defconfig | 76 - arch/arm/configs/nuc960_defconfig | 66 - arch/arm/configs/omap1_defconfig | 278 -- arch/arm/configs/omap2plus_defconfig | 286 -- arch/arm/configs/orion5x_defconfig | 164 - arch/arm/configs/palmz72_defconfig | 85 - arch/arm/configs/pcm027_defconfig | 102 - arch/arm/configs/pixi3_10_debug_defconfig | 3228 ------------- arch/arm/configs/pixi3_10_defconfig | 3213 ------------- arch/arm/configs/pleb_defconfig | 57 - arch/arm/configs/prima2_defconfig | 70 - arch/arm/configs/pxa168_defconfig | 70 - arch/arm/configs/pxa255-idp_defconfig | 59 - arch/arm/configs/pxa3xx_defconfig | 133 - arch/arm/configs/pxa910_defconfig | 80 - arch/arm/configs/raumfeld_defconfig | 208 - arch/arm/configs/realview-smp_defconfig | 101 - arch/arm/configs/realview_defconfig | 100 - arch/arm/configs/rpc_defconfig | 133 - arch/arm/configs/s3c2410_defconfig | 468 -- arch/arm/configs/s3c6400_defconfig | 96 - arch/arm/configs/s5p64x0_defconfig | 68 - arch/arm/configs/s5pc100_defconfig | 49 - arch/arm/configs/s5pv210_defconfig | 73 - arch/arm/configs/sama5_defconfig | 181 - arch/arm/configs/shannon_defconfig | 48 - arch/arm/configs/shark_defconfig | 80 - arch/arm/configs/simpad_defconfig | 111 - arch/arm/configs/socfpga_defconfig | 84 - arch/arm/configs/spear13xx_defconfig | 95 - arch/arm/configs/spear3xx_defconfig | 89 - arch/arm/configs/spear6xx_defconfig | 78 - arch/arm/configs/spitz_defconfig | 274 -- .../arm/configs/tcl8127_c_mlc_debug_defconfig | 3238 ------------- arch/arm/configs/tcl8127_c_mlc_defconfig | 3223 ------------- .../configs/tcl8127_tb_c_l_debug_defconfig | 3228 ------------- arch/arm/configs/tcl8127_tb_c_l_defconfig | 3213 ------------- arch/arm/configs/tct_hammer_defconfig | 70 - arch/arm/configs/tegra_defconfig | 255 - .../arm/configs/tpw8127_c_mlc_debug_defconfig | 3238 ------------- arch/arm/configs/tpw8127_c_mlc_defconfig | 3223 ------------- .../configs/tpw8127_tb_c_l_debug_defconfig | 3228 ------------- arch/arm/configs/tpw8127_tb_c_l_defconfig | 3213 ------------- arch/arm/configs/trizeps4_defconfig | 226 - arch/arm/configs/ttab_debug_defconfig | 3231 ------------- arch/arm/configs/ttab_defconfig | 3217 ------------- arch/arm/configs/u300_defconfig | 73 - arch/arm/configs/u8500_defconfig | 124 - arch/arm/configs/versatile_defconfig | 85 - arch/arm/configs/vexpress_defconfig | 140 - arch/arm/configs/viper_defconfig | 174 - arch/arm/configs/xcep_defconfig | 99 - arch/arm/configs/zeus_defconfig | 189 - arch/arm/mach-mt8127/kr076/Makefile | 44 - .../mach-mt8127/kr076/accdet/accdet_custom.h | 14 - .../kr076/accdet/accdet_custom_def.h | 15 - .../mach-mt8127/kr076/accelerometer/Makefile | 3 - .../mach-mt8127/kr076/accelerometer/accel.c | 795 ---- .../mach-mt8127/kr076/accelerometer/accel.h | 123 - .../kr076/accelerometer/cust_acc.c | 18 - .../kr076/accelerometer/inc/cust_acc.h | 22 - .../mach-mt8127/kr076/accelerometer/mpu6050.c | 2249 --------- .../mach-mt8127/kr076/accelerometer/mpu6050.h | 60 - arch/arm/mach-mt8127/kr076/alsps/APDS9930.c | 1990 -------- arch/arm/mach-mt8127/kr076/alsps/APDS9930.h | 60 - arch/arm/mach-mt8127/kr076/alsps/Makefile | 4 - arch/arm/mach-mt8127/kr076/alsps/alsps.c | 1094 ----- arch/arm/mach-mt8127/kr076/alsps/alsps.h | 153 - arch/arm/mach-mt8127/kr076/alsps/cust_alsps.c | 27 - .../mach-mt8127/kr076/alsps/inc/cust_alsps.h | 42 - arch/arm/mach-mt8127/kr076/cam_cal/Makefile | 3 - .../mach-mt8127/kr076/cam_cal/dummy_cam_cal.c | 647 --- .../mach-mt8127/kr076/cam_cal/dummy_cam_cal.h | 30 - .../mach-mt8127/kr076/cam_cal/inc/cam_cal.h | 27 - .../kr076/cam_cal/inc/cam_cal_define.h | 10 - .../mach-mt8127/kr076/camera/camera/Makefile | 4 - .../mach-mt8127/kr076/camera/camera/dummyds.c | 0 .../kr076/camera/camera/kd_camera_hw.c | 622 --- .../kr076/camera/camera/kd_camera_hw.h | 78 - .../kr076/common/partition_define.h | 135 - .../kr076/common/partition_define_private.h | 38 - arch/arm/mach-mt8127/kr076/common/pmt.h | 91 - arch/arm/mach-mt8127/kr076/core/Makefile | 4 - .../arm/mach-mt8127/kr076/core/board-custom.h | 119 - arch/arm/mach-mt8127/kr076/core/board.c | 845 ---- .../mach-mt8127/kr076/core/logger_custom.h | 13 - arch/arm/mach-mt8127/kr076/dct/dct/Makefile | 4 - .../arm/mach-mt8127/kr076/dct/dct/codegen.dws | Bin 23252 -> 0 bytes arch/arm/mach-mt8127/kr076/eeprom/Makefile | 4 - .../mach-mt8127/kr076/eeprom/dummy_eeprom.c | 643 --- .../mach-mt8127/kr076/eeprom/dummy_eeprom.h | 30 - .../arm/mach-mt8127/kr076/eeprom/inc/eeprom.h | 27 - .../kr076/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- arch/arm/mach-mt8127/kr076/gyroscope/Makefile | 4 - .../mach-mt8127/kr076/gyroscope/cust_gyro.c | 31 - .../mach-mt8127/kr076/gyroscope/gyroscope.c | 799 ---- .../mach-mt8127/kr076/gyroscope/gyroscope.h | 116 - .../kr076/gyroscope/inc/cust_gyro.h | 23 - .../arm/mach-mt8127/kr076/gyroscope/mpu6050.c | 1869 -------- .../arm/mach-mt8127/kr076/gyroscope/mpu6050.h | 84 - arch/arm/mach-mt8127/kr076/hdmi/Makefile | 4 - arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.c | 151 - arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.h | 67 - .../arm/mach-mt8127/kr076/hdmi/inc/hdmi_drv.h | 226 - arch/arm/mach-mt8127/kr076/headset/Makefile | 4 - .../mach-mt8127/kr076/headset/accdet_custom.c | 28 - .../mach-mt8127/kr076/headset/accdet_custom.h | 14 - .../kr076/headset/accdet_custom_def.h | 15 - arch/arm/mach-mt8127/kr076/keypad/Makefile | 3 - arch/arm/mach-mt8127/kr076/keypad/mtk_kpd.h | 89 - .../mach-mt8127/kr076/keypad/mtk_kpd_bkl.c | 52 - .../kr076/lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- arch/arm/mach-mt8127/kr076/lcm/Makefile | 4 - arch/arm/mach-mt8127/kr076/lcm/inc/lcm_drv.h | 634 --- .../mach-mt8127/kr076/lcm/inc/mt8193_lvds.h | 357 -- .../mach-mt8127/kr076/lcm/inc/sn65dsi83_i2c.h | 29 - .../mach-mt8127/kr076/lcm/mt65xx_lcm_list.c | 964 ---- arch/arm/mach-mt8127/kr076/leds/Makefile | 5 - .../mach-mt8127/kr076/leds/mt65xx/Makefile | 3 - .../mach-mt8127/kr076/leds/mt65xx/cust_leds.c | 128 - .../mach-mt8127/kr076/leds/mt65xx/cust_leds.h | 20 - .../kr076/leds/mt65xx/cust_leds_def.h | 53 - arch/arm/mach-mt8127/kr076/lens/Makefile | 3 - arch/arm/mach-mt8127/kr076/lens/dummy_lens.c | 40 - .../arm/mach-mt8127/kr076/lens/inc/AD5820AF.h | 43 - arch/arm/mach-mt8127/kr076/lens/inc/AD5823.h | 43 - .../arm/mach-mt8127/kr076/lens/inc/AD5823AF.h | 43 - .../arm/mach-mt8127/kr076/lens/inc/BU6424AF.h | 43 - .../arm/mach-mt8127/kr076/lens/inc/BU6429AF.h | 43 - .../arm/mach-mt8127/kr076/lens/inc/DW9714AF.h | 81 - .../arm/mach-mt8127/kr076/lens/inc/DW9718AF.h | 81 - arch/arm/mach-mt8127/kr076/lens/inc/FM50AF.h | 43 - .../mach-mt8127/kr076/lens/inc/MT9P017AF.h | 41 - .../arm/mach-mt8127/kr076/lens/inc/OV8825AF.h | 41 - .../mach-mt8127/kr076/magnetometer/Makefile | 3 - .../mach-mt8127/kr076/magnetometer/akm09911.c | 2788 ----------- .../mach-mt8127/kr076/magnetometer/akm09911.h | 414 -- .../mach-mt8127/kr076/magnetometer/cust_mag.c | 25 - .../kr076/magnetometer/inc/cust_mag.h | 20 - arch/arm/mach-mt8127/kr076/magnetometer/mag.c | 1011 ---- arch/arm/mach-mt8127/kr076/magnetometer/mag.h | 141 - .../kr076/power/cust_battery_meter.h | 143 - .../kr076/power/cust_battery_meter_table.h | 947 ---- .../mach-mt8127/kr076/power/cust_charging.h | 129 - arch/arm/mach-mt8127/kr076/power/cust_diso.h | 58 - arch/arm/mach-mt8127/kr076/power/cust_pe.h | 21 - arch/arm/mach-mt8127/kr076/power/cust_pmic.h | 5 - arch/arm/mach-mt8127/kr076/rtc/rtc-mt.h | 34 - arch/arm/mach-mt8127/kr076/sound/Makefile | 4 - .../kr076/sound/inc/external_codec_driver.h | 104 - .../kr076/sound/inc/yusu_android_speaker.h | 146 - .../kr076/sound/yusu_android_speaker.c | 258 -- arch/arm/mach-mt8127/kr076/ssw/Makefile | 4 - arch/arm/mach-mt8127/kr076/ssw/inc/ssw.h | 59 - arch/arm/mach-mt8127/kr076/ssw/sim_switch.c | 349 -- .../arm/mach-mt8127/kr076/touchpanel/Makefile | 14 - .../kr076/touchpanel/goodix_tool.c | 620 --- .../kr076/touchpanel/gt9xx_driver.c | 4127 ----------------- .../kr076/touchpanel/gt9xx_firmware.h | 3108 ------------- .../kr076/touchpanel/gt9xx_update.c | 3672 --------------- .../mach-mt8127/kr076/touchpanel/mtk_tpd.c | 578 --- arch/arm/mach-mt8127/kr076/touchpanel/tpd.h | 145 - .../mach-mt8127/kr076/touchpanel/tpd_button.c | 114 - .../kr076/touchpanel/tpd_calibrate.c | 50 - .../kr076/touchpanel/tpd_calibrate.h | 19 - .../kr076/touchpanel/tpd_custom_gt9xx.h | 431 -- .../mach-mt8127/kr076/touchpanel/tpd_debug.c | 453 -- .../mach-mt8127/kr076/touchpanel/tpd_debug.h | 131 - .../kr076/touchpanel/tpd_default.c | 10 - .../kr076/touchpanel/tpd_default.h | 5 - .../mach-mt8127/kr076/touchpanel/tpd_init.c | 1 - .../mach-mt8127/kr076/touchpanel/tpd_misc.c | 39 - .../kr076/touchpanel/tpd_setting.c | 62 - arch/arm/mach-mt8127/kr076/vibrator/Makefile | 4 - .../kr076/vibrator/cust_vibrator.c | 18 - .../kr076/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/kr076_nand/Makefile | 44 - .../kr076_nand/accdet/accdet_custom.h | 14 - .../kr076_nand/accdet/accdet_custom_def.h | 15 - .../kr076_nand/accelerometer/Makefile | 3 - .../kr076_nand/accelerometer/accel.c | 795 ---- .../kr076_nand/accelerometer/accel.h | 123 - .../kr076_nand/accelerometer/cust_acc.c | 18 - .../kr076_nand/accelerometer/inc/cust_acc.h | 22 - .../kr076_nand/accelerometer/mpu6050.c | 2249 --------- .../kr076_nand/accelerometer/mpu6050.h | 60 - .../mach-mt8127/kr076_nand/alsps/APDS9930.c | 1990 -------- .../mach-mt8127/kr076_nand/alsps/APDS9930.h | 60 - .../arm/mach-mt8127/kr076_nand/alsps/Makefile | 4 - arch/arm/mach-mt8127/kr076_nand/alsps/alsps.c | 1094 ----- arch/arm/mach-mt8127/kr076_nand/alsps/alsps.h | 153 - .../mach-mt8127/kr076_nand/alsps/cust_alsps.c | 27 - .../kr076_nand/alsps/inc/cust_alsps.h | 42 - .../mach-mt8127/kr076_nand/cam_cal/Makefile | 3 - .../kr076_nand/cam_cal/dummy_cam_cal.c | 647 --- .../kr076_nand/cam_cal/dummy_cam_cal.h | 30 - .../kr076_nand/cam_cal/inc/cam_cal.h | 27 - .../kr076_nand/cam_cal/inc/cam_cal_define.h | 10 - .../kr076_nand/camera/camera/Makefile | 4 - .../kr076_nand/camera/camera/dummyds.c | 0 .../kr076_nand/camera/camera/kd_camera_hw.c | 622 --- .../kr076_nand/camera/camera/kd_camera_hw.h | 78 - .../kr076_nand/common/combo_nand.h | 2 - .../kr076_nand/common/partition_define.h | 141 - .../common/partition_define_private.h | 38 - arch/arm/mach-mt8127/kr076_nand/common/pmt.h | 93 - arch/arm/mach-mt8127/kr076_nand/core/Makefile | 4 - .../kr076_nand/core/board-custom.h | 120 - arch/arm/mach-mt8127/kr076_nand/core/board.c | 846 ---- .../kr076_nand/core/logger_custom.h | 13 - .../mach-mt8127/kr076_nand/dct/dct/Makefile | 4 - .../kr076_nand/dct/dct/codegen.dws | Bin 23252 -> 0 bytes .../mach-mt8127/kr076_nand/eeprom/Makefile | 4 - .../kr076_nand/eeprom/dummy_eeprom.c | 643 --- .../kr076_nand/eeprom/dummy_eeprom.h | 30 - .../kr076_nand/eeprom/inc/eeprom.h | 27 - .../kr076_nand/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- .../mach-mt8127/kr076_nand/gyroscope/Makefile | 4 - .../kr076_nand/gyroscope/cust_gyro.c | 31 - .../kr076_nand/gyroscope/gyroscope.c | 799 ---- .../kr076_nand/gyroscope/gyroscope.h | 116 - .../kr076_nand/gyroscope/inc/cust_gyro.h | 23 - .../kr076_nand/gyroscope/mpu6050.c | 1869 -------- .../kr076_nand/gyroscope/mpu6050.h | 84 - arch/arm/mach-mt8127/kr076_nand/hdmi/Makefile | 4 - .../mach-mt8127/kr076_nand/hdmi/hdmi_cust.c | 151 - .../mach-mt8127/kr076_nand/hdmi/hdmi_cust.h | 67 - .../kr076_nand/hdmi/inc/hdmi_drv.h | 226 - .../mach-mt8127/kr076_nand/headset/Makefile | 4 - .../kr076_nand/headset/accdet_custom.c | 28 - .../kr076_nand/headset/accdet_custom.h | 14 - .../kr076_nand/headset/accdet_custom_def.h | 15 - .../mach-mt8127/kr076_nand/keypad/Makefile | 3 - .../mach-mt8127/kr076_nand/keypad/mtk_kpd.h | 88 - .../kr076_nand/keypad/mtk_kpd_bkl.c | 52 - .../kr076_nand/lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- arch/arm/mach-mt8127/kr076_nand/lcm/Makefile | 4 - .../mach-mt8127/kr076_nand/lcm/inc/lcm_drv.h | 634 --- .../kr076_nand/lcm/inc/mt8193_lvds.h | 357 -- .../kr076_nand/lcm/inc/sn65dsi83_i2c.h | 29 - .../kr076_nand/lcm/mt65xx_lcm_list.c | 964 ---- arch/arm/mach-mt8127/kr076_nand/leds/Makefile | 5 - .../kr076_nand/leds/mt65xx/Makefile | 3 - .../kr076_nand/leds/mt65xx/cust_leds.c | 128 - .../kr076_nand/leds/mt65xx/cust_leds.h | 20 - .../kr076_nand/leds/mt65xx/cust_leds_def.h | 53 - arch/arm/mach-mt8127/kr076_nand/lens/Makefile | 3 - .../mach-mt8127/kr076_nand/lens/dummy_lens.c | 40 - .../kr076_nand/lens/inc/AD5820AF.h | 43 - .../mach-mt8127/kr076_nand/lens/inc/AD5823.h | 43 - .../kr076_nand/lens/inc/AD5823AF.h | 43 - .../kr076_nand/lens/inc/BU6424AF.h | 43 - .../kr076_nand/lens/inc/BU6429AF.h | 43 - .../kr076_nand/lens/inc/DW9714AF.h | 81 - .../kr076_nand/lens/inc/DW9718AF.h | 81 - .../mach-mt8127/kr076_nand/lens/inc/FM50AF.h | 43 - .../kr076_nand/lens/inc/MT9P017AF.h | 41 - .../kr076_nand/lens/inc/OV8825AF.h | 41 - .../kr076_nand/magnetometer/Makefile | 3 - .../kr076_nand/magnetometer/akm09911.c | 2788 ----------- .../kr076_nand/magnetometer/akm09911.h | 414 -- .../kr076_nand/magnetometer/cust_mag.c | 25 - .../kr076_nand/magnetometer/inc/cust_mag.h | 20 - .../mach-mt8127/kr076_nand/magnetometer/mag.c | 1011 ---- .../mach-mt8127/kr076_nand/magnetometer/mag.h | 141 - .../kr076_nand/power/cust_battery_meter.h | 143 - .../power/cust_battery_meter_table.h | 947 ---- .../kr076_nand/power/cust_charging.h | 129 - .../mach-mt8127/kr076_nand/power/cust_diso.h | 58 - .../mach-mt8127/kr076_nand/power/cust_pe.h | 21 - .../mach-mt8127/kr076_nand/power/cust_pmic.h | 5 - arch/arm/mach-mt8127/kr076_nand/rtc/rtc-mt.h | 34 - .../arm/mach-mt8127/kr076_nand/sound/Makefile | 4 - .../sound/inc/external_codec_driver.h | 104 - .../sound/inc/yusu_android_speaker.h | 146 - .../kr076_nand/sound/yusu_android_speaker.c | 258 -- arch/arm/mach-mt8127/kr076_nand/ssw/Makefile | 4 - arch/arm/mach-mt8127/kr076_nand/ssw/inc/ssw.h | 59 - .../mach-mt8127/kr076_nand/ssw/sim_switch.c | 349 -- .../kr076_nand/touchpanel/Makefile | 14 - .../kr076_nand/touchpanel/goodix_tool.c | 620 --- .../kr076_nand/touchpanel/gt9xx_driver.c | 4127 ----------------- .../kr076_nand/touchpanel/gt9xx_firmware.h | 3108 ------------- .../kr076_nand/touchpanel/gt9xx_update.c | 3672 --------------- .../kr076_nand/touchpanel/mtk_tpd.c | 578 --- .../mach-mt8127/kr076_nand/touchpanel/tpd.h | 145 - .../kr076_nand/touchpanel/tpd_button.c | 114 - .../kr076_nand/touchpanel/tpd_calibrate.c | 50 - .../kr076_nand/touchpanel/tpd_calibrate.h | 19 - .../kr076_nand/touchpanel/tpd_custom_gt9xx.h | 431 -- .../kr076_nand/touchpanel/tpd_debug.c | 453 -- .../kr076_nand/touchpanel/tpd_debug.h | 131 - .../kr076_nand/touchpanel/tpd_default.c | 10 - .../kr076_nand/touchpanel/tpd_default.h | 5 - .../kr076_nand/touchpanel/tpd_init.c | 1 - .../kr076_nand/touchpanel/tpd_misc.c | 39 - .../kr076_nand/touchpanel/tpd_setting.c | 62 - .../mach-mt8127/kr076_nand/vibrator/Makefile | 4 - .../kr076_nand/vibrator/cust_vibrator.c | 18 - .../kr076_nand/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/pixi3_10/Makefile | 44 - .../pixi3_10/accdet/accdet_custom.h | 14 - .../pixi3_10/accdet/accdet_custom_def.h | 15 - .../pixi3_10/accelerometer/Makefile | 3 - .../pixi3_10/accelerometer/accel.c | 795 ---- .../pixi3_10/accelerometer/accel.h | 123 - .../pixi3_10/accelerometer/cust_acc.c | 18 - .../pixi3_10/accelerometer/inc/cust_acc.h | 22 - .../pixi3_10/accelerometer/mpu6050.c | 2249 --------- .../pixi3_10/accelerometer/mpu6050.h | 60 - .../arm/mach-mt8127/pixi3_10/alsps/APDS9930.c | 1990 -------- .../arm/mach-mt8127/pixi3_10/alsps/APDS9930.h | 60 - arch/arm/mach-mt8127/pixi3_10/alsps/Makefile | 4 - arch/arm/mach-mt8127/pixi3_10/alsps/alsps.c | 1094 ----- arch/arm/mach-mt8127/pixi3_10/alsps/alsps.h | 153 - .../mach-mt8127/pixi3_10/alsps/cust_alsps.c | 27 - .../pixi3_10/alsps/inc/cust_alsps.h | 42 - .../arm/mach-mt8127/pixi3_10/cam_cal/Makefile | 3 - .../pixi3_10/cam_cal/dummy_cam_cal.c | 647 --- .../pixi3_10/cam_cal/dummy_cam_cal.h | 30 - .../pixi3_10/cam_cal/inc/cam_cal.h | 27 - .../pixi3_10/cam_cal/inc/cam_cal_define.h | 10 - .../pixi3_10/camera/camera/Makefile | 4 - .../pixi3_10/camera/camera/dummyds.c | 0 .../pixi3_10/camera/camera/kd_camera_hw.c | 335 -- .../pixi3_10/camera/camera/kd_camera_hw.h | 78 - .../pixi3_10/common/partition_define.h | 135 - .../common/partition_define_private.h | 38 - arch/arm/mach-mt8127/pixi3_10/common/pmt.h | 91 - arch/arm/mach-mt8127/pixi3_10/core/Makefile | 4 - .../mach-mt8127/pixi3_10/core/board-custom.h | 119 - arch/arm/mach-mt8127/pixi3_10/core/board.c | 845 ---- .../mach-mt8127/pixi3_10/core/logger_custom.h | 13 - .../arm/mach-mt8127/pixi3_10/dct/dct/Makefile | 4 - .../mach-mt8127/pixi3_10/dct/dct/codegen.dws | Bin 23493 -> 0 bytes arch/arm/mach-mt8127/pixi3_10/eeprom/Makefile | 4 - .../pixi3_10/eeprom/dummy_eeprom.c | 643 --- .../pixi3_10/eeprom/dummy_eeprom.h | 30 - .../mach-mt8127/pixi3_10/eeprom/inc/eeprom.h | 27 - .../pixi3_10/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- .../mach-mt8127/pixi3_10/gyroscope/Makefile | 4 - .../pixi3_10/gyroscope/cust_gyro.c | 31 - .../pixi3_10/gyroscope/gyroscope.c | 799 ---- .../pixi3_10/gyroscope/gyroscope.h | 116 - .../pixi3_10/gyroscope/inc/cust_gyro.h | 23 - .../mach-mt8127/pixi3_10/gyroscope/mpu6050.c | 1869 -------- .../mach-mt8127/pixi3_10/gyroscope/mpu6050.h | 84 - arch/arm/mach-mt8127/pixi3_10/hdmi/Makefile | 4 - .../arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.c | 151 - .../arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.h | 67 - .../mach-mt8127/pixi3_10/hdmi/inc/hdmi_drv.h | 226 - .../arm/mach-mt8127/pixi3_10/headset/Makefile | 4 - .../pixi3_10/headset/accdet_custom.c | 28 - .../pixi3_10/headset/accdet_custom.h | 14 - .../pixi3_10/headset/accdet_custom_def.h | 15 - arch/arm/mach-mt8127/pixi3_10/keypad/Makefile | 3 - .../arm/mach-mt8127/pixi3_10/keypad/mtk_kpd.h | 87 - .../mach-mt8127/pixi3_10/keypad/mtk_kpd_bkl.c | 52 - .../pixi3_10/lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- arch/arm/mach-mt8127/pixi3_10/lcm/Makefile | 4 - .../mach-mt8127/pixi3_10/lcm/inc/lcm_drv.h | 634 --- .../pixi3_10/lcm/inc/mt8193_lvds.h | 357 -- .../pixi3_10/lcm/inc/sn65dsi83_i2c.h | 29 - .../pixi3_10/lcm/mt65xx_lcm_list.c | 964 ---- arch/arm/mach-mt8127/pixi3_10/leds/Makefile | 5 - .../mach-mt8127/pixi3_10/leds/mt65xx/Makefile | 3 - .../pixi3_10/leds/mt65xx/cust_leds.c | 128 - .../pixi3_10/leds/mt65xx/cust_leds.h | 20 - .../pixi3_10/leds/mt65xx/cust_leds_def.h | 53 - arch/arm/mach-mt8127/pixi3_10/lens/Makefile | 3 - .../mach-mt8127/pixi3_10/lens/dummy_lens.c | 40 - .../mach-mt8127/pixi3_10/lens/inc/AD5820AF.h | 43 - .../mach-mt8127/pixi3_10/lens/inc/AD5823.h | 43 - .../mach-mt8127/pixi3_10/lens/inc/AD5823AF.h | 43 - .../mach-mt8127/pixi3_10/lens/inc/BU6424AF.h | 43 - .../mach-mt8127/pixi3_10/lens/inc/BU6429AF.h | 43 - .../mach-mt8127/pixi3_10/lens/inc/DW9714AF.h | 81 - .../mach-mt8127/pixi3_10/lens/inc/DW9718AF.h | 81 - .../mach-mt8127/pixi3_10/lens/inc/FM50AF.h | 43 - .../mach-mt8127/pixi3_10/lens/inc/MT9P017AF.h | 41 - .../mach-mt8127/pixi3_10/lens/inc/OV8825AF.h | 41 - .../pixi3_10/magnetometer/Makefile | 3 - .../pixi3_10/magnetometer/akm09911.c | 2788 ----------- .../pixi3_10/magnetometer/akm09911.h | 414 -- .../pixi3_10/magnetometer/cust_mag.c | 25 - .../pixi3_10/magnetometer/inc/cust_mag.h | 20 - .../mach-mt8127/pixi3_10/magnetometer/mag.c | 1011 ---- .../mach-mt8127/pixi3_10/magnetometer/mag.h | 141 - .../pixi3_10/power/cust_battery_meter.h | 133 - .../pixi3_10/power/cust_battery_meter_table.h | 1068 ----- .../pixi3_10/power/cust_charging.h | 123 - .../mach-mt8127/pixi3_10/power/cust_diso.h | 58 - arch/arm/mach-mt8127/pixi3_10/power/cust_pe.h | 21 - .../mach-mt8127/pixi3_10/power/cust_pmic.h | 5 - arch/arm/mach-mt8127/pixi3_10/rtc/rtc-mt.h | 34 - arch/arm/mach-mt8127/pixi3_10/sound/Makefile | 4 - .../sound/inc/external_codec_driver.h | 104 - .../pixi3_10/sound/inc/yusu_android_speaker.h | 146 - .../pixi3_10/sound/yusu_android_speaker.c | 258 -- arch/arm/mach-mt8127/pixi3_10/ssw/Makefile | 4 - arch/arm/mach-mt8127/pixi3_10/ssw/inc/ssw.h | 59 - .../arm/mach-mt8127/pixi3_10/ssw/sim_switch.c | 349 -- .../mach-mt8127/pixi3_10/touchpanel/Makefile | 14 - .../pixi3_10/touchpanel/goodix_tool.c | 829 ---- .../pixi3_10/touchpanel/gt9xx_driver.c | 3350 ------------- .../pixi3_10/touchpanel/gt9xx_firmware.h | 39 - .../pixi3_10/touchpanel/gt9xx_update.c | 3986 ---------------- .../mach-mt8127/pixi3_10/touchpanel/mtk_tpd.c | 450 -- .../arm/mach-mt8127/pixi3_10/touchpanel/tpd.h | 145 - .../pixi3_10/touchpanel/tpd_button.c | 114 - .../pixi3_10/touchpanel/tpd_calibrate.c | 50 - .../pixi3_10/touchpanel/tpd_calibrate.h | 19 - .../pixi3_10/touchpanel/tpd_custom_gt9xx.h | 409 -- .../pixi3_10/touchpanel/tpd_debug.c | 453 -- .../pixi3_10/touchpanel/tpd_debug.h | 131 - .../pixi3_10/touchpanel/tpd_default.c | 10 - .../pixi3_10/touchpanel/tpd_default.h | 5 - .../pixi3_10/touchpanel/tpd_init.c | 1 - .../pixi3_10/touchpanel/tpd_misc.c | 39 - .../pixi3_10/touchpanel/tpd_setting.c | 62 - .../mach-mt8127/pixi3_10/vibrator/Makefile | 4 - .../pixi3_10/vibrator/cust_vibrator.c | 18 - .../pixi3_10/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/tcl8127_c_mlc/Makefile | 44 - .../tcl8127_c_mlc/accdet/accdet_custom.h | 14 - .../tcl8127_c_mlc/accdet/accdet_custom_def.h | 15 - .../tcl8127_c_mlc/accelerometer/Makefile | 3 - .../tcl8127_c_mlc/accelerometer/accel.c | 795 ---- .../tcl8127_c_mlc/accelerometer/accel.h | 123 - .../tcl8127_c_mlc/accelerometer/cust_acc.c | 18 - .../accelerometer/inc/cust_acc.h | 22 - .../tcl8127_c_mlc/accelerometer/mpu6050.c | 2249 --------- .../tcl8127_c_mlc/accelerometer/mpu6050.h | 60 - .../tcl8127_c_mlc/alsps/APDS9930.c | 1990 -------- .../tcl8127_c_mlc/alsps/APDS9930.h | 60 - .../mach-mt8127/tcl8127_c_mlc/alsps/Makefile | 4 - .../mach-mt8127/tcl8127_c_mlc/alsps/alsps.c | 1094 ----- .../mach-mt8127/tcl8127_c_mlc/alsps/alsps.h | 153 - .../tcl8127_c_mlc/alsps/cust_alsps.c | 27 - .../tcl8127_c_mlc/alsps/inc/cust_alsps.h | 42 - .../tcl8127_c_mlc/cam_cal/Makefile | 3 - .../tcl8127_c_mlc/cam_cal/dummy_cam_cal.c | 647 --- .../tcl8127_c_mlc/cam_cal/dummy_cam_cal.h | 30 - .../tcl8127_c_mlc/cam_cal/inc/cam_cal.h | 27 - .../cam_cal/inc/cam_cal_define.h | 10 - .../tcl8127_c_mlc/camera/camera/Makefile | 4 - .../tcl8127_c_mlc/camera/camera/dummyds.c | 0 .../camera/camera/kd_camera_hw.c | 348 -- .../camera/camera/kd_camera_hw.h | 78 - .../tcl8127_c_mlc/common/combo_nand.h | 2 - .../tcl8127_c_mlc/common/partition_define.h | 140 - .../common/partition_define_private.h | 38 - .../mach-mt8127/tcl8127_c_mlc/common/pmt.h | 93 - .../mach-mt8127/tcl8127_c_mlc/core/Makefile | 4 - .../tcl8127_c_mlc/core/board-custom.h | 119 - .../mach-mt8127/tcl8127_c_mlc/core/board.c | 845 ---- .../tcl8127_c_mlc/core/logger_custom.h | 13 - .../tcl8127_c_mlc/dct/dct/Makefile | 4 - .../tcl8127_c_mlc/dct/dct/codegen.dws | Bin 23492 -> 0 bytes .../mach-mt8127/tcl8127_c_mlc/eeprom/Makefile | 4 - .../tcl8127_c_mlc/eeprom/dummy_eeprom.c | 643 --- .../tcl8127_c_mlc/eeprom/dummy_eeprom.h | 30 - .../tcl8127_c_mlc/eeprom/inc/eeprom.h | 27 - .../tcl8127_c_mlc/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- .../tcl8127_c_mlc/gyroscope/Makefile | 4 - .../tcl8127_c_mlc/gyroscope/cust_gyro.c | 31 - .../tcl8127_c_mlc/gyroscope/gyroscope.c | 799 ---- .../tcl8127_c_mlc/gyroscope/gyroscope.h | 116 - .../tcl8127_c_mlc/gyroscope/inc/cust_gyro.h | 23 - .../tcl8127_c_mlc/gyroscope/mpu6050.c | 1869 -------- .../tcl8127_c_mlc/gyroscope/mpu6050.h | 84 - .../mach-mt8127/tcl8127_c_mlc/hdmi/Makefile | 4 - .../tcl8127_c_mlc/hdmi/hdmi_cust.c | 151 - .../tcl8127_c_mlc/hdmi/hdmi_cust.h | 67 - .../tcl8127_c_mlc/hdmi/inc/hdmi_drv.h | 226 - .../tcl8127_c_mlc/headset/Makefile | 4 - .../tcl8127_c_mlc/headset/accdet_custom.c | 28 - .../tcl8127_c_mlc/headset/accdet_custom.h | 14 - .../tcl8127_c_mlc/headset/accdet_custom_def.h | 15 - .../mach-mt8127/tcl8127_c_mlc/keypad/Makefile | 3 - .../tcl8127_c_mlc/keypad/mtk_kpd.h | 87 - .../tcl8127_c_mlc/keypad/mtk_kpd_bkl.c | 52 - .../lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- .../mach-mt8127/tcl8127_c_mlc/lcm/Makefile | 4 - .../tcl8127_c_mlc/lcm/inc/lcm_drv.h | 634 --- .../tcl8127_c_mlc/lcm/inc/mt8193_lvds.h | 357 -- .../tcl8127_c_mlc/lcm/inc/sn65dsi83_i2c.h | 29 - .../tcl8127_c_mlc/lcm/mt65xx_lcm_list.c | 964 ---- .../mach-mt8127/tcl8127_c_mlc/leds/Makefile | 5 - .../tcl8127_c_mlc/leds/mt65xx/Makefile | 3 - .../tcl8127_c_mlc/leds/mt65xx/cust_leds.c | 128 - .../tcl8127_c_mlc/leds/mt65xx/cust_leds.h | 20 - .../tcl8127_c_mlc/leds/mt65xx/cust_leds_def.h | 53 - .../mach-mt8127/tcl8127_c_mlc/lens/Makefile | 3 - .../tcl8127_c_mlc/lens/dummy_lens.c | 40 - .../tcl8127_c_mlc/lens/inc/AD5820AF.h | 43 - .../tcl8127_c_mlc/lens/inc/AD5823.h | 43 - .../tcl8127_c_mlc/lens/inc/AD5823AF.h | 43 - .../tcl8127_c_mlc/lens/inc/BU6424AF.h | 43 - .../tcl8127_c_mlc/lens/inc/BU6429AF.h | 43 - .../tcl8127_c_mlc/lens/inc/DW9714AF.h | 81 - .../tcl8127_c_mlc/lens/inc/DW9718AF.h | 81 - .../tcl8127_c_mlc/lens/inc/FM50AF.h | 43 - .../tcl8127_c_mlc/lens/inc/MT9P017AF.h | 41 - .../tcl8127_c_mlc/lens/inc/OV8825AF.h | 41 - .../tcl8127_c_mlc/magnetometer/Makefile | 3 - .../tcl8127_c_mlc/magnetometer/akm09911.c | 2788 ----------- .../tcl8127_c_mlc/magnetometer/akm09911.h | 414 -- .../tcl8127_c_mlc/magnetometer/cust_mag.c | 25 - .../tcl8127_c_mlc/magnetometer/inc/cust_mag.h | 20 - .../tcl8127_c_mlc/magnetometer/mag.c | 1011 ---- .../tcl8127_c_mlc/magnetometer/mag.h | 141 - .../tcl8127_c_mlc/power/cust_battery_meter.h | 133 - .../power/cust_battery_meter_table.h | 1068 ----- .../tcl8127_c_mlc/power/cust_charging.h | 123 - .../tcl8127_c_mlc/power/cust_diso.h | 58 - .../mach-mt8127/tcl8127_c_mlc/power/cust_pe.h | 21 - .../tcl8127_c_mlc/power/cust_pmic.h | 5 - .../mach-mt8127/tcl8127_c_mlc/rtc/rtc-mt.h | 34 - .../mach-mt8127/tcl8127_c_mlc/sound/Makefile | 4 - .../sound/inc/external_codec_driver.h | 104 - .../sound/inc/yusu_android_speaker.h | 146 - .../sound/yusu_android_speaker.c | 258 -- .../mach-mt8127/tcl8127_c_mlc/ssw/Makefile | 4 - .../mach-mt8127/tcl8127_c_mlc/ssw/inc/ssw.h | 59 - .../tcl8127_c_mlc/ssw/sim_switch.c | 349 -- .../tcl8127_c_mlc/touchpanel/Makefile | 14 - .../tcl8127_c_mlc/touchpanel/goodix_tool.c | 829 ---- .../tcl8127_c_mlc/touchpanel/gt9xx_driver.c | 3350 ------------- .../tcl8127_c_mlc/touchpanel/gt9xx_firmware.h | 39 - .../tcl8127_c_mlc/touchpanel/gt9xx_update.c | 3986 ---------------- .../tcl8127_c_mlc/touchpanel/mtk_tpd.c | 450 -- .../tcl8127_c_mlc/touchpanel/tpd.h | 145 - .../tcl8127_c_mlc/touchpanel/tpd_button.c | 114 - .../tcl8127_c_mlc/touchpanel/tpd_calibrate.c | 50 - .../tcl8127_c_mlc/touchpanel/tpd_calibrate.h | 19 - .../touchpanel/tpd_custom_gt9xx.h | 409 -- .../tcl8127_c_mlc/touchpanel/tpd_debug.c | 453 -- .../tcl8127_c_mlc/touchpanel/tpd_debug.h | 131 - .../tcl8127_c_mlc/touchpanel/tpd_default.c | 10 - .../tcl8127_c_mlc/touchpanel/tpd_default.h | 5 - .../tcl8127_c_mlc/touchpanel/tpd_init.c | 1 - .../tcl8127_c_mlc/touchpanel/tpd_misc.c | 39 - .../tcl8127_c_mlc/touchpanel/tpd_setting.c | 62 - .../tcl8127_c_mlc/vibrator/Makefile | 4 - .../tcl8127_c_mlc/vibrator/cust_vibrator.c | 18 - .../tcl8127_c_mlc/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/tcl8127_tb_c_l/Makefile | 44 - .../tcl8127_tb_c_l/accdet/accdet_custom.h | 14 - .../tcl8127_tb_c_l/accdet/accdet_custom_def.h | 15 - .../tcl8127_tb_c_l/accelerometer/Makefile | 3 - .../tcl8127_tb_c_l/accelerometer/accel.c | 795 ---- .../tcl8127_tb_c_l/accelerometer/accel.h | 123 - .../tcl8127_tb_c_l/accelerometer/cust_acc.c | 18 - .../accelerometer/inc/cust_acc.h | 22 - .../tcl8127_tb_c_l/accelerometer/mpu6050.c | 2249 --------- .../tcl8127_tb_c_l/accelerometer/mpu6050.h | 60 - .../tcl8127_tb_c_l/alsps/APDS9930.c | 1990 -------- .../tcl8127_tb_c_l/alsps/APDS9930.h | 60 - .../mach-mt8127/tcl8127_tb_c_l/alsps/Makefile | 4 - .../mach-mt8127/tcl8127_tb_c_l/alsps/alsps.c | 1094 ----- .../mach-mt8127/tcl8127_tb_c_l/alsps/alsps.h | 153 - .../tcl8127_tb_c_l/alsps/cust_alsps.c | 27 - .../tcl8127_tb_c_l/alsps/inc/cust_alsps.h | 42 - .../tcl8127_tb_c_l/cam_cal/Makefile | 3 - .../tcl8127_tb_c_l/cam_cal/dummy_cam_cal.c | 647 --- .../tcl8127_tb_c_l/cam_cal/dummy_cam_cal.h | 30 - .../tcl8127_tb_c_l/cam_cal/inc/cam_cal.h | 27 - .../cam_cal/inc/cam_cal_define.h | 10 - .../tcl8127_tb_c_l/camera/camera/Makefile | 4 - .../tcl8127_tb_c_l/camera/camera/dummyds.c | 0 .../camera/camera/kd_camera_hw.c | 335 -- .../camera/camera/kd_camera_hw.h | 78 - .../tcl8127_tb_c_l/common/partition_define.h | 135 - .../common/partition_define_private.h | 38 - .../mach-mt8127/tcl8127_tb_c_l/common/pmt.h | 91 - .../mach-mt8127/tcl8127_tb_c_l/core/Makefile | 4 - .../tcl8127_tb_c_l/core/board-custom.h | 119 - .../mach-mt8127/tcl8127_tb_c_l/core/board.c | 845 ---- .../tcl8127_tb_c_l/core/logger_custom.h | 13 - .../tcl8127_tb_c_l/dct/dct/Makefile | 4 - .../tcl8127_tb_c_l/dct/dct/codegen.dws | Bin 23493 -> 0 bytes .../tcl8127_tb_c_l/eeprom/Makefile | 4 - .../tcl8127_tb_c_l/eeprom/dummy_eeprom.c | 643 --- .../tcl8127_tb_c_l/eeprom/dummy_eeprom.h | 30 - .../tcl8127_tb_c_l/eeprom/inc/eeprom.h | 27 - .../tcl8127_tb_c_l/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- .../tcl8127_tb_c_l/gyroscope/Makefile | 4 - .../tcl8127_tb_c_l/gyroscope/cust_gyro.c | 31 - .../tcl8127_tb_c_l/gyroscope/gyroscope.c | 799 ---- .../tcl8127_tb_c_l/gyroscope/gyroscope.h | 116 - .../tcl8127_tb_c_l/gyroscope/inc/cust_gyro.h | 23 - .../tcl8127_tb_c_l/gyroscope/mpu6050.c | 1869 -------- .../tcl8127_tb_c_l/gyroscope/mpu6050.h | 84 - .../mach-mt8127/tcl8127_tb_c_l/hdmi/Makefile | 4 - .../tcl8127_tb_c_l/hdmi/hdmi_cust.c | 151 - .../tcl8127_tb_c_l/hdmi/hdmi_cust.h | 67 - .../tcl8127_tb_c_l/hdmi/inc/hdmi_drv.h | 226 - .../tcl8127_tb_c_l/headset/Makefile | 4 - .../tcl8127_tb_c_l/headset/accdet_custom.c | 28 - .../tcl8127_tb_c_l/headset/accdet_custom.h | 14 - .../headset/accdet_custom_def.h | 15 - .../tcl8127_tb_c_l/keypad/Makefile | 3 - .../tcl8127_tb_c_l/keypad/mtk_kpd.h | 87 - .../tcl8127_tb_c_l/keypad/mtk_kpd_bkl.c | 52 - .../lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- .../mach-mt8127/tcl8127_tb_c_l/lcm/Makefile | 4 - .../tcl8127_tb_c_l/lcm/inc/lcm_drv.h | 634 --- .../tcl8127_tb_c_l/lcm/inc/mt8193_lvds.h | 357 -- .../tcl8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h | 29 - .../tcl8127_tb_c_l/lcm/mt65xx_lcm_list.c | 964 ---- .../mach-mt8127/tcl8127_tb_c_l/leds/Makefile | 5 - .../tcl8127_tb_c_l/leds/mt65xx/Makefile | 3 - .../tcl8127_tb_c_l/leds/mt65xx/cust_leds.c | 128 - .../tcl8127_tb_c_l/leds/mt65xx/cust_leds.h | 20 - .../leds/mt65xx/cust_leds_def.h | 53 - .../mach-mt8127/tcl8127_tb_c_l/lens/Makefile | 3 - .../tcl8127_tb_c_l/lens/dummy_lens.c | 40 - .../tcl8127_tb_c_l/lens/inc/AD5820AF.h | 43 - .../tcl8127_tb_c_l/lens/inc/AD5823.h | 43 - .../tcl8127_tb_c_l/lens/inc/AD5823AF.h | 43 - .../tcl8127_tb_c_l/lens/inc/BU6424AF.h | 43 - .../tcl8127_tb_c_l/lens/inc/BU6429AF.h | 43 - .../tcl8127_tb_c_l/lens/inc/DW9714AF.h | 81 - .../tcl8127_tb_c_l/lens/inc/DW9718AF.h | 81 - .../tcl8127_tb_c_l/lens/inc/FM50AF.h | 43 - .../tcl8127_tb_c_l/lens/inc/MT9P017AF.h | 41 - .../tcl8127_tb_c_l/lens/inc/OV8825AF.h | 41 - .../tcl8127_tb_c_l/magnetometer/Makefile | 3 - .../tcl8127_tb_c_l/magnetometer/akm09911.c | 2788 ----------- .../tcl8127_tb_c_l/magnetometer/akm09911.h | 414 -- .../tcl8127_tb_c_l/magnetometer/cust_mag.c | 25 - .../magnetometer/inc/cust_mag.h | 20 - .../tcl8127_tb_c_l/magnetometer/mag.c | 1011 ---- .../tcl8127_tb_c_l/magnetometer/mag.h | 141 - .../tcl8127_tb_c_l/power/cust_battery_meter.h | 133 - .../power/cust_battery_meter_table.h | 1068 ----- .../tcl8127_tb_c_l/power/cust_charging.h | 123 - .../tcl8127_tb_c_l/power/cust_diso.h | 58 - .../tcl8127_tb_c_l/power/cust_pe.h | 21 - .../tcl8127_tb_c_l/power/cust_pmic.h | 5 - .../mach-mt8127/tcl8127_tb_c_l/rtc/rtc-mt.h | 34 - .../mach-mt8127/tcl8127_tb_c_l/sound/Makefile | 4 - .../sound/inc/external_codec_driver.h | 104 - .../sound/inc/yusu_android_speaker.h | 146 - .../sound/yusu_android_speaker.c | 258 -- .../mach-mt8127/tcl8127_tb_c_l/ssw/Makefile | 4 - .../mach-mt8127/tcl8127_tb_c_l/ssw/inc/ssw.h | 59 - .../tcl8127_tb_c_l/ssw/sim_switch.c | 349 -- .../tcl8127_tb_c_l/touchpanel/Makefile | 14 - .../tcl8127_tb_c_l/touchpanel/goodix_tool.c | 829 ---- .../tcl8127_tb_c_l/touchpanel/gt9xx_driver.c | 3350 ------------- .../touchpanel/gt9xx_firmware.h | 39 - .../tcl8127_tb_c_l/touchpanel/gt9xx_update.c | 3986 ---------------- .../tcl8127_tb_c_l/touchpanel/mtk_tpd.c | 450 -- .../tcl8127_tb_c_l/touchpanel/tpd.h | 145 - .../tcl8127_tb_c_l/touchpanel/tpd_button.c | 114 - .../tcl8127_tb_c_l/touchpanel/tpd_calibrate.c | 50 - .../tcl8127_tb_c_l/touchpanel/tpd_calibrate.h | 19 - .../touchpanel/tpd_custom_gt9xx.h | 409 -- .../tcl8127_tb_c_l/touchpanel/tpd_debug.c | 453 -- .../tcl8127_tb_c_l/touchpanel/tpd_debug.h | 131 - .../tcl8127_tb_c_l/touchpanel/tpd_default.c | 10 - .../tcl8127_tb_c_l/touchpanel/tpd_default.h | 5 - .../tcl8127_tb_c_l/touchpanel/tpd_init.c | 1 - .../tcl8127_tb_c_l/touchpanel/tpd_misc.c | 39 - .../tcl8127_tb_c_l/touchpanel/tpd_setting.c | 62 - .../tcl8127_tb_c_l/vibrator/Makefile | 4 - .../tcl8127_tb_c_l/vibrator/cust_vibrator.c | 18 - .../tcl8127_tb_c_l/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/tpw8127_c_mlc/Makefile | 44 - .../tpw8127_c_mlc/accdet/accdet_custom.h | 14 - .../tpw8127_c_mlc/accdet/accdet_custom_def.h | 15 - .../tpw8127_c_mlc/accelerometer/Makefile | 3 - .../tpw8127_c_mlc/accelerometer/accel.c | 795 ---- .../tpw8127_c_mlc/accelerometer/accel.h | 123 - .../tpw8127_c_mlc/accelerometer/cust_acc.c | 18 - .../accelerometer/inc/cust_acc.h | 22 - .../tpw8127_c_mlc/accelerometer/mpu6050.c | 2249 --------- .../tpw8127_c_mlc/accelerometer/mpu6050.h | 60 - .../tpw8127_c_mlc/alsps/APDS9930.c | 1990 -------- .../tpw8127_c_mlc/alsps/APDS9930.h | 60 - .../mach-mt8127/tpw8127_c_mlc/alsps/Makefile | 4 - .../mach-mt8127/tpw8127_c_mlc/alsps/alsps.c | 1094 ----- .../mach-mt8127/tpw8127_c_mlc/alsps/alsps.h | 153 - .../tpw8127_c_mlc/alsps/cust_alsps.c | 27 - .../tpw8127_c_mlc/alsps/inc/cust_alsps.h | 42 - .../tpw8127_c_mlc/cam_cal/Makefile | 3 - .../tpw8127_c_mlc/cam_cal/dummy_cam_cal.c | 647 --- .../tpw8127_c_mlc/cam_cal/dummy_cam_cal.h | 30 - .../tpw8127_c_mlc/cam_cal/inc/cam_cal.h | 27 - .../cam_cal/inc/cam_cal_define.h | 10 - .../tpw8127_c_mlc/camera/camera/Makefile | 4 - .../tpw8127_c_mlc/camera/camera/dummyds.c | 0 .../camera/camera/kd_camera_hw.c | 348 -- .../camera/camera/kd_camera_hw.h | 78 - .../tpw8127_c_mlc/common/combo_nand.h | 2 - .../tpw8127_c_mlc/common/partition_define.h | 140 - .../common/partition_define_private.h | 38 - .../mach-mt8127/tpw8127_c_mlc/common/pmt.h | 93 - .../mach-mt8127/tpw8127_c_mlc/core/Makefile | 4 - .../tpw8127_c_mlc/core/board-custom.h | 119 - .../mach-mt8127/tpw8127_c_mlc/core/board.c | 845 ---- .../tpw8127_c_mlc/core/logger_custom.h | 13 - .../tpw8127_c_mlc/dct/dct/Makefile | 4 - .../tpw8127_c_mlc/dct/dct/codegen.dws | Bin 23492 -> 0 bytes .../mach-mt8127/tpw8127_c_mlc/eeprom/Makefile | 4 - .../tpw8127_c_mlc/eeprom/dummy_eeprom.c | 643 --- .../tpw8127_c_mlc/eeprom/dummy_eeprom.h | 30 - .../tpw8127_c_mlc/eeprom/inc/eeprom.h | 27 - .../tpw8127_c_mlc/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- .../tpw8127_c_mlc/gyroscope/Makefile | 4 - .../tpw8127_c_mlc/gyroscope/cust_gyro.c | 31 - .../tpw8127_c_mlc/gyroscope/gyroscope.c | 799 ---- .../tpw8127_c_mlc/gyroscope/gyroscope.h | 116 - .../tpw8127_c_mlc/gyroscope/inc/cust_gyro.h | 23 - .../tpw8127_c_mlc/gyroscope/mpu6050.c | 1869 -------- .../tpw8127_c_mlc/gyroscope/mpu6050.h | 84 - .../mach-mt8127/tpw8127_c_mlc/hdmi/Makefile | 4 - .../tpw8127_c_mlc/hdmi/hdmi_cust.c | 151 - .../tpw8127_c_mlc/hdmi/hdmi_cust.h | 67 - .../tpw8127_c_mlc/hdmi/inc/hdmi_drv.h | 226 - .../tpw8127_c_mlc/headset/Makefile | 4 - .../tpw8127_c_mlc/headset/accdet_custom.c | 28 - .../tpw8127_c_mlc/headset/accdet_custom.h | 14 - .../tpw8127_c_mlc/headset/accdet_custom_def.h | 15 - .../mach-mt8127/tpw8127_c_mlc/keypad/Makefile | 3 - .../tpw8127_c_mlc/keypad/mtk_kpd.h | 87 - .../tpw8127_c_mlc/keypad/mtk_kpd_bkl.c | 52 - .../lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- .../mach-mt8127/tpw8127_c_mlc/lcm/Makefile | 4 - .../tpw8127_c_mlc/lcm/inc/lcm_drv.h | 634 --- .../tpw8127_c_mlc/lcm/inc/mt8193_lvds.h | 357 -- .../tpw8127_c_mlc/lcm/inc/sn65dsi83_i2c.h | 29 - .../tpw8127_c_mlc/lcm/mt65xx_lcm_list.c | 964 ---- .../mach-mt8127/tpw8127_c_mlc/leds/Makefile | 5 - .../tpw8127_c_mlc/leds/mt65xx/Makefile | 3 - .../tpw8127_c_mlc/leds/mt65xx/cust_leds.c | 128 - .../tpw8127_c_mlc/leds/mt65xx/cust_leds.h | 20 - .../tpw8127_c_mlc/leds/mt65xx/cust_leds_def.h | 53 - .../mach-mt8127/tpw8127_c_mlc/lens/Makefile | 3 - .../tpw8127_c_mlc/lens/dummy_lens.c | 40 - .../tpw8127_c_mlc/lens/inc/AD5820AF.h | 43 - .../tpw8127_c_mlc/lens/inc/AD5823.h | 43 - .../tpw8127_c_mlc/lens/inc/AD5823AF.h | 43 - .../tpw8127_c_mlc/lens/inc/BU6424AF.h | 43 - .../tpw8127_c_mlc/lens/inc/BU6429AF.h | 43 - .../tpw8127_c_mlc/lens/inc/DW9714AF.h | 81 - .../tpw8127_c_mlc/lens/inc/DW9718AF.h | 81 - .../tpw8127_c_mlc/lens/inc/FM50AF.h | 43 - .../tpw8127_c_mlc/lens/inc/MT9P017AF.h | 41 - .../tpw8127_c_mlc/lens/inc/OV8825AF.h | 41 - .../tpw8127_c_mlc/magnetometer/Makefile | 3 - .../tpw8127_c_mlc/magnetometer/akm09911.c | 2788 ----------- .../tpw8127_c_mlc/magnetometer/akm09911.h | 414 -- .../tpw8127_c_mlc/magnetometer/cust_mag.c | 25 - .../tpw8127_c_mlc/magnetometer/inc/cust_mag.h | 20 - .../tpw8127_c_mlc/magnetometer/mag.c | 1011 ---- .../tpw8127_c_mlc/magnetometer/mag.h | 141 - .../tpw8127_c_mlc/power/cust_battery_meter.h | 133 - .../power/cust_battery_meter_table.h | 1068 ----- .../tpw8127_c_mlc/power/cust_charging.h | 123 - .../tpw8127_c_mlc/power/cust_diso.h | 58 - .../mach-mt8127/tpw8127_c_mlc/power/cust_pe.h | 21 - .../tpw8127_c_mlc/power/cust_pmic.h | 5 - .../mach-mt8127/tpw8127_c_mlc/rtc/rtc-mt.h | 34 - .../mach-mt8127/tpw8127_c_mlc/sound/Makefile | 4 - .../sound/inc/external_codec_driver.h | 104 - .../sound/inc/yusu_android_speaker.h | 146 - .../sound/yusu_android_speaker.c | 258 -- .../mach-mt8127/tpw8127_c_mlc/ssw/Makefile | 4 - .../mach-mt8127/tpw8127_c_mlc/ssw/inc/ssw.h | 59 - .../tpw8127_c_mlc/ssw/sim_switch.c | 349 -- .../tpw8127_c_mlc/touchpanel/Makefile | 14 - .../tpw8127_c_mlc/touchpanel/goodix_tool.c | 829 ---- .../tpw8127_c_mlc/touchpanel/gt9xx_driver.c | 3350 ------------- .../tpw8127_c_mlc/touchpanel/gt9xx_firmware.h | 39 - .../tpw8127_c_mlc/touchpanel/gt9xx_update.c | 3986 ---------------- .../tpw8127_c_mlc/touchpanel/mtk_tpd.c | 450 -- .../tpw8127_c_mlc/touchpanel/tpd.h | 145 - .../tpw8127_c_mlc/touchpanel/tpd_button.c | 114 - .../tpw8127_c_mlc/touchpanel/tpd_calibrate.c | 50 - .../tpw8127_c_mlc/touchpanel/tpd_calibrate.h | 19 - .../touchpanel/tpd_custom_gt9xx.h | 409 -- .../tpw8127_c_mlc/touchpanel/tpd_debug.c | 453 -- .../tpw8127_c_mlc/touchpanel/tpd_debug.h | 131 - .../tpw8127_c_mlc/touchpanel/tpd_default.c | 10 - .../tpw8127_c_mlc/touchpanel/tpd_default.h | 5 - .../tpw8127_c_mlc/touchpanel/tpd_init.c | 1 - .../tpw8127_c_mlc/touchpanel/tpd_misc.c | 39 - .../tpw8127_c_mlc/touchpanel/tpd_setting.c | 62 - .../tpw8127_c_mlc/vibrator/Makefile | 4 - .../tpw8127_c_mlc/vibrator/cust_vibrator.c | 18 - .../tpw8127_c_mlc/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/tpw8127_tb_c_l/Makefile | 44 - .../tpw8127_tb_c_l/accdet/accdet_custom.h | 14 - .../tpw8127_tb_c_l/accdet/accdet_custom_def.h | 15 - .../tpw8127_tb_c_l/accelerometer/Makefile | 3 - .../tpw8127_tb_c_l/accelerometer/accel.c | 795 ---- .../tpw8127_tb_c_l/accelerometer/accel.h | 123 - .../tpw8127_tb_c_l/accelerometer/cust_acc.c | 18 - .../accelerometer/inc/cust_acc.h | 22 - .../tpw8127_tb_c_l/accelerometer/mpu6050.c | 2249 --------- .../tpw8127_tb_c_l/accelerometer/mpu6050.h | 60 - .../tpw8127_tb_c_l/alsps/APDS9930.c | 1990 -------- .../tpw8127_tb_c_l/alsps/APDS9930.h | 60 - .../mach-mt8127/tpw8127_tb_c_l/alsps/Makefile | 4 - .../mach-mt8127/tpw8127_tb_c_l/alsps/alsps.c | 1094 ----- .../mach-mt8127/tpw8127_tb_c_l/alsps/alsps.h | 153 - .../tpw8127_tb_c_l/alsps/cust_alsps.c | 27 - .../tpw8127_tb_c_l/alsps/inc/cust_alsps.h | 42 - .../tpw8127_tb_c_l/cam_cal/Makefile | 3 - .../tpw8127_tb_c_l/cam_cal/dummy_cam_cal.c | 647 --- .../tpw8127_tb_c_l/cam_cal/dummy_cam_cal.h | 30 - .../tpw8127_tb_c_l/cam_cal/inc/cam_cal.h | 27 - .../cam_cal/inc/cam_cal_define.h | 10 - .../tpw8127_tb_c_l/camera/camera/Makefile | 4 - .../tpw8127_tb_c_l/camera/camera/dummyds.c | 0 .../camera/camera/kd_camera_hw.c | 335 -- .../camera/camera/kd_camera_hw.h | 78 - .../tpw8127_tb_c_l/common/partition_define.h | 135 - .../common/partition_define_private.h | 38 - .../mach-mt8127/tpw8127_tb_c_l/common/pmt.h | 91 - .../mach-mt8127/tpw8127_tb_c_l/core/Makefile | 4 - .../tpw8127_tb_c_l/core/board-custom.h | 119 - .../mach-mt8127/tpw8127_tb_c_l/core/board.c | 845 ---- .../tpw8127_tb_c_l/core/logger_custom.h | 13 - .../tpw8127_tb_c_l/dct/dct/Makefile | 4 - .../tpw8127_tb_c_l/dct/dct/codegen.dws | Bin 23493 -> 0 bytes .../tpw8127_tb_c_l/eeprom/Makefile | 4 - .../tpw8127_tb_c_l/eeprom/dummy_eeprom.c | 643 --- .../tpw8127_tb_c_l/eeprom/dummy_eeprom.h | 30 - .../tpw8127_tb_c_l/eeprom/inc/eeprom.h | 27 - .../tpw8127_tb_c_l/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- .../tpw8127_tb_c_l/gyroscope/Makefile | 4 - .../tpw8127_tb_c_l/gyroscope/cust_gyro.c | 31 - .../tpw8127_tb_c_l/gyroscope/gyroscope.c | 799 ---- .../tpw8127_tb_c_l/gyroscope/gyroscope.h | 116 - .../tpw8127_tb_c_l/gyroscope/inc/cust_gyro.h | 23 - .../tpw8127_tb_c_l/gyroscope/mpu6050.c | 1869 -------- .../tpw8127_tb_c_l/gyroscope/mpu6050.h | 84 - .../mach-mt8127/tpw8127_tb_c_l/hdmi/Makefile | 4 - .../tpw8127_tb_c_l/hdmi/hdmi_cust.c | 151 - .../tpw8127_tb_c_l/hdmi/hdmi_cust.h | 67 - .../tpw8127_tb_c_l/hdmi/inc/hdmi_drv.h | 226 - .../tpw8127_tb_c_l/headset/Makefile | 4 - .../tpw8127_tb_c_l/headset/accdet_custom.c | 28 - .../tpw8127_tb_c_l/headset/accdet_custom.h | 14 - .../headset/accdet_custom_def.h | 15 - .../tpw8127_tb_c_l/keypad/Makefile | 3 - .../tpw8127_tb_c_l/keypad/mtk_kpd.h | 87 - .../tpw8127_tb_c_l/keypad/mtk_kpd_bkl.c | 52 - .../lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- .../mach-mt8127/tpw8127_tb_c_l/lcm/Makefile | 4 - .../tpw8127_tb_c_l/lcm/inc/lcm_drv.h | 634 --- .../tpw8127_tb_c_l/lcm/inc/mt8193_lvds.h | 357 -- .../tpw8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h | 29 - .../tpw8127_tb_c_l/lcm/mt65xx_lcm_list.c | 964 ---- .../mach-mt8127/tpw8127_tb_c_l/leds/Makefile | 5 - .../tpw8127_tb_c_l/leds/mt65xx/Makefile | 3 - .../tpw8127_tb_c_l/leds/mt65xx/cust_leds.c | 128 - .../tpw8127_tb_c_l/leds/mt65xx/cust_leds.h | 20 - .../leds/mt65xx/cust_leds_def.h | 53 - .../mach-mt8127/tpw8127_tb_c_l/lens/Makefile | 3 - .../tpw8127_tb_c_l/lens/dummy_lens.c | 40 - .../tpw8127_tb_c_l/lens/inc/AD5820AF.h | 43 - .../tpw8127_tb_c_l/lens/inc/AD5823.h | 43 - .../tpw8127_tb_c_l/lens/inc/AD5823AF.h | 43 - .../tpw8127_tb_c_l/lens/inc/BU6424AF.h | 43 - .../tpw8127_tb_c_l/lens/inc/BU6429AF.h | 43 - .../tpw8127_tb_c_l/lens/inc/DW9714AF.h | 81 - .../tpw8127_tb_c_l/lens/inc/DW9718AF.h | 81 - .../tpw8127_tb_c_l/lens/inc/FM50AF.h | 43 - .../tpw8127_tb_c_l/lens/inc/MT9P017AF.h | 41 - .../tpw8127_tb_c_l/lens/inc/OV8825AF.h | 41 - .../tpw8127_tb_c_l/magnetometer/Makefile | 3 - .../tpw8127_tb_c_l/magnetometer/akm09911.c | 2788 ----------- .../tpw8127_tb_c_l/magnetometer/akm09911.h | 414 -- .../tpw8127_tb_c_l/magnetometer/cust_mag.c | 25 - .../magnetometer/inc/cust_mag.h | 20 - .../tpw8127_tb_c_l/magnetometer/mag.c | 1011 ---- .../tpw8127_tb_c_l/magnetometer/mag.h | 141 - .../tpw8127_tb_c_l/power/cust_battery_meter.h | 133 - .../power/cust_battery_meter_table.h | 1068 ----- .../tpw8127_tb_c_l/power/cust_charging.h | 123 - .../tpw8127_tb_c_l/power/cust_diso.h | 58 - .../tpw8127_tb_c_l/power/cust_pe.h | 21 - .../tpw8127_tb_c_l/power/cust_pmic.h | 5 - .../mach-mt8127/tpw8127_tb_c_l/rtc/rtc-mt.h | 34 - .../mach-mt8127/tpw8127_tb_c_l/sound/Makefile | 4 - .../sound/inc/external_codec_driver.h | 104 - .../sound/inc/yusu_android_speaker.h | 146 - .../sound/yusu_android_speaker.c | 258 -- .../mach-mt8127/tpw8127_tb_c_l/ssw/Makefile | 4 - .../mach-mt8127/tpw8127_tb_c_l/ssw/inc/ssw.h | 59 - .../tpw8127_tb_c_l/ssw/sim_switch.c | 349 -- .../tpw8127_tb_c_l/touchpanel/Makefile | 14 - .../tpw8127_tb_c_l/touchpanel/goodix_tool.c | 829 ---- .../tpw8127_tb_c_l/touchpanel/gt9xx_driver.c | 3350 ------------- .../touchpanel/gt9xx_firmware.h | 39 - .../tpw8127_tb_c_l/touchpanel/gt9xx_update.c | 3986 ---------------- .../tpw8127_tb_c_l/touchpanel/mtk_tpd.c | 450 -- .../tpw8127_tb_c_l/touchpanel/tpd.h | 145 - .../tpw8127_tb_c_l/touchpanel/tpd_button.c | 114 - .../tpw8127_tb_c_l/touchpanel/tpd_calibrate.c | 50 - .../tpw8127_tb_c_l/touchpanel/tpd_calibrate.h | 19 - .../touchpanel/tpd_custom_gt9xx.h | 409 -- .../tpw8127_tb_c_l/touchpanel/tpd_debug.c | 453 -- .../tpw8127_tb_c_l/touchpanel/tpd_debug.h | 131 - .../tpw8127_tb_c_l/touchpanel/tpd_default.c | 10 - .../tpw8127_tb_c_l/touchpanel/tpd_default.h | 5 - .../tpw8127_tb_c_l/touchpanel/tpd_init.c | 1 - .../tpw8127_tb_c_l/touchpanel/tpd_misc.c | 39 - .../tpw8127_tb_c_l/touchpanel/tpd_setting.c | 62 - .../tpw8127_tb_c_l/vibrator/Makefile | 4 - .../tpw8127_tb_c_l/vibrator/cust_vibrator.c | 18 - .../tpw8127_tb_c_l/vibrator/cust_vibrator.h | 24 - arch/arm/mach-mt8127/ttab/Makefile | 44 - .../mach-mt8127/ttab/accdet/accdet_custom.h | 14 - .../ttab/accdet/accdet_custom_def.h | 15 - .../mach-mt8127/ttab/accelerometer/Makefile | 3 - .../mach-mt8127/ttab/accelerometer/accel.c | 795 ---- .../mach-mt8127/ttab/accelerometer/accel.h | 123 - .../mach-mt8127/ttab/accelerometer/cust_acc.c | 18 - .../ttab/accelerometer/inc/cust_acc.h | 22 - .../mach-mt8127/ttab/accelerometer/mpu6050.c | 2249 --------- .../mach-mt8127/ttab/accelerometer/mpu6050.h | 60 - arch/arm/mach-mt8127/ttab/alsps/APDS9930.c | 1990 -------- arch/arm/mach-mt8127/ttab/alsps/APDS9930.h | 60 - arch/arm/mach-mt8127/ttab/alsps/Makefile | 4 - arch/arm/mach-mt8127/ttab/alsps/alsps.c | 1094 ----- arch/arm/mach-mt8127/ttab/alsps/alsps.h | 153 - arch/arm/mach-mt8127/ttab/alsps/cust_alsps.c | 27 - .../mach-mt8127/ttab/alsps/inc/cust_alsps.h | 42 - arch/arm/mach-mt8127/ttab/cam_cal/Makefile | 3 - .../mach-mt8127/ttab/cam_cal/dummy_cam_cal.c | 647 --- .../mach-mt8127/ttab/cam_cal/dummy_cam_cal.h | 30 - .../mach-mt8127/ttab/cam_cal/inc/cam_cal.h | 27 - .../ttab/cam_cal/inc/cam_cal_define.h | 10 - .../mach-mt8127/ttab/camera/camera/Makefile | 4 - .../mach-mt8127/ttab/camera/camera/dummyds.c | 0 .../ttab/camera/camera/kd_camera_hw.c | 326 -- .../ttab/camera/camera/kd_camera_hw.h | 78 - .../ttab/common/partition_define.h | 135 - .../ttab/common/partition_define_private.h | 38 - arch/arm/mach-mt8127/ttab/common/pmt.h | 91 - arch/arm/mach-mt8127/ttab/core/Makefile | 4 - arch/arm/mach-mt8127/ttab/core/board-custom.h | 119 - arch/arm/mach-mt8127/ttab/core/board.c | 845 ---- .../arm/mach-mt8127/ttab/core/logger_custom.h | 13 - arch/arm/mach-mt8127/ttab/dct/dct/Makefile | 4 - arch/arm/mach-mt8127/ttab/dct/dct/codegen.dws | Bin 23537 -> 0 bytes .../mach-mt8127/ttab/dct/dct/inc/cust_adc.h | 15 - .../mach-mt8127/ttab/dct/dct/inc/cust_eint.h | 79 - .../ttab/dct/dct/inc/cust_eint_ext.h | 34 - .../ttab/dct/dct/inc/cust_gpio_boot.h | 1348 ------ .../ttab/dct/dct/inc/cust_gpio_usage.h | 205 - .../mach-mt8127/ttab/dct/dct/inc/cust_kpd.h | 106 - .../mach-mt8127/ttab/dct/dct/inc/cust_power.h | 9 - .../mach-mt8127/ttab/dct/dct/inc/pmic_drv.h | 30 - arch/arm/mach-mt8127/ttab/dct/dct/pmic_drv.c | 16 - arch/arm/mach-mt8127/ttab/eeprom/Makefile | 4 - .../mach-mt8127/ttab/eeprom/dummy_eeprom.c | 643 --- .../mach-mt8127/ttab/eeprom/dummy_eeprom.h | 30 - arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom.h | 27 - .../ttab/eeprom/inc/eeprom_define.h | 12 - .../flashlight/constant_flashlight/Makefile | 3 - .../constant_flashlight/leds_strobe.c | 401 -- arch/arm/mach-mt8127/ttab/gyroscope/Makefile | 4 - .../mach-mt8127/ttab/gyroscope/cust_gyro.c | 31 - .../mach-mt8127/ttab/gyroscope/gyroscope.c | 799 ---- .../mach-mt8127/ttab/gyroscope/gyroscope.h | 116 - .../ttab/gyroscope/inc/cust_gyro.h | 23 - arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.c | 1869 -------- arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.h | 84 - arch/arm/mach-mt8127/ttab/hdmi/Makefile | 4 - arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.c | 151 - arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.h | 67 - arch/arm/mach-mt8127/ttab/hdmi/inc/hdmi_drv.h | 226 - arch/arm/mach-mt8127/ttab/headset/Makefile | 4 - .../mach-mt8127/ttab/headset/accdet_custom.c | 28 - .../mach-mt8127/ttab/headset/accdet_custom.h | 14 - .../ttab/headset/accdet_custom_def.h | 15 - arch/arm/mach-mt8127/ttab/keypad/Makefile | 3 - arch/arm/mach-mt8127/ttab/keypad/mtk_kpd.h | 87 - .../arm/mach-mt8127/ttab/keypad/mtk_kpd_bkl.c | 52 - .../ttab/lcm/CPT_CLAP070WP03XG_LVDS.c | 391 -- arch/arm/mach-mt8127/ttab/lcm/Makefile | 4 - arch/arm/mach-mt8127/ttab/lcm/inc/lcm_drv.h | 634 --- .../mach-mt8127/ttab/lcm/inc/mt8193_lvds.h | 357 -- .../mach-mt8127/ttab/lcm/inc/sn65dsi83_i2c.h | 29 - .../mach-mt8127/ttab/lcm/mt65xx_lcm_list.c | 964 ---- arch/arm/mach-mt8127/ttab/leds/Makefile | 5 - .../arm/mach-mt8127/ttab/leds/mt65xx/Makefile | 3 - .../mach-mt8127/ttab/leds/mt65xx/cust_leds.c | 131 - .../mach-mt8127/ttab/leds/mt65xx/cust_leds.h | 20 - .../ttab/leds/mt65xx/cust_leds_def.h | 53 - arch/arm/mach-mt8127/ttab/lens/Makefile | 3 - arch/arm/mach-mt8127/ttab/lens/dummy_lens.c | 40 - arch/arm/mach-mt8127/ttab/lens/inc/AD5820AF.h | 43 - arch/arm/mach-mt8127/ttab/lens/inc/AD5823.h | 43 - arch/arm/mach-mt8127/ttab/lens/inc/AD5823AF.h | 43 - arch/arm/mach-mt8127/ttab/lens/inc/BU6424AF.h | 43 - arch/arm/mach-mt8127/ttab/lens/inc/BU6429AF.h | 43 - arch/arm/mach-mt8127/ttab/lens/inc/DW9714AF.h | 81 - arch/arm/mach-mt8127/ttab/lens/inc/DW9718AF.h | 81 - arch/arm/mach-mt8127/ttab/lens/inc/FM50AF.h | 43 - .../arm/mach-mt8127/ttab/lens/inc/MT9P017AF.h | 41 - arch/arm/mach-mt8127/ttab/lens/inc/OV8825AF.h | 41 - .../mach-mt8127/ttab/magnetometer/Makefile | 3 - .../mach-mt8127/ttab/magnetometer/akm09911.c | 2788 ----------- .../mach-mt8127/ttab/magnetometer/akm09911.h | 414 -- .../mach-mt8127/ttab/magnetometer/cust_mag.c | 25 - .../ttab/magnetometer/inc/cust_mag.h | 20 - arch/arm/mach-mt8127/ttab/magnetometer/mag.c | 1011 ---- arch/arm/mach-mt8127/ttab/magnetometer/mag.h | 141 - .../ttab/power/cust_battery_meter.h | 144 - .../ttab/power/cust_battery_meter_table.h | 1053 ----- .../mach-mt8127/ttab/power/cust_charging.h | 133 - arch/arm/mach-mt8127/ttab/power/cust_diso.h | 58 - arch/arm/mach-mt8127/ttab/power/cust_pe.h | 21 - arch/arm/mach-mt8127/ttab/power/cust_pmic.h | 5 - arch/arm/mach-mt8127/ttab/rtc/rtc-mt.h | 34 - arch/arm/mach-mt8127/ttab/sound/Makefile | 4 - .../ttab/sound/inc/external_codec_driver.h | 104 - .../ttab/sound/inc/yusu_android_speaker.h | 146 - .../ttab/sound/yusu_android_speaker.c | 258 -- arch/arm/mach-mt8127/ttab/ssw/Makefile | 4 - arch/arm/mach-mt8127/ttab/ssw/inc/ssw.h | 59 - arch/arm/mach-mt8127/ttab/ssw/sim_switch.c | 349 -- arch/arm/mach-mt8127/ttab/touchpanel/Makefile | 14 - .../mach-mt8127/ttab/touchpanel/goodix_tool.c | 620 --- .../ttab/touchpanel/gt9xx_driver.c | 4058 ---------------- .../ttab/touchpanel/gt9xx_firmware.h | 2493 ---------- .../ttab/touchpanel/gt9xx_update.c | 3672 --------------- .../arm/mach-mt8127/ttab/touchpanel/mtk_tpd.c | 562 --- arch/arm/mach-mt8127/ttab/touchpanel/tpd.h | 145 - .../mach-mt8127/ttab/touchpanel/tpd_button.c | 114 - .../ttab/touchpanel/tpd_calibrate.c | 50 - .../ttab/touchpanel/tpd_calibrate.h | 19 - .../ttab/touchpanel/tpd_custom_gt9xx.h | 416 -- .../mach-mt8127/ttab/touchpanel/tpd_debug.c | 453 -- .../mach-mt8127/ttab/touchpanel/tpd_debug.h | 131 - .../mach-mt8127/ttab/touchpanel/tpd_default.c | 10 - .../mach-mt8127/ttab/touchpanel/tpd_default.h | 5 - .../mach-mt8127/ttab/touchpanel/tpd_init.c | 1 - .../mach-mt8127/ttab/touchpanel/tpd_misc.c | 39 - .../mach-mt8127/ttab/touchpanel/tpd_setting.c | 62 - arch/arm/mach-mt8127/ttab/vibrator/Makefile | 4 - .../mach-mt8127/ttab/vibrator/cust_vibrator.c | 18 - .../mach-mt8127/ttab/vibrator/cust_vibrator.h | 24 - arch/arm64/boot/dts/Makefile | 39 - arch/arm64/boot/dts/foundation-v8.dts | 232 - arch/arm64/boot/dts/rtsm_ve-aemv8a.dts | 159 - arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi | 234 - arch/arm64/boot/dts/skeleton.dtsi | 13 - arch/arm64/configs/defconfig | 89 - .../configs/k6752v1_op01_pre_debug_defconfig | 3024 ------------ arch/arm64/configs/k6752v1_op01_pre_defconfig | 2973 ------------ .../configs/k6752v1_op02_pre_debug_defconfig | 3024 ------------ arch/arm64/configs/k6752v1_op02_pre_defconfig | 2973 ------------ 1158 files changed, 362995 deletions(-) delete mode 100644 arch/arm/configs/acs5k_defconfig delete mode 100644 arch/arm/configs/acs5k_tiny_defconfig delete mode 100644 arch/arm/configs/ag5evm_defconfig delete mode 100644 arch/arm/configs/am200epdkit_defconfig delete mode 100644 arch/arm/configs/ap4evb_defconfig delete mode 100644 arch/arm/configs/ape6evm_defconfig delete mode 100644 arch/arm/configs/armadillo800eva_defconfig delete mode 100644 arch/arm/configs/assabet_defconfig delete mode 100644 arch/arm/configs/at91_dt_defconfig delete mode 100644 arch/arm/configs/at91rm9200_defconfig delete mode 100644 arch/arm/configs/at91sam9260_defconfig delete mode 100644 arch/arm/configs/at91sam9261_defconfig delete mode 100644 arch/arm/configs/at91sam9263_defconfig delete mode 100644 arch/arm/configs/at91sam9g20_defconfig delete mode 100644 arch/arm/configs/at91sam9g45_defconfig delete mode 100644 arch/arm/configs/at91sam9rl_defconfig delete mode 100644 arch/arm/configs/at91x40_defconfig delete mode 100644 arch/arm/configs/badge4_defconfig delete mode 100644 arch/arm/configs/bcm2835_defconfig delete mode 100644 arch/arm/configs/bcm_defconfig delete mode 100644 arch/arm/configs/bockw_defconfig delete mode 100644 arch/arm/configs/bonito_defconfig delete mode 100644 arch/arm/configs/cerfcube_defconfig delete mode 100644 arch/arm/configs/clps711x_defconfig delete mode 100644 arch/arm/configs/cm_x2xx_defconfig delete mode 100644 arch/arm/configs/cm_x300_defconfig delete mode 100644 arch/arm/configs/cns3420vb_defconfig delete mode 100644 arch/arm/configs/colibri_pxa270_defconfig delete mode 100644 arch/arm/configs/colibri_pxa300_defconfig delete mode 100644 arch/arm/configs/collie_defconfig delete mode 100644 arch/arm/configs/corgi_defconfig delete mode 100644 arch/arm/configs/da8xx_omapl_defconfig delete mode 100644 arch/arm/configs/davinci_all_defconfig delete mode 100644 arch/arm/configs/dove_defconfig delete mode 100644 arch/arm/configs/ebsa110_defconfig delete mode 100644 arch/arm/configs/em_x270_defconfig delete mode 100644 arch/arm/configs/ep93xx_defconfig delete mode 100644 arch/arm/configs/eseries_pxa_defconfig delete mode 100644 arch/arm/configs/exynos4_defconfig delete mode 100644 arch/arm/configs/exynos_defconfig delete mode 100644 arch/arm/configs/ezx_defconfig delete mode 100644 arch/arm/configs/footbridge_defconfig delete mode 100644 arch/arm/configs/h3600_defconfig delete mode 100644 arch/arm/configs/h5000_defconfig delete mode 100644 arch/arm/configs/hackkit_defconfig delete mode 100644 arch/arm/configs/imote2_defconfig delete mode 100644 arch/arm/configs/imx_v4_v5_defconfig delete mode 100644 arch/arm/configs/imx_v6_v7_defconfig delete mode 100644 arch/arm/configs/integrator_defconfig delete mode 100644 arch/arm/configs/iop13xx_defconfig delete mode 100644 arch/arm/configs/iop32x_defconfig delete mode 100644 arch/arm/configs/iop33x_defconfig delete mode 100644 arch/arm/configs/ixp4xx_defconfig delete mode 100644 arch/arm/configs/jornada720_defconfig delete mode 100644 arch/arm/configs/kirkwood_defconfig delete mode 100644 arch/arm/configs/kota2_defconfig delete mode 100755 arch/arm/configs/kr076_debug_defconfig delete mode 100755 arch/arm/configs/kr076_defconfig delete mode 100644 arch/arm/configs/kr076_nand_debug_defconfig delete mode 100644 arch/arm/configs/kr076_nand_defconfig delete mode 100644 arch/arm/configs/ks8695_defconfig delete mode 100644 arch/arm/configs/kzm9d_defconfig delete mode 100644 arch/arm/configs/kzm9g_defconfig delete mode 100644 arch/arm/configs/lart_defconfig delete mode 100644 arch/arm/configs/lpc32xx_defconfig delete mode 100644 arch/arm/configs/lpd270_defconfig delete mode 100644 arch/arm/configs/lubbock_defconfig delete mode 100644 arch/arm/configs/mackerel_defconfig delete mode 100644 arch/arm/configs/magician_defconfig delete mode 100644 arch/arm/configs/mainstone_defconfig delete mode 100644 arch/arm/configs/marzen_defconfig delete mode 100644 arch/arm/configs/mini2440_defconfig delete mode 100644 arch/arm/configs/mmp2_defconfig delete mode 100644 arch/arm/configs/msm_defconfig delete mode 100644 arch/arm/configs/multi_v7_defconfig delete mode 100644 arch/arm/configs/mv78xx0_defconfig delete mode 100644 arch/arm/configs/mvebu_defconfig delete mode 100644 arch/arm/configs/mxs_defconfig delete mode 100644 arch/arm/configs/neponset_defconfig delete mode 100644 arch/arm/configs/netwinder_defconfig delete mode 100644 arch/arm/configs/netx_defconfig delete mode 100644 arch/arm/configs/nhk8815_defconfig delete mode 100644 arch/arm/configs/nuc910_defconfig delete mode 100644 arch/arm/configs/nuc950_defconfig delete mode 100644 arch/arm/configs/nuc960_defconfig delete mode 100644 arch/arm/configs/omap1_defconfig delete mode 100644 arch/arm/configs/omap2plus_defconfig delete mode 100644 arch/arm/configs/orion5x_defconfig delete mode 100644 arch/arm/configs/palmz72_defconfig delete mode 100644 arch/arm/configs/pcm027_defconfig delete mode 100755 arch/arm/configs/pixi3_10_debug_defconfig delete mode 100755 arch/arm/configs/pixi3_10_defconfig delete mode 100644 arch/arm/configs/pleb_defconfig delete mode 100644 arch/arm/configs/prima2_defconfig delete mode 100644 arch/arm/configs/pxa168_defconfig delete mode 100644 arch/arm/configs/pxa255-idp_defconfig delete mode 100644 arch/arm/configs/pxa3xx_defconfig delete mode 100644 arch/arm/configs/pxa910_defconfig delete mode 100644 arch/arm/configs/raumfeld_defconfig delete mode 100644 arch/arm/configs/realview-smp_defconfig delete mode 100644 arch/arm/configs/realview_defconfig delete mode 100644 arch/arm/configs/rpc_defconfig delete mode 100644 arch/arm/configs/s3c2410_defconfig delete mode 100644 arch/arm/configs/s3c6400_defconfig delete mode 100644 arch/arm/configs/s5p64x0_defconfig delete mode 100644 arch/arm/configs/s5pc100_defconfig delete mode 100644 arch/arm/configs/s5pv210_defconfig delete mode 100644 arch/arm/configs/sama5_defconfig delete mode 100644 arch/arm/configs/shannon_defconfig delete mode 100644 arch/arm/configs/shark_defconfig delete mode 100644 arch/arm/configs/simpad_defconfig delete mode 100644 arch/arm/configs/socfpga_defconfig delete mode 100644 arch/arm/configs/spear13xx_defconfig delete mode 100644 arch/arm/configs/spear3xx_defconfig delete mode 100644 arch/arm/configs/spear6xx_defconfig delete mode 100644 arch/arm/configs/spitz_defconfig delete mode 100755 arch/arm/configs/tcl8127_c_mlc_debug_defconfig delete mode 100755 arch/arm/configs/tcl8127_c_mlc_defconfig delete mode 100755 arch/arm/configs/tcl8127_tb_c_l_debug_defconfig delete mode 100755 arch/arm/configs/tcl8127_tb_c_l_defconfig delete mode 100644 arch/arm/configs/tct_hammer_defconfig delete mode 100644 arch/arm/configs/tegra_defconfig delete mode 100755 arch/arm/configs/tpw8127_c_mlc_debug_defconfig delete mode 100755 arch/arm/configs/tpw8127_c_mlc_defconfig delete mode 100755 arch/arm/configs/tpw8127_tb_c_l_debug_defconfig delete mode 100755 arch/arm/configs/tpw8127_tb_c_l_defconfig delete mode 100644 arch/arm/configs/trizeps4_defconfig delete mode 100644 arch/arm/configs/ttab_debug_defconfig delete mode 100644 arch/arm/configs/ttab_defconfig delete mode 100644 arch/arm/configs/u300_defconfig delete mode 100644 arch/arm/configs/u8500_defconfig delete mode 100644 arch/arm/configs/versatile_defconfig delete mode 100644 arch/arm/configs/vexpress_defconfig delete mode 100644 arch/arm/configs/viper_defconfig delete mode 100644 arch/arm/configs/xcep_defconfig delete mode 100644 arch/arm/configs/zeus_defconfig delete mode 100755 arch/arm/mach-mt8127/kr076/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/kr076/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/kr076/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/kr076/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/kr076/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/kr076/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/kr076/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/kr076/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/kr076/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/kr076/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/kr076/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/kr076/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/kr076/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/kr076/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/kr076/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/kr076/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/kr076/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/kr076/core/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/kr076/core/board.c delete mode 100644 arch/arm/mach-mt8127/kr076/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/kr076/dct/dct/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/kr076/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/kr076/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/kr076/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/kr076/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/kr076/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/kr076/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/kr076/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/kr076/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/kr076/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/kr076/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/kr076/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/kr076/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/kr076/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/kr076/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/kr076/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/kr076/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/kr076/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/kr076/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/kr076/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/kr076/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/kr076/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/kr076/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/kr076/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/kr076/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/kr076/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/kr076/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/kr076/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/kr076/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/kr076/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/kr076/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/kr076/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/kr076/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/kr076/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/kr076/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/kr076/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/kr076/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/kr076/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/kr076/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/kr076/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/kr076/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/common/combo_nand.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/core/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/core/board.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/dct/dct/Makefile delete mode 100755 arch/arm/mach-mt8127/kr076_nand/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/kr076_nand/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/kr076_nand/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/kr076_nand/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/kr076_nand/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/kr076_nand/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/kr076_nand/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/kr076_nand/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/kr076_nand/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/core/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/core/board.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/dct/dct/Makefile delete mode 100755 arch/arm/mach-mt8127/pixi3_10/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/pixi3_10/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/pixi3_10/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/pixi3_10/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/pixi3_10/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/pixi3_10/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/pixi3_10/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/pixi3_10/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/pixi3_10/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/common/combo_nand.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/core/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/core/board.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/Makefile delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/core/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/Makefile delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/common/combo_nand.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/core/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/core/board.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/Makefile delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/core/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/Makefile delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/codegen.dws delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.h delete mode 100755 arch/arm/mach-mt8127/ttab/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/accdet/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/ttab/accdet/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/ttab/accelerometer/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/accelerometer/accel.c delete mode 100644 arch/arm/mach-mt8127/ttab/accelerometer/accel.h delete mode 100644 arch/arm/mach-mt8127/ttab/accelerometer/cust_acc.c delete mode 100644 arch/arm/mach-mt8127/ttab/accelerometer/inc/cust_acc.h delete mode 100644 arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/ttab/alsps/APDS9930.c delete mode 100644 arch/arm/mach-mt8127/ttab/alsps/APDS9930.h delete mode 100755 arch/arm/mach-mt8127/ttab/alsps/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/alsps/alsps.c delete mode 100644 arch/arm/mach-mt8127/ttab/alsps/alsps.h delete mode 100644 arch/arm/mach-mt8127/ttab/alsps/cust_alsps.c delete mode 100644 arch/arm/mach-mt8127/ttab/alsps/inc/cust_alsps.h delete mode 100755 arch/arm/mach-mt8127/ttab/cam_cal/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.c delete mode 100644 arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.h delete mode 100644 arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal.h delete mode 100644 arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal_define.h delete mode 100755 arch/arm/mach-mt8127/ttab/camera/camera/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/camera/camera/dummyds.c delete mode 100644 arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.c delete mode 100644 arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.h delete mode 100644 arch/arm/mach-mt8127/ttab/common/partition_define.h delete mode 100644 arch/arm/mach-mt8127/ttab/common/partition_define_private.h delete mode 100644 arch/arm/mach-mt8127/ttab/common/pmt.h delete mode 100755 arch/arm/mach-mt8127/ttab/core/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/core/board-custom.h delete mode 100644 arch/arm/mach-mt8127/ttab/core/board.c delete mode 100644 arch/arm/mach-mt8127/ttab/core/logger_custom.h delete mode 100755 arch/arm/mach-mt8127/ttab/dct/dct/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/codegen.dws delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_adc.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint_ext.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_boot.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_usage.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_kpd.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_power.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/inc/pmic_drv.h delete mode 100644 arch/arm/mach-mt8127/ttab/dct/dct/pmic_drv.c delete mode 100755 arch/arm/mach-mt8127/ttab/eeprom/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.c delete mode 100644 arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.h delete mode 100644 arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom.h delete mode 100644 arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom_define.h delete mode 100644 arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/leds_strobe.c delete mode 100755 arch/arm/mach-mt8127/ttab/gyroscope/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/gyroscope/cust_gyro.c delete mode 100644 arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.c delete mode 100644 arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.h delete mode 100644 arch/arm/mach-mt8127/ttab/gyroscope/inc/cust_gyro.h delete mode 100644 arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.c delete mode 100644 arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.h delete mode 100644 arch/arm/mach-mt8127/ttab/hdmi/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.c delete mode 100644 arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.h delete mode 100644 arch/arm/mach-mt8127/ttab/hdmi/inc/hdmi_drv.h delete mode 100755 arch/arm/mach-mt8127/ttab/headset/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/headset/accdet_custom.c delete mode 100644 arch/arm/mach-mt8127/ttab/headset/accdet_custom.h delete mode 100644 arch/arm/mach-mt8127/ttab/headset/accdet_custom_def.h delete mode 100755 arch/arm/mach-mt8127/ttab/keypad/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/keypad/mtk_kpd.h delete mode 100644 arch/arm/mach-mt8127/ttab/keypad/mtk_kpd_bkl.c delete mode 100644 arch/arm/mach-mt8127/ttab/lcm/CPT_CLAP070WP03XG_LVDS.c delete mode 100755 arch/arm/mach-mt8127/ttab/lcm/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/lcm/inc/lcm_drv.h delete mode 100644 arch/arm/mach-mt8127/ttab/lcm/inc/mt8193_lvds.h delete mode 100644 arch/arm/mach-mt8127/ttab/lcm/inc/sn65dsi83_i2c.h delete mode 100644 arch/arm/mach-mt8127/ttab/lcm/mt65xx_lcm_list.c delete mode 100755 arch/arm/mach-mt8127/ttab/leds/Makefile delete mode 100755 arch/arm/mach-mt8127/ttab/leds/mt65xx/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.c delete mode 100644 arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.h delete mode 100644 arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds_def.h delete mode 100755 arch/arm/mach-mt8127/ttab/lens/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/lens/dummy_lens.c delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/AD5820AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/AD5823.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/AD5823AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/BU6424AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/BU6429AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/DW9714AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/DW9718AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/FM50AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/MT9P017AF.h delete mode 100644 arch/arm/mach-mt8127/ttab/lens/inc/OV8825AF.h delete mode 100755 arch/arm/mach-mt8127/ttab/magnetometer/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/magnetometer/akm09911.c delete mode 100644 arch/arm/mach-mt8127/ttab/magnetometer/akm09911.h delete mode 100644 arch/arm/mach-mt8127/ttab/magnetometer/cust_mag.c delete mode 100644 arch/arm/mach-mt8127/ttab/magnetometer/inc/cust_mag.h delete mode 100644 arch/arm/mach-mt8127/ttab/magnetometer/mag.c delete mode 100644 arch/arm/mach-mt8127/ttab/magnetometer/mag.h delete mode 100644 arch/arm/mach-mt8127/ttab/power/cust_battery_meter.h delete mode 100644 arch/arm/mach-mt8127/ttab/power/cust_battery_meter_table.h delete mode 100644 arch/arm/mach-mt8127/ttab/power/cust_charging.h delete mode 100644 arch/arm/mach-mt8127/ttab/power/cust_diso.h delete mode 100644 arch/arm/mach-mt8127/ttab/power/cust_pe.h delete mode 100644 arch/arm/mach-mt8127/ttab/power/cust_pmic.h delete mode 100644 arch/arm/mach-mt8127/ttab/rtc/rtc-mt.h delete mode 100755 arch/arm/mach-mt8127/ttab/sound/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/sound/inc/external_codec_driver.h delete mode 100644 arch/arm/mach-mt8127/ttab/sound/inc/yusu_android_speaker.h delete mode 100644 arch/arm/mach-mt8127/ttab/sound/yusu_android_speaker.c delete mode 100755 arch/arm/mach-mt8127/ttab/ssw/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/ssw/inc/ssw.h delete mode 100644 arch/arm/mach-mt8127/ttab/ssw/sim_switch.c delete mode 100755 arch/arm/mach-mt8127/ttab/touchpanel/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/goodix_tool.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_driver.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_firmware.h delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_update.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/mtk_tpd.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd.h delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_button.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.h delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_custom_gt9xx.h delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.h delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.h delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_init.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_misc.c delete mode 100644 arch/arm/mach-mt8127/ttab/touchpanel/tpd_setting.c delete mode 100755 arch/arm/mach-mt8127/ttab/vibrator/Makefile delete mode 100644 arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.c delete mode 100644 arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.h delete mode 100644 arch/arm64/boot/dts/Makefile delete mode 100644 arch/arm64/boot/dts/foundation-v8.dts delete mode 100644 arch/arm64/boot/dts/rtsm_ve-aemv8a.dts delete mode 100644 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi delete mode 100644 arch/arm64/boot/dts/skeleton.dtsi delete mode 100644 arch/arm64/configs/defconfig delete mode 100644 arch/arm64/configs/k6752v1_op01_pre_debug_defconfig delete mode 100644 arch/arm64/configs/k6752v1_op01_pre_defconfig delete mode 100644 arch/arm64/configs/k6752v1_op02_pre_debug_defconfig delete mode 100644 arch/arm64/configs/k6752v1_op02_pre_defconfig diff --git a/arch/arm/configs/acs5k_defconfig b/arch/arm/configs/acs5k_defconfig deleted file mode 100644 index 92b0f90d151..00000000000 --- a/arch/arm/configs/acs5k_defconfig +++ /dev/null @@ -1,86 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_KS8695=y -CONFIG_MACH_KS8695=y -CONFIG_MACH_DSM320=y -CONFIG_MACH_ACS5K=y -# CONFIG_ARM_THUMB is not set -CONFIG_PCI=y -CONFIG_PCI_DEBUG=y -CONFIG_PCCARD=y -CONFIG_YENTA=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw" -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_ARM_KS8695_ETHER=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PRISM54=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_KS8695=y -CONFIG_SERIAL_KS8695_CONSOLE=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PCA953X=y -CONFIG_WATCHDOG=y -CONFIG_KS8695_WATCHDOG=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/acs5k_tiny_defconfig b/arch/arm/configs/acs5k_tiny_defconfig deleted file mode 100644 index 2a27a147463..00000000000 --- a/arch/arm/configs/acs5k_tiny_defconfig +++ /dev/null @@ -1,80 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_KS8695=y -CONFIG_MACH_ACS5K=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyAM0,115200 init=/bin/sh" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_ARM_KS8695_ETHER=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_KS8695=y -CONFIG_SERIAL_KS8695_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PCA953X=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_KS8695_WATCHDOG=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_RUBIN=y -CONFIG_SQUASHFS=y -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/ag5evm_defconfig b/arch/arm/configs/ag5evm_defconfig deleted file mode 100644 index 212ead354a6..00000000000 --- a/arch/arm/configs/ag5evm_defconfig +++ /dev/null @@ -1,83 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_NAMESPACES=y -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_EXPERT=y -CONFIG_SLAB=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_SH73A0=y -CONFIG_MACH_AG5EVM=y -CONFIG_MEMORY_SIZE=0x10000000 -CONFIG_CPU_BPREDICT_DISABLE=y -CONFIG_ARM_ERRATA_430973=y -CONFIG_ARM_ERRATA_458693=y -CONFIG_NO_HZ=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=tty0 console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel" -CONFIG_CMDLINE_FORCE=y -CONFIG_KEXEC=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM=y -# CONFIG_SUSPEND is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_BLK_DEV is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMSC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -CONFIG_INPUT_SPARSEKMAP=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=9 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_SH_MOBILE=y -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_FTRACE is not set diff --git a/arch/arm/configs/am200epdkit_defconfig b/arch/arm/configs/am200epdkit_defconfig deleted file mode 100644 index f0dea52e49c..00000000000 --- a/arch/arm/configs/am200epdkit_defconfig +++ /dev/null @@ -1,108 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOCALVERSION="gum" -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_EXPERT=y -# CONFIG_SYSCTL_SYSCALL is not set -# CONFIG_EPOLL is not set -# CONFIG_SHMEM is not set -# CONFIG_VM_EVENT_COUNTERS is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_ARCH_GUMSTIX=y -CONFIG_PCCARD=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200n8 root=1f01 rootfstype=jffs2" -CONFIG_NET=y -CONFIG_PACKET=m -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PXA2XX=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_IDE=m -CONFIG_BLK_DEV_IDECS=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=m -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_SA1100_WATCHDOG=m -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_FB_MBX=m -CONFIG_FB_VIRTUAL=m -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -CONFIG_SND_PXA2XX_AC97=m -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_MMC=y -CONFIG_MMC_PXA=y -# CONFIG_DNOTIFY is not set -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_RUBIN=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_CRYPTO=y -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_ARC4=m diff --git a/arch/arm/configs/ap4evb_defconfig b/arch/arm/configs/ap4evb_defconfig deleted file mode 100644 index 66894f736d0..00000000000 --- a/arch/arm/configs/ap4evb_defconfig +++ /dev/null @@ -1,56 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_SH7372=y -CONFIG_MACH_AP4EVB=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=sh-sci.0,115200" -CONFIG_KEXEC=y -CONFIG_PM=y -# CONFIG_SUSPEND is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=8 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig deleted file mode 100644 index dab5a7dfadc..00000000000 --- a/arch/arm/configs/ape6evm_defconfig +++ /dev/null @@ -1,95 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_CGROUPS=y -CONFIG_CGROUP_SCHED=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -CONFIG_PERF_EVENTS=y -CONFIG_SLAB=y -# CONFIG_BLOCK is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_R8A73A4=y -CONFIG_MACH_APE6EVM=y -# CONFIG_ARM_THUMB is not set -CONFIG_CPU_BPREDICT_DISABLE=y -CONFIG_PL310_ERRATA_588369=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_SMP=y -CONFIG_SCHED_MC=y -CONFIG_HAVE_ARM_ARCH_TIMER=y -CONFIG_NR_CPUS=8 -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -# CONFIG_HW_PERF_EVENTS is not set -# CONFIG_COMPACTION is not set -# CONFIG_CROSS_MEMORY_ATTACH is not set -CONFIG_ARM_APPENDED_DTB=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6_SIT is not set -CONFIG_NETFILTER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FW_LOADER_USER_HELPER is not set -CONFIG_NETDEVICES=y -# CONFIG_NET_CADENCE is not set -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=12 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_GPIO_SH_PFC=y -CONFIG_GPIOLIB=y -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_RCAR_THERMAL=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -# CONFIG_HID is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_IOMMU_SUPPORT is not set -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_V4_1=y -CONFIG_ROOT_NFS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_ENABLE_DEFAULT_TRACERS=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig deleted file mode 100644 index 0f2d80da737..00000000000 --- a/arch/arm/configs/armadillo800eva_defconfig +++ /dev/null @@ -1,153 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_PID_NS is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_PERF_EVENTS=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_R8A7740=y -CONFIG_MACH_ARMADILLO800EVA=y -# CONFIG_SH_TIMER_TMU is not set -CONFIG_ARM_THUMB=y -CONFIG_CACHE_L2X0=y -CONFIG_ARM_ERRATA_430973=y -CONFIG_ARM_ERRATA_458693=y -CONFIG_ARM_ERRATA_460075=y -CONFIG_PL310_ERRATA_588369=y -CONFIG_ARM_ERRATA_720789=y -CONFIG_PL310_ERRATA_727915=y -CONFIG_ARM_ERRATA_743622=y -CONFIG_ARM_ERRATA_751472=y -CONFIG_PL310_ERRATA_753970=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_PL310_ERRATA_769419=y -CONFIG_ARM_ERRATA_775420=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_FORCE_MAX_ZONEORDER=13 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_KEXEC=y -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_MD=y -CONFIG_BLK_DEV_DM=y -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -CONFIG_SH_ETH=y -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ST1232=y -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=8 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_I2C_SH_MOBILE=y -# CONFIG_HWMON is not set -CONFIG_REGULATOR=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_SOC_CAMERA=y -CONFIG_SOC_CAMERA_MT9T112=y -CONFIG_VIDEO_SH_MOBILE_CEU=y -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=y -CONFIG_FB_SH_MOBILE_HDMI=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -CONFIG_SND_SOC_SH4_FSI=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_RENESAS_USBHS=y -CONFIG_USB_GADGET=y -CONFIG_USB_RENESAS_USBHS_UDC=y -CONFIG_USB_ETH=m -CONFIG_MMC=y -CONFIG_MMC_SDHI=y -CONFIG_MMC_SH_MMCIF=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_S35390A=y -CONFIG_DMADEVICES=y -CONFIG_SH_DMAE=y -CONFIG_UIO=y -CONFIG_UIO_PDRV_GENIRQ=y -# CONFIG_DNOTIFY is not set -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_V4_1=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_CRYPTO=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_ANSI_CPRNG=y -CONFIG_XZ_DEC=y diff --git a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig deleted file mode 100644 index 558ecd8f66f..00000000000 --- a/arch/arm/configs/assabet_defconfig +++ /dev/null @@ -1,60 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_ASSABET=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram" -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_SA1100_FIR=m -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_FB=y -CONFIG_FB_SA1100=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig deleted file mode 100644 index 047f2a41530..00000000000 --- a/arch/arm/configs/at91_dt_defconfig +++ /dev/null @@ -1,198 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_SOC_AT91SAM9260=y -CONFIG_SOC_AT91SAM9263=y -CONFIG_SOC_AT91SAM9G45=y -CONFIG_SOC_AT91SAM9X5=y -CONFIG_SOC_AT91SAM9N12=y -CONFIG_MACH_AT91SAM9_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -CONFIG_AT91_TIMER_HZ=128 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" -CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -CONFIG_IPV6_SIT_6RD=y -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_ATMEL_PWM=y -CONFIG_ATMEL_TCLIB=y -CONFIG_EEPROM_93CX6=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_DAVICOM_PHY=y -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -CONFIG_PINCTRL_AT91=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_AT91SAM9X_WATCHDOG=y -CONFIG_SSB=m -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_ATMEL=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_ATMEL_LCDC=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_FONT_MINI_4x6=y -CONFIG_LOGO=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_GADGET=y -CONFIG_USB_AT91=m -CONFIG_USB_ATMEL_USBA=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_ACM_MS=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_CDC=y -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_DMADEVICES=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_FANOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=m -CONFIG_CRC_ITU_T=m -CONFIG_CRC7=m -CONFIG_AVERAGE=y diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig deleted file mode 100644 index 4ae57a34a58..00000000000 --- a/arch/arm/configs/at91rm9200_defconfig +++ /dev/null @@ -1,323 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91RM9200=y -CONFIG_MACH_ONEARM=y -CONFIG_ARCH_AT91RM9200DK=y -CONFIG_MACH_AT91RM9200EK=y -CONFIG_MACH_CSB337=y -CONFIG_MACH_CSB637=y -CONFIG_MACH_CARMEVA=y -CONFIG_MACH_ATEB9200=y -CONFIG_MACH_KB9200=y -CONFIG_MACH_PICOTUX2XX=y -CONFIG_MACH_KAFA=y -CONFIG_MACH_ECBAT91=y -CONFIG_MACH_YL9200=y -CONFIG_MACH_CPUAT91=y -CONFIG_MACH_ECO920=y -CONFIG_MTD_AT91_DATAFLASH_CARD=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -CONFIG_AT91_TIMER_HZ=100 -# CONFIG_ARM_THUMB is not set -CONFIG_PCCARD=y -CONFIG_AT91_CF=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x10000000 -CONFIG_ZBOOT_ROM_BSS=0x20040000 -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_MISC=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_NET_IPIP=m -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_BT=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_AFS_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PLATRAM=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_NAND_PLATFORM=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_TUN=m -CONFIG_ARM_AT91_ETHER=y -CONFIG_PHYLIB=y -CONFIG_DAVICOM_PHY=y -CONFIG_SMSC_PHY=y -CONFIG_MICREL_PHY=y -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -CONFIG_PPP_ASYNC=y -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_EPSON2888=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_LEGACY_PTY_COUNT=32 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -CONFIG_SPI_BITBANG=y -CONFIG_GPIO_SYSFS=y -CONFIG_HWMON=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1029=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM73=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83793=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91RM9200_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_S1D13XXX=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_DISPLAY_SUPPORT=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_MINI_4x6=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_KEYSPAN=y -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_MCT_U232=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_REISERFS_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_NTFS_FS=m -CONFIG_TMPFS=y -CONFIG_CONFIGFS_FS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_CIFS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_MAC_PARTITION=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_FTRACE is not set -CONFIG_CRYPTO_PCBC=y -CONFIG_CRYPTO_SHA1=y diff --git a/arch/arm/configs/at91sam9260_defconfig b/arch/arm/configs/at91sam9260_defconfig deleted file mode 100644 index 05618eb694f..00000000000 --- a/arch/arm/configs/at91sam9260_defconfig +++ /dev/null @@ -1,91 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9260=y -CONFIG_ARCH_AT91SAM9260_SAM9XE=y -CONFIG_MACH_AT91SAM9260EK=y -CONFIG_MACH_CAM60=y -CONFIG_MACH_SAM9_L9260=y -CONFIG_MACH_AFEB9260=y -CONFIG_MACH_USB_A9260=y -CONFIG_MACH_QIL_A9260=y -CONFIG_MACH_CPU9260=y -CONFIG_MACH_FLEXIBITY=y -CONFIG_MACH_SNAPPER_9260=y -CONFIG_MACH_AT91SAM9_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91SAM9X_WATCHDOG=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/at91sam9261_defconfig b/arch/arm/configs/at91sam9261_defconfig deleted file mode 100644 index c87beb973b3..00000000000 --- a/arch/arm/configs/at91sam9261_defconfig +++ /dev/null @@ -1,158 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_LZMA=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_NAMESPACES=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9261=y -CONFIG_MACH_AT91SAM9261EK=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" -CONFIG_AUTO_ZRELADDR=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_CFG80211=y -CONFIG_LIB80211=y -CONFIG_MAC80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_MISC_DEVICES=y -CONFIG_ATMEL_TCLIB=y -CONFIG_ATMEL_SSC=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_USB_ZD1201=m -CONFIG_RTL8187=m -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_LIBERTAS_SPI=m -CONFIG_RT2X00=m -CONFIG_RT2500USB=m -CONFIG_RT73USB=m -CONFIG_ZD1211RW=m -CONFIG_INPUT_POLLDEV=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91SAM9X_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_ATMEL=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_ATMEL_LCDC=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -CONFIG_SND_AT73C213=y -CONFIG_SND_USB_AUDIO=m -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_LZO=y -CONFIG_SQUASHFS_XZ=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -CONFIG_FTRACE=y -CONFIG_CRC_CCITT=m diff --git a/arch/arm/configs/at91sam9263_defconfig b/arch/arm/configs/at91sam9263_defconfig deleted file mode 100644 index 36fed66bd4b..00000000000 --- a/arch/arm/configs/at91sam9263_defconfig +++ /dev/null @@ -1,166 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_LZMA=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_NAMESPACES=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9263=y -CONFIG_MACH_AT91SAM9263EK=y -CONFIG_MACH_USB_A9263=y -CONFIG_MTD_AT91_DATAFLASH_CARD=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" -CONFIG_AUTO_ZRELADDR=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_NFTL=y -CONFIG_NFTL_RW=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_BLOCK2MTD=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_MISC_DEVICES=y -CONFIG_ATMEL_PWM=y -CONFIG_ATMEL_TCLIB=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_MACB=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_USB_ZD1201=m -CONFIG_INPUT_POLLDEV=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91SAM9X_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_ATMEL=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_ATMEL_LCDC=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -CONFIG_SND_ATMEL_AC97C=y -# CONFIG_SND_SPI is not set -CONFIG_SND_USB_AUDIO=m -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_SDIO_UART=m -CONFIG_MMC_ATMELMCI=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_ATMEL_PWM=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_EXT2_FS=y -CONFIG_FUSE_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_FTRACE=y -CONFIG_DEBUG_USER=y -CONFIG_XZ_DEC=y diff --git a/arch/arm/configs/at91sam9g20_defconfig b/arch/arm/configs/at91sam9g20_defconfig deleted file mode 100644 index 892e8287ed7..00000000000 --- a/arch/arm/configs/at91sam9g20_defconfig +++ /dev/null @@ -1,127 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9G20=y -CONFIG_MACH_AT91SAM9G20EK=y -CONFIG_MACH_AT91SAM9G20EK_2MMC=y -CONFIG_MACH_CPU9G20=y -CONFIG_MACH_ACMENETUSFOXG20=y -CONFIG_MACH_PORTUXG20=y -CONFIG_MACH_STAMP9G20=y -CONFIG_MACH_PCONTROL_G20=y -CONFIG_MACH_GSIA18S=y -CONFIG_MACH_USB_A9G20=y -CONFIG_MACH_SNAPPER_9260=y -CONFIG_MACH_AT91SAM9_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -CONFIG_SPI_SPIDEV=y -# CONFIG_HWMON is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_SEQUENCER_OSS=y -# CONFIG_SND_VERBOSE_PROCFS is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_RV3029C2=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig deleted file mode 100644 index 18964cdacd6..00000000000 --- a/arch/arm/configs/at91sam9g45_defconfig +++ /dev/null @@ -1,210 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9G45=y -CONFIG_MACH_AT91SAM9M10G45EK=y -CONFIG_MACH_AT91SAM9_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -CONFIG_AT91_SLOW_CLOCK=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x71100000,25165824 root=/dev/ram0 rw" -CONFIG_AUTO_ZRELADDR=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -CONFIG_IPV6_SIT_6RD=y -CONFIG_CFG80211=y -CONFIG_LIB80211=y -CONFIG_MAC80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_MISC_DEVICES=y -CONFIG_ATMEL_PWM=y -CONFIG_ATMEL_TCLIB=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -CONFIG_DAVICOM_PHY=y -CONFIG_LIBERTAS_THINFIRM=m -CONFIG_LIBERTAS_THINFIRM_USB=m -CONFIG_AT76C50X_USB=m -CONFIG_USB_ZD1201=m -CONFIG_RTL8187=m -CONFIG_ATH_COMMON=m -CONFIG_ATH9K=m -CONFIG_CARL9170=m -CONFIG_B43=m -CONFIG_B43_PHY_N=y -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_LIBERTAS_SPI=m -CONFIG_RT2X00=m -CONFIG_RT2500USB=m -CONFIG_RT73USB=m -CONFIG_RT2800USB=m -CONFIG_RT2800USB_RT53XX=y -CONFIG_RT2800USB_UNKNOWN=y -CONFIG_RTL8192CU=m -CONFIG_WL1251=m -CONFIG_WL1251_SDIO=m -CONFIG_WL12XX_MENU=m -CONFIG_WL12XX=m -CONFIG_WL12XX_SDIO=m -CONFIG_ZD1211RW=m -CONFIG_MWIFIEX=m -CONFIG_MWIFIEX_SDIO=m -CONFIG_INPUT_POLLDEV=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_QT1070=m -CONFIG_KEYBOARD_QT2160=m -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ATMEL_MXT=m -CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ATMEL=y -CONFIG_FB_UDL=m -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_ATMEL_LCDC=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -CONFIG_SND_ATMEL_AC97C=y -# CONFIG_SND_SPI is not set -CONFIG_SND_USB_AUDIO=m -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ATMEL_USBA=m -CONFIG_USB_ZERO=m -CONFIG_USB_AUDIO=m -CONFIG_USB_ETH=m -CONFIG_USB_ETH_EEM=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_CDC=y -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_SDIO_UART=m -CONFIG_MMC_ATMELMCI=y -CONFIG_LEDS_ATMEL_PWM=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_DMADEVICES=y -CONFIG_AT_HDMAC=y -CONFIG_DMATEST=m -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_FANOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -CONFIG_SQUASHFS_EMBEDDED=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_STRIP_ASM_SYMS=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_MEMORY_INIT=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/at91sam9rl_defconfig b/arch/arm/configs/at91sam9rl_defconfig deleted file mode 100644 index 7cf87856d63..00000000000 --- a/arch/arm/configs/at91sam9rl_defconfig +++ /dev/null @@ -1,79 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9RL=y -CONFIG_MACH_AT91SAM9RLEK=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,17105363 root=/dev/ram0 rw" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=24576 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91SAM9X_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_ATMEL=y -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/at91x40_defconfig b/arch/arm/configs/at91x40_defconfig deleted file mode 100644 index c55e9212fcb..00000000000 --- a/arch/arm/configs/at91x40_defconfig +++ /dev/null @@ -1,48 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EMBEDDED=y -# CONFIG_HOTPLUG is not set -# CONFIG_ELF_CORE is not set -# CONFIG_FUTEX is not set -# CONFIG_TIMERFD is not set -# CONFIG_VM_EVENT_COUNTERS is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_MMU is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91X40=y -CONFIG_MACH_AT91EB01=y -CONFIG_AT91_EARLY_USART0=y -CONFIG_CPU_ARM7TDMI=y -CONFIG_SET_MEM_PARAM=y -CONFIG_DRAM_BASE=0x01000000 -CONFIG_DRAM_SIZE=0x00400000 -CONFIG_FLASH_MEM_BASE=0x01400000 -CONFIG_PROCESSOR_ID=0x14000040 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_BINFMT_FLAT=y -# CONFIG_SUSPEND is not set -# CONFIG_FW_LOADER is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_RAM=y -CONFIG_MTD_ROM=y -CONFIG_BLK_DEV_RAM=y -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -# CONFIG_DEVKMEM is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -# CONFIG_DNOTIFY is not set -CONFIG_ROMFS_FS=y -# CONFIG_ENABLE_MUST_CHECK is not set diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig deleted file mode 100644 index 5b54abbeb0b..00000000000 --- a/arch/arm/configs/badge4_defconfig +++ /dev/null @@ -1,122 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EXPERT=y -CONFIG_MODULES=y -CONFIG_MODVERSIONS=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_BADGE4=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="init=/linuxrc root=/dev/mtdblock3" -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -CONFIG_ARTHUR=m -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_IRDA=y -CONFIG_IRLAN=y -CONFIG_IRCOMM=y -CONFIG_IRDA_ULTRA=y -CONFIG_SA1100_FIR=y -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIVHCI=m -# CONFIG_FW_LOADER is not set -CONFIG_MTD=y -CONFIG_MTD_DEBUG=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_RAM=y -CONFIG_MTD_SA1100=y -CONFIG_PARPORT=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=m -CONFIG_IDE=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=m -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=y -CONFIG_NETDEVICES=y -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_USBNET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_ELEKTOR=m -CONFIG_WATCHDOG=y -CONFIG_SOFT_WATCHDOG=m -CONFIG_SA1100_WATCHDOG=m -CONFIG_SOUND=y -CONFIG_SOUND_PRIME=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_USS720=m -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_RIO500=m -CONFIG_EXT2_FS=m -CONFIG_EXT3_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=m -CONFIG_MINIX_FS=m -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_SMB_FS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig deleted file mode 100644 index ce987211a60..00000000000 --- a/arch/arm/configs/bcm2835_defconfig +++ /dev/null @@ -1,117 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_FHANDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CPUSETS=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -CONFIG_CGROUP_PERF=y -CONFIG_CFS_BANDWIDTH=y -CONFIG_RT_GROUP_SCHED=y -CONFIG_NAMESPACES=y -CONFIG_SCHED_AUTOGROUP=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_RD_BZIP2=y -CONFIG_RD_LZMA=y -CONFIG_RD_XZ=y -CONFIG_RD_LZO=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_JUMP_LABEL=y -CONFIG_ARCH_MULTI_V6=y -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_BCM2835=y -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -CONFIG_KSM=y -CONFIG_CLEANCACHE=y -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -# CONFIG_SUSPEND is not set -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_TTY_PRINTK=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_BCM2835=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_BCM2835=y -CONFIG_SPI=y -CONFIG_SPI_BCM2835=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_BCM2835=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_FANOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_NFSD=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_UNUSED_SYMBOLS=y -CONFIG_LOCKUP_DETECTOR=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_MEMORY_INIT=y -CONFIG_BOOT_PRINTK_DELAY=y -CONFIG_SCHED_TRACER=y -CONFIG_STACK_TRACER=y -CONFIG_FUNCTION_PROFILER=y -CONFIG_DYNAMIC_DEBUG=y -CONFIG_KGDB=y -CONFIG_KGDB_KDB=y -CONFIG_TEST_KSTRTOX=y -CONFIG_STRICT_DEVMEM=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_XZ_DEC_ARM is not set -# CONFIG_XZ_DEC_ARMTHUMB is not set diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig deleted file mode 100644 index e3bf2d65618..00000000000 --- a/arch/arm/configs/bcm_defconfig +++ /dev/null @@ -1,114 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=19 -CONFIG_CGROUPS=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -CONFIG_CGROUP_SCHED=y -CONFIG_BLK_CGROUP=y -CONFIG_NAMESPACES=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_EFI_PARTITION=y -CONFIG_ARCH_BCM=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_ERRATA_743622=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_COMPACTION is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_CMDLINE="console=ttyS0,115200n8 mem=128M" -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_PROC_DEVICETREE=y -# CONFIG_BLK_DEV is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_8250_DW=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -# CONFIG_HWMON is not set -CONFIG_VIDEO_OUTPUT_CONTROL=y -CONFIG_FB=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_USB_SUPPORT is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110 -CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_LL=y -CONFIG_CRC_CCITT=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=y -CONFIG_XZ_DEC=y -CONFIG_AVERAGE=y diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig deleted file mode 100644 index 6524cdf3b08..00000000000 --- a/arch/arm/configs/bockw_defconfig +++ /dev/null @@ -1,94 +0,0 @@ -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_KERNEL_LZMA=y -CONFIG_NO_HZ=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_R8A7778=y -CONFIG_MACH_BOCKW=y -CONFIG_MEMORY_START=0x60000000 -CONFIG_MEMORY_SIZE=0x10000000 -CONFIG_SHMOBILE_TIMER_HZ=1024 -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_EM_TIMER_STI is not set -CONFIG_ARM_ERRATA_430973=y -CONFIG_ARM_ERRATA_458693=y -CONFIG_ARM_ERRATA_460075=y -CONFIG_ARM_ERRATA_743622=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_CMDLINE="console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp" -CONFIG_CMDLINE_FORCE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -# CONFIG_SUSPEND is not set -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FW_LOADER is not set -CONFIG_NETDEVICES=y -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=6 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_UIO=y -CONFIG_UIO_PDRV_GENIRQ=y -# CONFIG_IOMMU_SUPPORT is not set -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_SWAP=y -CONFIG_NFS_V4_1=y -CONFIG_ROOT_NFS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_AVERAGE=y diff --git a/arch/arm/configs/bonito_defconfig b/arch/arm/configs/bonito_defconfig deleted file mode 100644 index 54571082d92..00000000000 --- a/arch/arm/configs/bonito_defconfig +++ /dev/null @@ -1,72 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_R8A7740=y -CONFIG_MACH_BONITO=y -# CONFIG_SH_TIMER_TMU is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_FORCE_MAX_ZONEORDER=12 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC5,115200 earlyprintk=sh-sci.5,115200 ignore_loglevel" -CONFIG_KEXEC=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -# CONFIG_SUSPEND is not set -CONFIG_PM_RUNTIME=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_ARM_INTEGRATOR=y -CONFIG_MTD_BLOCK2MTD=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=9 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_SH_MOBILE=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_UIO=y -CONFIG_UIO_PDRV=y -CONFIG_UIO_PDRV_GENIRQ=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_ARM_UNWIND is not set diff --git a/arch/arm/configs/cerfcube_defconfig b/arch/arm/configs/cerfcube_defconfig deleted file mode 100644 index dce912d146b..00000000000 --- a/arch/arm/configs/cerfcube_defconfig +++ /dev/null @@ -1,75 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_CERF=y -CONFIG_SA1100_CERF_FLASH_16MB=y -CONFIG_PCCARD=m -CONFIG_PCMCIA_SA1100=m -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySA0,38400 root=/dev/mtdblock3 rootfstype=jffs2 rw mem=32M init=/linuxrc" -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_FPE_FASTFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=m -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_WATCHDOG=y -CONFIG_SA1100_WATCHDOG=m -# CONFIG_VGA_CONSOLE is not set -CONFIG_EXT2_FS=m -CONFIG_EXT3_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_NFSD=m -CONFIG_NFSD_V4=y -CONFIG_SMB_FS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_ISO8859_1=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig deleted file mode 100644 index 1cd94c36321..00000000000 --- a/arch/arm/configs/clps711x_defconfig +++ /dev/null @@ -1,90 +0,0 @@ -CONFIG_KERNEL_LZMA=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_RD_LZMA=y -CONFIG_EMBEDDED=y -CONFIG_SLOB=y -CONFIG_JUMP_LABEL=y -# CONFIG_LBDAF is not set -CONFIG_PARTITION_ADVANCED=y -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_CLPS711X=y -CONFIG_ARCH_AUTCPU12=y -CONFIG_ARCH_CDB89712=y -CONFIG_ARCH_CLEP7312=y -CONFIG_ARCH_EDB7211=y -CONFIG_ARCH_P720T=y -CONFIG_ARCH_FORTUNET=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_COREDUMP is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_IRDA=y -CONFIG_IRTTY_SIR=y -CONFIG_EP7211_DONGLE=y -# CONFIG_WIRELESS is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_AUTCPU12=y -CONFIG_MTD_PLATRAM=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPIO=y -CONFIG_NETDEVICES=y -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -CONFIG_CS89x0=y -CONFIG_CS89x0_PLATFORM=y -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_CLPS711X_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_SPI=y -CONFIG_GPIO_GENERIC_PLATFORM=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_CLPS711X=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_PLATFORM=y -# CONFIG_USB_SUPPORT is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=y -# CONFIG_NETWORK_FILESYSTEMS is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/cm_x2xx_defconfig b/arch/arm/configs/cm_x2xx_defconfig deleted file mode 100644 index a93ff8da5ba..00000000000 --- a/arch/arm/configs/cm_x2xx_defconfig +++ /dev/null @@ -1,189 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_VM_EVENT_COUNTERS is not set -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_ARMCORE=y -CONFIG_PCI=y -CONFIG_PCCARD=m -CONFIG_YENTA=m -# CONFIG_YENTA_O2 is not set -# CONFIG_YENTA_RICOH is not set -# CONFIG_YENTA_ENE_TUNE is not set -# CONFIG_YENTA_TOSHIBA is not set -CONFIG_PCMCIA_PXA2XX=m -CONFIG_NO_HZ=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_APM_EMULATION=m -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_BNEP=m -CONFIG_BT_HIDP=m -CONFIG_LIB80211=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PXA2XX=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPIO=m -CONFIG_MTD_NAND_CM_X270=y -CONFIG_MTD_NAND_PLATFORM=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=m -# CONFIG_SATA_PMP is not set -CONFIG_PATA_PCMCIA=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -CONFIG_DM9000_DEBUGLEVEL=1 -CONFIG_NET_PCI=y -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_PXA27x=m -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_UCB1400=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=m -# CONFIG_HWMON is not set -CONFIG_UCB1400_CORE=m -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_FB_MBX=m -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_PCI is not set -CONFIG_SND_PXA2XX_AC97=m -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_PCMCIA is not set -CONFIG_HID_A4TECH=y -CONFIG_HID_APPLE=y -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -CONFIG_HID_CYPRESS=y -CONFIG_HID_EZKEY=y -CONFIG_HID_GYRATION=y -CONFIG_HID_LOGITECH=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=m -CONFIG_MMC_PXA=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_V3020=y -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=m -# CONFIG_PROC_PAGE_MONITOR is not set -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_CIFS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_UTF8=m -CONFIG_FRAME_WARN=0 -CONFIG_DEBUG_KERNEL=y -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig deleted file mode 100644 index f4b767256f9..00000000000 --- a/arch/arm/configs/cm_x300_defconfig +++ /dev/null @@ -1,178 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOCALVERSION="-cm-x300" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_GPIO_PCA953X=y -CONFIG_MACH_CM_X300=y -CONFIG_NO_HZ=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/mtdblock5 rootfstype=ubifs console=ttyS2,38400" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_FPE_NWFPE=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=y -CONFIG_BT_SCO=y -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_LIB80211=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_PXA3xx=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -CONFIG_DM9000_DEBUGLEVEL=0 -CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_PXA27x=m -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_DA9034 is not set -CONFIG_TOUCHSCREEN_WM97XX=m -# CONFIG_TOUCHSCREEN_WM9705 is not set -# CONFIG_TOUCHSCREEN_WM9713 is not set -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_PMIC_DA903X=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DA903X=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_TDO24M=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_DA903X=m -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_6x11=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=m -CONFIG_SND_PXA2XX_SOC=m -CONFIG_SND_PXA2XX_SOC_EM_X270=m -CONFIG_HID_DRAGONRISE=y -CONFIG_HID_GYRATION=y -CONFIG_HID_TWINHAN=y -CONFIG_HID_NTRIG=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -CONFIG_HID_SMARTJOYPLUS=y -CONFIG_HID_TOPSEED=y -CONFIG_HID_THRUSTMASTER=y -CONFIG_HID_ZEROPLUS=y -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=m -CONFIG_MMC_PXA=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_V3020=y -CONFIG_RTC_DRV_PXA=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_CIFS=m -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_ISO8859_1=m -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_T10DIF=y diff --git a/arch/arm/configs/cns3420vb_defconfig b/arch/arm/configs/cns3420vb_defconfig deleted file mode 100644 index b1ff5cdba9a..00000000000 --- a/arch/arm/configs/cns3420vb_defconfig +++ /dev/null @@ -1,75 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_PERF_EVENTS is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_IOSCHED_CFQ=m -CONFIG_ARCH_MULTI_V6=y -#CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_CNS3XXX=y -CONFIG_MACH_CNS3420VB=y -CONFIG_DEBUG_CNS3XXX=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,38400 mem=128M root=/dev/mmcblk0p1 ro rootwait" -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=20000 -# CONFIG_MISC_DEVICES is not set -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -# CONFIG_SATA_PMP is not set -# CONFIG_ATA_SFF is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_INOTIFY=y -CONFIG_AUTOFS4_FS=y -CONFIG_FSCACHE=y -CONFIG_TMPFS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_FS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/colibri_pxa270_defconfig b/arch/arm/configs/colibri_pxa270_defconfig deleted file mode 100644 index 2ef2c5e8aae..00000000000 --- a/arch/arm/configs/colibri_pxa270_defconfig +++ /dev/null @@ -1,180 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_COLIBRI=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_IP_NF_QUEUE=m -CONFIG_VLAN_8021Q=m -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -CONFIG_IRTTY_SIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_CFG80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_LE_BYTE_SWAP=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PXA2XX=y -CONFIG_MTD_BLOCK2MTD=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_DISKONCHIP=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x4000000 -CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=y -CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y -CONFIG_MTD_ONENAND=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=8 -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_PHYLIB=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_HOSTAP=y -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_ATKBD=m -# CONFIG_MOUSE_PS2 is not set -CONFIG_MOUSE_SERIAL=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_WATCHDOG=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_SERIAL=m -CONFIG_USB_GADGET=m -CONFIG_USB_GADGET_DUMMY_HCD=y -CONFIG_MMC=y -CONFIG_NEW_LEDS=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_RTC_DRV_PCF8583=m -CONFIG_INOTIFY=y -CONFIG_AUTOFS4_FS=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" -CONFIG_TMPFS=y -CONFIG_CONFIGFS_FS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=1 -CONFIG_JFFS2_FS_WBUF_VERIFY=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V4=y -CONFIG_NLS_DEFAULT="iso8859-15" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/colibri_pxa300_defconfig b/arch/arm/configs/colibri_pxa300_defconfig deleted file mode 100644 index b985334e42d..00000000000 --- a/arch/arm/configs/colibri_pxa300_defconfig +++ /dev/null @@ -1,73 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_COLIBRI300=y -CONFIG_AEABI=y -CONFIG_CMDLINE="console=ttyS0,115200 rw" -CONFIG_CPU_IDLE=y -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_AX88796=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_GPIO_ROTARY_ENCODER=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_DEBUG_GPIO=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_PXA=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig deleted file mode 100644 index 6c56ad086c7..00000000000 --- a/arch/arm/configs/collie_defconfig +++ /dev/null @@ -1,94 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EXPERT=y -# CONFIG_BASE_FULL is not set -# CONFIG_EPOLL is not set -CONFIG_SLOB=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_COLLIE=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_PCMCIA_DEBUG=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1" -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set -# CONFIG_MTD_CFI_I1 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_I4=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=1024 -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECS=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_LOCOMO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CS=y -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HWMON is not set -CONFIG_MCP_SA11X0=y -CONFIG_MCP_UCB1200=y -CONFIG_MCP_UCB1200_TS=y -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_SA1100=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_MINI_4x6=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_LOCOMO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_IDE_DISK=y -# CONFIG_DNOTIFY is not set -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_ROMFS_FS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DETECT_SOFTLOCKUP is not set -CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig deleted file mode 100644 index 1fd1d1de322..00000000000 --- a/arch/arm/configs/corgi_defconfig +++ /dev/null @@ -1,273 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EXPERT=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_PXA_SHARPSL=y -CONFIG_MACH_POODLE=y -CONFIG_MACH_CORGI=y -CONFIG_MACH_SHEPHERD=y -CONFIG_MACH_HUSKY=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_PXA2XX=y -CONFIG_PREEMPT=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 debug" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_INET=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_PXA_FICP=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_ROM=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_SHARPSL=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECS=y -CONFIG_SCSI=m -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -# CONFIG_USB_NET_CDC_SUBSET is not set -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=m -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_BSDCOMP=m -CONFIG_INPUT_FF_MEMLESS=m -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_I2C=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_FB=y -CONFIG_FB_W100=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_CORGI=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_SOUND=y -CONFIG_SOUND_PRIME=y -CONFIG_USB_KBD=m -CONFIG_USB_MOUSE=m -CONFIG_HID_A4TECH=m -CONFIG_HID_APPLE=m -CONFIG_HID_BELKIN=m -CONFIG_HID_CHERRY=m -CONFIG_HID_CHICONY=m -CONFIG_HID_CYPRESS=m -CONFIG_HID_EZKEY=m -CONFIG_HID_GYRATION=m -CONFIG_HID_LOGITECH=m -CONFIG_HID_MICROSOFT=m -CONFIG_HID_MONTEREY=m -CONFIG_HID_PANTHERLORD=m -CONFIG_HID_PETALYNX=m -CONFIG_HID_SAMSUNG=m -CONFIG_HID_SONY=m -CONFIG_HID_SUNPLUS=m -CONFIG_USB=m -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_PXA=y -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=m -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_TWOFISH=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y -CONFIG_LIBCRC32C=m diff --git a/arch/arm/configs/da8xx_omapl_defconfig b/arch/arm/configs/da8xx_omapl_defconfig deleted file mode 100644 index 7c868139bdb..00000000000 --- a/arch/arm/configs/da8xx_omapl_defconfig +++ /dev/null @@ -1,137 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_DAVINCI=y -CONFIG_ARCH_DAVINCI_DA830=y -CONFIG_ARCH_DAVINCI_DA850=y -CONFIG_MACH_DA8XX_DT=y -CONFIG_MACH_MITYOMAPL138=y -CONFIG_MACH_OMAPL138_HAWKBOARD=y -CONFIG_DAVINCI_RESET_CLOCKS=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_LEDS=y -CONFIG_USE_OF=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=m -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_IDLE=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -CONFIG_NETFILTER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FW_LOADER is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=1 -CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_EEPROM_AT24=y -CONFIG_SCSI=m -CONFIG_BLK_DEV_SD=m -CONFIG_NETDEVICES=y -CONFIG_TUN=m -CONFIG_LXT_PHY=y -CONFIG_LSI_ET1011C_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_TI_DAVINCI_EMAC=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_NETCONSOLE=y -CONFIG_NETPOLL_TRAP=y -CONFIG_INPUT_MOUSEDEV=m -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_ATKBD=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_XTKBD=m -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIO_LIBPS2=y -# CONFIG_VT_CONSOLE is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=3 -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_DAVINCI=y -CONFIG_PINCTRL_SINGLE=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DUMMY=y -CONFIG_REGULATOR_TPS6507X=y -CONFIG_FB=y -CONFIG_FB_DA8XX=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_SOC=m -CONFIG_SND_DAVINCI_SOC=m -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_XFS_FS=m -CONFIG_INOTIFY=y -CONFIG_AUTOFS4_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=m -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_TIMER_STATS=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=m diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig deleted file mode 100644 index c86fd75e181..00000000000 --- a/arch/arm/configs/davinci_all_defconfig +++ /dev/null @@ -1,198 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_DAVINCI=y -CONFIG_ARCH_DAVINCI_DM644x=y -CONFIG_ARCH_DAVINCI_DM355=y -CONFIG_ARCH_DAVINCI_DM646x=y -CONFIG_ARCH_DAVINCI_DM365=y -CONFIG_MACH_SFFSDR=y -CONFIG_MACH_NEUROS_OSD2=y -CONFIG_MACH_DM355_LEOPARD=y -CONFIG_DAVINCI_MUX_DEBUG=y -CONFIG_DAVINCI_MUX_WARNINGS=y -CONFIG_DAVINCI_RESET_CLOCKS=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_LEDS=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -CONFIG_NETFILTER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FW_LOADER is not set -CONFIG_MTD=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_CFI=m -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_PHYSMAP=m -CONFIG_MTD_NAND=m -CONFIG_MTD_NAND_DAVINCI=m -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=1 -CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_EEPROM_AT24=y -CONFIG_IDE=m -CONFIG_BLK_DEV_PALMCHIP_BK3710=m -CONFIG_SCSI=m -CONFIG_BLK_DEV_SD=m -CONFIG_NETDEVICES=y -CONFIG_TUN=m -CONFIG_LXT_PHY=y -CONFIG_LSI_ET1011C_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_TI_DAVINCI_EMAC=y -CONFIG_DM9000=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_NETCONSOLE=y -CONFIG_NETPOLL_TRAP=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_ATKBD=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_XTKBD=m -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_DM355EVM=m -CONFIG_SERIO_LIBPS2=y -# CONFIG_VT_CONSOLE is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=3 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_DAVINCI=y -CONFIG_GPIO_PCF857X=y -CONFIG_WATCHDOG=y -CONFIG_DAVINCI_WATCHDOG=m -CONFIG_MFD_DM355EVM_MSP=y -CONFIG_VIDEO_OUTPUT_CONTROL=m -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_SOC=m -CONFIG_SND_DAVINCI_SOC=m -CONFIG_SND_DAVINCI_SOC_EVM=m -CONFIG_SND_DM6467_SOC_EVM=m -CONFIG_HID=m -CONFIG_HID_A4TECH=m -CONFIG_HID_APPLE=m -CONFIG_HID_BELKIN=m -CONFIG_HID_CHERRY=m -CONFIG_HID_CHICONY=m -CONFIG_HID_CYPRESS=m -CONFIG_HID_EZKEY=m -CONFIG_HID_GYRATION=m -CONFIG_HID_LOGITECH=m -CONFIG_HID_MICROSOFT=m -CONFIG_HID_MONTEREY=m -CONFIG_HID_PANTHERLORD=m -CONFIG_HID_PETALYNX=m -CONFIG_HID_SAMSUNG=m -CONFIG_HID_SONY=m -CONFIG_HID_SUNPLUS=m -CONFIG_USB=m -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=m -CONFIG_USB_MUSB_HDRC=m -CONFIG_USB_MUSB_PERIPHERAL=y -CONFIG_USB_GADGET_MUSB_HDRC=y -CONFIG_MUSB_PIO_ONLY=y -CONFIG_USB_STORAGE=m -CONFIG_USB_TEST=m -CONFIG_USB_GADGET=m -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_G_PRINTER=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_MMC=m -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_DAVINCI=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m -CONFIG_RTC_CLASS=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_XFS_FS=m -CONFIG_INOTIFY=y -CONFIG_AUTOFS4_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=m -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=m -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_TIMER_STATS=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_T10DIF=m diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig deleted file mode 100644 index 4364eff5b01..00000000000 --- a/arch/arm/configs/dove_defconfig +++ /dev/null @@ -1,141 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EXPERT=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_DOVE=y -CONFIG_MACH_DOVE_DB=y -CONFIG_MACH_CM_A510=y -CONFIG_MACH_DOVE_DT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=1 -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_MV=y -CONFIG_NETDEVICES=y -CONFIG_MV643XX_ETH=y -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_MOUSE_PS2 is not set -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_OF_PLATFORM=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MV64XXX=y -CONFIG_SPI=y -CONFIG_SPI_ORION=y -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_DOVE_THERMAL=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_DOVE=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_MV=y -CONFIG_DMADEVICES=y -CONFIG_MV_XOR=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_TIMER_STATS=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_TEA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_MV_CESA=y -CONFIG_CRC_CCITT=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/ebsa110_defconfig b/arch/arm/configs/ebsa110_defconfig deleted file mode 100644 index 14559dbb4c2..00000000000 --- a/arch/arm/configs/ebsa110_defconfig +++ /dev/null @@ -1,75 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EXPERT=y -CONFIG_MODULES=y -CONFIG_ARCH_EBSA110=y -CONFIG_PCCARD=m -CONFIG_I82365=m -CONFIG_LEDS=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs rw mem=16M console=ttyS1,38400n8" -CONFIG_FPE_NWFPE=y -CONFIG_FPE_FASTFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_SYN_COOKIES=y -CONFIG_IPV6=y -CONFIG_NETFILTER=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_ECN=y -CONFIG_IP_NF_MATCH_TTL=y -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_LOG=y -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_ECN=y -CONFIG_IP6_NF_IPTABLES=y -CONFIG_IP6_NF_MATCH_FRAG=y -CONFIG_IP6_NF_MATCH_OPTS=y -CONFIG_IP6_NF_MATCH_HL=y -CONFIG_IP6_NF_MATCH_RT=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_FW_LOADER=m -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_1284=y -CONFIG_BLK_DEV_RAM=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_ARM_AM79C961A=y -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=m -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_CS=m -CONFIG_PRINTER=m -CONFIG_WATCHDOG=y -CONFIG_SOFT_WATCHDOG=y -CONFIG_AUTOFS4_FS=y -CONFIG_MINIX_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -# CONFIG_MSDOS_PARTITION is not set diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig deleted file mode 100644 index 60a21e01eb7..00000000000 --- a/arch/arm/configs/em_x270_defconfig +++ /dev/null @@ -1,194 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_VM_EVENT_COUNTERS is not set -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_EM_X270=y -CONFIG_MACH_EXEDA=y -CONFIG_NO_HZ=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_BNEP=m -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_LIB80211=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PXA2XX=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_PLATFORM=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -CONFIG_DM9000_DEBUGLEVEL=1 -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_APMPOWER=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_PXA27x=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_DA9034 is not set -CONFIG_TOUCHSCREEN_WM97XX=m -# CONFIG_TOUCHSCREEN_WM9705 is not set -# CONFIG_TOUCHSCREEN_WM9713 is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_POWER_SUPPLY=y -CONFIG_BATTERY_DA9030=y -# CONFIG_HWMON is not set -CONFIG_PMIC_DA903X=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DA903X=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_FB_MBX=m -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_TDO24M=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_DA903X=m -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=m -CONFIG_SND_PXA2XX_SOC=m -CONFIG_SND_PXA2XX_SOC_EM_X270=m -CONFIG_HID_A4TECH=y -CONFIG_HID_APPLE=y -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -CONFIG_HID_CYPRESS=y -CONFIG_HID_EZKEY=y -CONFIG_HID_GYRATION=y -CONFIG_HID_LOGITECH=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=m -CONFIG_MMC_PXA=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_DA903X=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_V3020=y -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=m -# CONFIG_PROC_PAGE_MONITOR is not set -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_CIFS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_UTF8=m -CONFIG_FRAME_WARN=0 -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig deleted file mode 100644 index 806005a4c4c..00000000000 --- a/arch/arm/configs/ep93xx_defconfig +++ /dev/null @@ -1,123 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_EXPERT=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_EP93XX=y -CONFIG_CRUNCH=y -CONFIG_MACH_ADSSPHERE=y -CONFIG_MACH_EDB9301=y -CONFIG_MACH_EDB9302=y -CONFIG_MACH_EDB9307=y -CONFIG_MACH_EDB9312=y -CONFIG_MACH_EDB9315=y -CONFIG_MACH_GESBC9312=y -CONFIG_MACH_MICRO9H=y -CONFIG_MACH_MICRO9L=y -CONFIG_MACH_TS72XX=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/nfs ip=bootp" -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -# CONFIG_IPV6_SIT is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FW_LOADER is not set -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_ROM=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y -CONFIG_BLK_DEV_NBD=y -CONFIG_EEPROM_LEGACY=y -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_EP93XX_ETH=y -CONFIG_USB_RTL8150=y -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_AMBA_PL010=y -CONFIG_SERIAL_AMBA_PL010_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_DEBUG_CORE=y -CONFIG_I2C_DEBUG_ALGO=y -CONFIG_I2C_DEBUG_BUS=y -CONFIG_WATCHDOG=y -CONFIG_EP93XX_WATCHDOG=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DYNAMIC_MINORS=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_M48T86=y -CONFIG_RTC_DRV_EP93XX=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SLAB=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/eseries_pxa_defconfig b/arch/arm/configs/eseries_pxa_defconfig deleted file mode 100644 index d68ac67c201..00000000000 --- a/arch/arm/configs/eseries_pxa_defconfig +++ /dev/null @@ -1,118 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_ARCH_PXA_ESERIES=y -# CONFIG_ARM_THUMB is not set -CONFIG_IWMMXT=y -CONFIG_PCCARD=y -CONFIG_PCMCIA=m -CONFIG_PCMCIA_PXA2XX=m -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_MISC=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_IRDA=y -CONFIG_IRLAN=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -CONFIG_PXA_FICP=y -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_MAC80211_RC_PID=y -# CONFIG_MAC80211_RC_MINSTREL is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_STANDALONE is not set -CONFIG_MTD=m -CONFIG_MTD_NAND=m -CONFIG_MTD_NAND_TMIO=m -CONFIG_BLK_DEV_LOOP=m -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=m -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=m -# CONFIG_SATA_PMP is not set -CONFIG_PATA_PCMCIA=m -CONFIG_NETDEVICES=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_HERMES=m -CONFIG_PCMCIA_HERMES=m -CONFIG_NET_PCMCIA=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=m -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=m -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_WM97XX=m -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_MFD_T7L66XB=y -CONFIG_MFD_TC6387XB=y -CONFIG_MFD_TC6393XB=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_FB_W100=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_MINI_4x6=y -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_VERBOSE_PRINTK=y -# CONFIG_SND_PCMCIA is not set -CONFIG_SND_SOC=m -CONFIG_SND_PXA2XX_SOC=m -CONFIG_SND_PXA2XX_SOC_E800=m -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_MMC_TMIO=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=m -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig deleted file mode 100644 index bffe68e190a..00000000000 --- a/arch/arm/configs/exynos4_defconfig +++ /dev/null @@ -1,68 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_EXYNOS=y -CONFIG_S3C_LOWLEVEL_UART_PORT=1 -CONFIG_MACH_SMDKC210=y -CONFIG_MACH_ARMLEX4210=y -CONFIG_MACH_UNIVERSAL_C210=y -CONFIG_MACH_NURI=y -CONFIG_MACH_ORIGEN=y -CONFIG_MACH_SMDK4412=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_INFO=y -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig deleted file mode 100644 index 227abf9cc60..00000000000 --- a/arch/arm/configs/exynos_defconfig +++ /dev/null @@ -1,130 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_EXYNOS=y -CONFIG_S3C_LOWLEVEL_UART_PORT=3 -CONFIG_S3C24XX_PWM=y -CONFIG_ARCH_EXYNOS5=y -CONFIG_MACH_EXYNOS4_DT=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_RFKILL_REGULATOR=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_MD=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_CRYPT=m -CONFIG_NETDEVICES=y -CONFIG_SMSC911X=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC75XX=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_CROS_EC=y -# CONFIG_MOUSE_PS2 is not set -CONFIG_MOUSE_CYAPA=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_HW_RANDOM=y -CONFIG_TCG_TPM=y -CONFIG_TCG_TIS_I2C_INFINEON=y -CONFIG_I2C=y -CONFIG_I2C_MUX=y -CONFIG_I2C_ARB_GPIO_CHALLENGE=y -CONFIG_I2C_S3C2410=y -CONFIG_DEBUG_GPIO=y -# CONFIG_HWMON is not set -CONFIG_MFD_CROS_EC=y -CONFIG_MFD_CROS_EC_I2C=y -CONFIG_MFD_MAX77686=y -CONFIG_MFD_MAX8997=y -CONFIG_MFD_SEC_CORE=y -CONFIG_MFD_TPS65090=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX8997=y -CONFIG_REGULATOR_MAX77686=y -CONFIG_REGULATOR_S5M8767=y -CONFIG_REGULATOR_TPS65090=y -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_SIMPLE=y -CONFIG_EXYNOS_VIDEO=y -CONFIG_EXYNOS_MIPI_DSI=y -CONFIG_EXYNOS_DP=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_7x14=y -CONFIG_LOGO=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_S5P=y -CONFIG_USB_STORAGE=y -CONFIG_USB_DWC3=y -CONFIG_USB_PHY=y -CONFIG_SAMSUNG_USB2PHY=y -CONFIG_SAMSUNG_USB3PHY=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_S3C=y -CONFIG_MMC_DW=y -CONFIG_MMC_DW_IDMAC=y -CONFIG_MMC_DW_EXYNOS=y -CONFIG_COMMON_CLK_MAX77686=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig deleted file mode 100644 index d95763d5f0d..00000000000 --- a/arch/arm/configs/ezx_defconfig +++ /dev/null @@ -1,420 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOCALVERSION="-ezx200910312315" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_RD_BZIP2=y -CONFIG_RD_LZMA=y -CONFIG_EXPERT=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_PXA_EZX=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=tty1 root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=3 ip=192.168.0.202:192.168.0.200:192.168.0.200:255.255.255.0 debug" -CONFIG_KEXEC=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m -CONFIG_CPU_IDLE=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -CONFIG_IPV6_TUNNEL=m -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_BRIDGE=m -CONFIG_BT=y -CONFIG_BT_L2CAP=y -CONFIG_BT_SCO=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTSDIO=m -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_CONNECTOR=m -CONFIG_MTD=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_OTP=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PXA2XX=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=y -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_PXA27x=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_PCAP=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -CONFIG_INPUT_PCAP=y -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=8 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_GPIO_SYSFS=y -CONFIG_POWER_SUPPLY=y -# CONFIG_HWMON is not set -CONFIG_EZX_PCAP=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DEBUG=y -CONFIG_REGULATOR_VIRTUAL_CONSUMER=y -CONFIG_REGULATOR_USERSPACE_CONSUMER=y -CONFIG_REGULATOR_PCAP=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y -CONFIG_MEDIA_TUNER_CUSTOMISE=y -# CONFIG_MEDIA_TUNER_SIMPLE is not set -# CONFIG_MEDIA_TUNER_TDA8290 is not set -# CONFIG_MEDIA_TUNER_TDA827X is not set -# CONFIG_MEDIA_TUNER_TDA18271 is not set -# CONFIG_MEDIA_TUNER_TDA9887 is not set -# CONFIG_MEDIA_TUNER_TEA5761 is not set -# CONFIG_MEDIA_TUNER_TEA5767 is not set -# CONFIG_MEDIA_TUNER_MT20XX is not set -# CONFIG_MEDIA_TUNER_MT2060 is not set -# CONFIG_MEDIA_TUNER_MT2266 is not set -# CONFIG_MEDIA_TUNER_MT2131 is not set -# CONFIG_MEDIA_TUNER_QT1010 is not set -# CONFIG_MEDIA_TUNER_XC2028 is not set -# CONFIG_MEDIA_TUNER_XC5000 is not set -# CONFIG_MEDIA_TUNER_MXL5005S is not set -# CONFIG_MEDIA_TUNER_MXL5007T is not set -# CONFIG_MEDIA_TUNER_MC44S803 is not set -# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set -CONFIG_SOC_CAMERA=y -CONFIG_SOC_CAMERA_MT9M111=y -CONFIG_VIDEO_PXA27x=y -# CONFIG_V4L_USB_DRIVERS is not set -CONFIG_RADIO_TEA5764=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_FB_PXA_OVERLAY=y -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_MINI_4x6=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_PXA2XX_SOC=y -# CONFIG_USB_HID is not set -CONFIG_HID_APPLE=m -CONFIG_USB=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_GADGET=y -CONFIG_USB_PXA27X=y -CONFIG_USB_ETH=m -# CONFIG_USB_ETH_RNDIS is not set -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=m -CONFIG_MMC_PXA=y -CONFIG_MMC_SPI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_LP3944=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCAP=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=m -CONFIG_REISERFS_FS=m -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_XFS_FS=m -CONFIG_INOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=m -CONFIG_CUSE=m -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -CONFIG_ROMFS_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_SMB_FS=m -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_PROVE_LOCKING=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_LRW=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_VMAC=m -CONFIG_CRYPTO_GHASH=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_SEED=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_TWOFISH=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig deleted file mode 100644 index 038518ab39a..00000000000 --- a/arch/arm/configs/footbridge_defconfig +++ /dev/null @@ -1,127 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_HOTPLUG is not set -CONFIG_MODULES=y -CONFIG_ARCH_FOOTBRIDGE=y -CONFIG_ARCH_CATS=y -CONFIG_ARCH_PERSONAL_SERVER=y -CONFIG_ARCH_EBSA285_HOST=y -CONFIG_ARCH_NETWINDER=y -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_SYN_COOKIES=y -# CONFIG_IPV6 is not set -CONFIG_ATM=y -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -CONFIG_IRDA_DEBUG=y -CONFIG_WINBOND_FIR=m -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_FIFO=y -CONFIG_PARPORT_1284=y -CONFIG_PNP=y -CONFIG_ISAPNP=y -CONFIG_PARIDE=m -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=y -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=y -CONFIG_NET_PCI=y -CONFIG_NE2K_PCI=y -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_SERIAL_21285=y -CONFIG_SERIAL_21285_CONSOLE=y -CONFIG_PRINTER=m -CONFIG_DS1620=y -CONFIG_NWBUTTON=y -CONFIG_NWBUTTON_REBOOT=y -CONFIG_NWFLASH=m -CONFIG_I2C=m -CONFIG_WATCHDOG=y -CONFIG_SOFT_WATCHDOG=y -CONFIG_21285_WATCHDOG=m -CONFIG_977_WATCHDOG=m -CONFIG_FB=y -CONFIG_FB_CYBER2000=y -CONFIG_SOUND=m -# CONFIG_USB_HID is not set -CONFIG_USB=m -CONFIG_USB_DEBUG=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=m -CONFIG_USB_PRINTER=m -CONFIG_EXT2_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_ADFS_FS=m -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_ACORN_PARTITION=y -CONFIG_ACORN_PARTITION_ADFS=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_15=m -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig deleted file mode 100644 index 317960f1248..00000000000 --- a/arch/arm/configs/h3600_defconfig +++ /dev/null @@ -1,79 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_H3600=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_CPU_FREQ_STAT is not set -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_SA1100_FIR=m -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_MISC_DEVICES is not set -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECS=y -CONFIG_NETDEVICES=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=y -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_SA1100=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=m -CONFIG_NFS_FS=y -CONFIG_NFSD=m -CONFIG_SMB_FS=m -CONFIG_NLS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set diff --git a/arch/arm/configs/h5000_defconfig b/arch/arm/configs/h5000_defconfig deleted file mode 100644 index 37903e3f0ef..00000000000 --- a/arch/arm/configs/h5000_defconfig +++ /dev/null @@ -1,82 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EXPERT=y -# CONFIG_UID16 is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_H5000=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="keepinitrd" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=32 -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -# CONFIG_USB_ETH_RNDIS is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -# CONFIG_PROC_PAGE_MONITOR is not set -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_FTRACE is not set -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/hackkit_defconfig b/arch/arm/configs/hackkit_defconfig deleted file mode 100644 index bed80472992..00000000000 --- a/arch/arm/configs/hackkit_defconfig +++ /dev/null @@ -1,49 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_HACKKIT=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySA0,115200 root=/dev/ram0 initrd=0xc0400000,8M init=/rootshell" -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_SYN_COOKIES=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=3 -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig deleted file mode 100644 index fd996bb1302..00000000000 --- a/arch/arm/configs/imote2_defconfig +++ /dev/null @@ -1,392 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_RD_BZIP2=y -CONFIG_RD_LZMA=y -CONFIG_EXPERT=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_INTELMOTE2=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS2,115200 mem=32M" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -CONFIG_IPV6_TUNNEL=m -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_BRIDGE=m -# CONFIG_BRIDGE_IGMP_SNOOPING is not set -CONFIG_IEEE802154=y -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_FW_LOADER=m -CONFIG_CONNECTOR=m -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_AFS_PARTS=y -CONFIG_MTD_AR7_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_OTP=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PXA2XX=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=y -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_PXA27x=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=8 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_GPIO_SYSFS=y -CONFIG_POWER_SUPPLY=y -# CONFIG_HWMON is not set -CONFIG_PMIC_DA903X=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DEBUG=y -CONFIG_REGULATOR_VIRTUAL_CONSUMER=y -CONFIG_REGULATOR_USERSPACE_CONSUMER=y -CONFIG_REGULATOR_DA903X=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y -CONFIG_MEDIA_TUNER_CUSTOMISE=y -# CONFIG_MEDIA_TUNER_SIMPLE is not set -# CONFIG_MEDIA_TUNER_TDA8290 is not set -# CONFIG_MEDIA_TUNER_TDA827X is not set -# CONFIG_MEDIA_TUNER_TDA18271 is not set -# CONFIG_MEDIA_TUNER_TDA9887 is not set -# CONFIG_MEDIA_TUNER_TEA5761 is not set -# CONFIG_MEDIA_TUNER_TEA5767 is not set -# CONFIG_MEDIA_TUNER_MT20XX is not set -# CONFIG_MEDIA_TUNER_MT2060 is not set -# CONFIG_MEDIA_TUNER_MT2266 is not set -# CONFIG_MEDIA_TUNER_MT2131 is not set -# CONFIG_MEDIA_TUNER_QT1010 is not set -# CONFIG_MEDIA_TUNER_XC2028 is not set -# CONFIG_MEDIA_TUNER_XC5000 is not set -# CONFIG_MEDIA_TUNER_MXL5005S is not set -# CONFIG_MEDIA_TUNER_MXL5007T is not set -# CONFIG_MEDIA_TUNER_MC44S803 is not set -# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set -CONFIG_SOC_CAMERA=y -CONFIG_SOC_CAMERA_MT9M111=y -CONFIG_VIDEO_PXA27x=y -# CONFIG_V4L_USB_DRIVERS is not set -# CONFIG_RADIO_ADAPTERS is not set -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_FB_PXA_OVERLAY=y -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_MINI_4x6=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_PXA2XX_SOC=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_GADGET=y -CONFIG_USB_PXA27X=y -CONFIG_USB_ETH=m -# CONFIG_USB_ETH_RNDIS is not set -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=m -CONFIG_MMC_PXA=y -CONFIG_MMC_SPI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_LP3944=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PXA=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=m -CONFIG_INOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=m -CONFIG_CUSE=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_WBUF_VERIFY=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_FS_XATTR=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -CONFIG_ROMFS_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_SMB_FS=m -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_PROVE_LOCKING=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_LRW=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_VMAC=m -CONFIG_CRYPTO_GHASH=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_SEED=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_TWOFISH=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC16=y diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig deleted file mode 100644 index f07a847b00c..00000000000 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ /dev/null @@ -1,200 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_EXPERT=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_MXC=y -CONFIG_ARCH_MULTI_V4T=y -CONFIG_ARCH_MULTI_V5=y -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_MX1ADS=y -CONFIG_MACH_SCB9328=y -CONFIG_MACH_APF9328=y -CONFIG_MACH_MX21ADS=y -CONFIG_MACH_MX25_3DS=y -CONFIG_MACH_EUKREA_CPUIMX25SD=y -CONFIG_MACH_MX27ADS=y -CONFIG_MACH_PCM038=y -CONFIG_MACH_CPUIMX27=y -CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2=y -CONFIG_MACH_EUKREA_CPUIMX27_USEUART4=y -CONFIG_MACH_MX27_3DS=y -CONFIG_MACH_IMX27_VISSTRIM_M10=y -CONFIG_MACH_IMX27LITE=y -CONFIG_MACH_PCA100=y -CONFIG_MACH_MXT_TD60=y -CONFIG_MACH_IMX27IPCAM=y -CONFIG_MACH_IMX27_DT=y -CONFIG_MXC_IRQ_PRIOR=y -CONFIG_MXC_PWM=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -CONFIG_PM_DEBUG=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_ATA=y -CONFIG_PATA_IMX=y -CONFIG_NETDEVICES=y -CONFIG_CS89x0=y -CONFIG_CS89x0_PLATFORM=y -CONFIG_DM9000=y -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -CONFIG_SMSC_PHY=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_IMX=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=m -CONFIG_TOUCHSCREEN_MC13783=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_W1=y -CONFIG_W1_MASTER_MXC=y -CONFIG_W1_SLAVE_THERM=y -CONFIG_HWMON=m -CONFIG_SENSORS_MC13783_ADC=m -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_SOC_CAMERA=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_VIDEO_MX2=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_CODA=y -CONFIG_FB=y -CONFIG_FB_IMX=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_MX27VIS_AIC32X4=y -CONFIG_SND_SOC_PHYCORE_AC97=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_USB_HID=m -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_ULPI=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MMC_MXC=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_MC13783=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_RTC_DRV_IMXDI=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_IMX_DMA=y -CONFIG_COMMON_CLK_DEBUG=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -# CONFIG_DNOTIFY is not set -# CONFIG_PROC_PAGE_MONITOR is not set -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig deleted file mode 100644 index 6ec010f248b..00000000000 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ /dev/null @@ -1,261 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MXC=y -CONFIG_ARCH_MULTI_V6=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_MACH_IMX31_DT=y -CONFIG_MACH_MX31LILLY=y -CONFIG_MACH_MX31LITE=y -CONFIG_MACH_PCM037=y -CONFIG_MACH_PCM037_EET=y -CONFIG_MACH_MX31_3DS=y -CONFIG_MACH_MX31MOBOARD=y -CONFIG_MACH_QONG=y -CONFIG_MACH_ARMADILLO5X0=y -CONFIG_MACH_KZM_ARM11_01=y -CONFIG_MACH_PCM043=y -CONFIG_MACH_MX35_3DS=y -CONFIG_MACH_VPR200=y -CONFIG_MACH_IMX51_DT=y -CONFIG_MACH_EUKREA_CPUIMX51SD=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_MXC_PWM=y -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -CONFIG_NETFILTER=y -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_PATA_IMX=y -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -CONFIG_CS89x0=y -CONFIG_CS89x0_PLATFORM=y -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_SERIO_SERPORT=m -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_MXC_RNGA=y -CONFIG_I2C=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_MC9S08DZ60=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_SOC_CAMERA=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_VIDEO_MX3=y -CONFIG_FB=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_PHYCORE_AC97=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_PHY=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_DRM_IMX=y -CONFIG_DRM_IMX_IPUV3_CORE=y -CONFIG_DRM_IMX_IPUV3=y -CONFIG_COMMON_CLK_DEBUG=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_SECURITYFS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m diff --git a/arch/arm/configs/integrator_defconfig b/arch/arm/configs/integrator_defconfig deleted file mode 100644 index a8314c3ee84..00000000000 --- a/arch/arm/configs/integrator_defconfig +++ /dev/null @@ -1,90 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_TINY_RCU=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_ARCH_INTEGRATOR=y -CONFIG_ARCH_INTEGRATOR_AP=y -CONFIG_ARCH_INTEGRATOR_CP=y -CONFIG_CPU_ARM720T=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_ARM922T=y -CONFIG_CPU_ARM926T=y -CONFIG_CPU_ARM1020=y -CONFIG_CPU_ARM1022=y -CONFIG_CPU_ARM1026=y -CONFIG_PCI=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_AFS_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_E100=y -CONFIG_SMC91X=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_AMBA_PL010=y -CONFIG_SERIAL_AMBA_PL010_CONSOLE=y -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_ARMCLCD=y -CONFIG_FB_MATROX=y -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PL030=y -CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y diff --git a/arch/arm/configs/iop13xx_defconfig b/arch/arm/configs/iop13xx_defconfig deleted file mode 100644 index 4fa94a1f115..00000000000 --- a/arch/arm/configs/iop13xx_defconfig +++ /dev/null @@ -1,124 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_IOP13XX=y -CONFIG_MACH_IQ81340SC=y -CONFIG_MACH_IQ81340MC=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="ip=bootp root=nfs console=ttyS0,115200 nfsroot=,tcp,v3,wsize=8192,rsize=8192" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -# CONFIG_IPV6_SIT is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=2 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_ISCSI_ATTRS=y -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -CONFIG_MD_RAID10=y -CONFIG_MD_RAID456=y -CONFIG_BLK_DEV_DM=y -CONFIG_NETDEVICES=y -CONFIG_E1000=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_IOP3XX=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_DMADEVICES=y -CONFIG_INTEL_IOP_ADMA=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_ECRYPT_FS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_CIFS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS=y -CONFIG_DEBUG_USER=y -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ANUBIS=y -CONFIG_CRYPTO_ARC4=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAST5=y -CONFIG_CRYPTO_CAST6=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_KHAZAD=y -CONFIG_CRYPTO_SERPENT=y -CONFIG_CRYPTO_TEA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRC_CCITT=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/iop32x_defconfig b/arch/arm/configs/iop32x_defconfig deleted file mode 100644 index 4f2ec3ac138..00000000000 --- a/arch/arm/configs/iop32x_defconfig +++ /dev/null @@ -1,135 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_IOP32X=y -CONFIG_MACH_GLANTANK=y -CONFIG_ARCH_IQ80321=y -CONFIG_ARCH_IQ31244=y -CONFIG_MACH_N2100=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp cachepolicy=writealloc" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -# CONFIG_IPV6_SIT is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_ATA=y -CONFIG_SATA_SIL=y -CONFIG_SATA_VITESSE=y -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -CONFIG_MD_RAID10=y -CONFIG_MD_RAID456=y -CONFIG_BLK_DEV_DM=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_E100=y -CONFIG_E1000=y -CONFIG_R8169=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IOP3XX=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_UHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_RS5C372=y -CONFIG_DMADEVICES=y -CONFIG_INTEL_IOP_ADMA=y -CONFIG_NET_DMA=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_ECRYPT_FS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ANUBIS=y -CONFIG_CRYPTO_ARC4=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAST5=y -CONFIG_CRYPTO_CAST6=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_KHAZAD=y -CONFIG_CRYPTO_SERPENT=y -CONFIG_CRYPTO_TEA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/iop33x_defconfig b/arch/arm/configs/iop33x_defconfig deleted file mode 100644 index aa36128abca..00000000000 --- a/arch/arm/configs/iop33x_defconfig +++ /dev/null @@ -1,91 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_IOP33X=y -CONFIG_ARCH_IQ80331=y -CONFIG_MACH_IQ80332=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp cachepolicy=writealloc iop3xx_init_atu=y" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -# CONFIG_IPV6_SIT is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -CONFIG_MD_RAID456=y -CONFIG_BLK_DEV_DM=y -CONFIG_NETDEVICES=y -CONFIG_E1000=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IOP3XX=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_DMADEVICES=y -CONFIG_INTEL_IOP_ADMA=y -CONFIG_NET_DMA=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig deleted file mode 100644 index 063e2ab2c8f..00000000000 --- a/arch/arm/configs/ixp4xx_defconfig +++ /dev/null @@ -1,205 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_MODULES=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_IXP4XX=y -CONFIG_MACH_NSLU2=y -CONFIG_MACH_AVILA=y -CONFIG_MACH_LOFT=y -CONFIG_ARCH_ADI_COYOTE=y -CONFIG_MACH_GATEWAY7001=y -CONFIG_MACH_WG302V2=y -CONFIG_ARCH_IXDP425=y -CONFIG_MACH_IXDPG425=y -CONFIG_MACH_IXDP465=y -CONFIG_MACH_KIXRP435=y -CONFIG_ARCH_PRPMC1100=y -CONFIG_MACH_NAS100D=y -CONFIG_MACH_DSMG600=y -CONFIG_MACH_FSG=y -CONFIG_MACH_GTWX5715=y -CONFIG_IXP4XX_QMGR=y -CONFIG_IXP4XX_NPE=y -# CONFIG_ARM_THUMB is not set -CONFIG_CPU_BIG_ENDIAN=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_IP_VS=m -CONFIG_IP_VS_DEBUG=y -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_IPX=m -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -CONFIG_ECONET=m -CONFIG_ECONET_AUNUDP=y -CONFIG_ECONET_NATIVE=y -CONFIG_WAN_ROUTER=m -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -CONFIG_NET_PKTGEN=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_IXP4XX=y -CONFIG_MTD_NAND=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_EEPROM_LEGACY=y -CONFIG_IDE=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_HPT366=y -CONFIG_BLK_DEV_PDC202XX_NEW=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_VIA=y -CONFIG_PATA_ARTOP=y -CONFIG_PATA_IXP4XX_CF=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_IXP4XX_ETH=y -CONFIG_NET_PCI=y -CONFIG_WAN=y -CONFIG_HDLC=m -CONFIG_HDLC_RAW=m -CONFIG_HDLC_CISCO=m -CONFIG_HDLC_FR=m -CONFIG_HDLC_PPP=m -CONFIG_HDLC_X25=m -CONFIG_DLCI=m -CONFIG_WAN_ROUTER_DRIVERS=m -CONFIG_ATM_TCP=m -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_IXP4XX_BEEPER=y -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_SENSORS_W83781D=y -CONFIG_WATCHDOG=y -CONFIG_IXP4XX_WATCHDOG=y -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_UHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_FSG=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_ISL1208=y -CONFIG_RTC_DRV_X1205=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig deleted file mode 100644 index ea80e7e867c..00000000000 --- a/arch/arm/configs/jornada720_defconfig +++ /dev/null @@ -1,112 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_MODULES=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_JORNADA720=y -CONFIG_SA1100_JORNADA720_SSP=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRCOMM=m -CONFIG_SA1100_FIR=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECS=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_NET_ETHERNET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_NET_PCMCIA=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_HP7XX=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_HP7XX=y -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=32 -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_S1D13XXX=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_DEBUG_KERNEL=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig deleted file mode 100644 index a1d8252e9ec..00000000000 --- a/arch/arm/configs/kirkwood_defconfig +++ /dev/null @@ -1,200 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=19 -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_KIRKWOOD=y -CONFIG_MACH_D2NET_V2=y -CONFIG_MACH_DB88F6281_BP=y -CONFIG_MACH_DOCKSTAR=y -CONFIG_MACH_ESATA_SHEEVAPLUG=y -CONFIG_MACH_GURUPLUG=y -CONFIG_MACH_INETSPACE_V2=y -CONFIG_MACH_MV88F6281GTW_GE=y -CONFIG_MACH_NET2BIG_V2=y -CONFIG_MACH_NET5BIG_V2=y -CONFIG_MACH_NETSPACE_MAX_V2=y -CONFIG_MACH_NETSPACE_V2=y -CONFIG_MACH_OPENRD_BASE=y -CONFIG_MACH_OPENRD_CLIENT=y -CONFIG_MACH_OPENRD_ULTIMATE=y -CONFIG_MACH_RD88F6192_NAS=y -CONFIG_MACH_RD88F6281=y -CONFIG_MACH_SHEEVAPLUG=y -CONFIG_MACH_T5325=y -CONFIG_MACH_TS219=y -CONFIG_MACH_TS41X=y -CONFIG_MACH_CLOUDBOX_DT=y -CONFIG_MACH_DLINK_KIRKWOOD_DT=y -CONFIG_MACH_DOCKSTAR_DT=y -CONFIG_MACH_DREAMPLUG_DT=y -CONFIG_MACH_GOFLEXNET_DT=y -CONFIG_MACH_GURUPLUG_DT=y -CONFIG_MACH_IB62X0_DT=y -CONFIG_MACH_ICONNECT_DT=y -CONFIG_MACH_INETSPACE_V2_DT=y -CONFIG_MACH_IOMEGA_IX2_200_DT=y -CONFIG_MACH_KM_KIRKWOOD_DT=y -CONFIG_MACH_LSXL_DT=y -CONFIG_MACH_MPLCEC4_DT=y -CONFIG_MACH_NETSPACE_LITE_V2_DT=y -CONFIG_MACH_NETSPACE_MAX_V2_DT=y -CONFIG_MACH_NETSPACE_MINI_V2_DT=y -CONFIG_MACH_NETSPACE_V2_DT=y -CONFIG_MACH_NSA310_DT=y -CONFIG_MACH_OPENBLOCKS_A6_DT=y -CONFIG_MACH_READYNAS_DT=y -CONFIG_MACH_TOPKICK_DT=y -CONFIG_MACH_TS219_DT=y -# CONFIG_CPU_FEROCEON_OLD_ID is not set -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CPU_IDLE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_NET_DSA=y -CONFIG_NET_PKTGEN=m -CONFIG_CFG80211=y -CONFIG_MAC80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ORION=y -CONFIG_BLK_DEV_LOOP=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_MV=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_NET_DSA_MV88E6123_61_65=y -CONFIG_MV643XX_ETH=y -CONFIG_MARVELL_PHY=y -CONFIG_LIBERTAS=y -CONFIG_LIBERTAS_SDIO=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_OF_PLATFORM=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MV64XXX=y -CONFIG_SPI=y -CONFIG_SPI_ORION=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_KIRKWOOD_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_ORION_WATCHDOG=y -CONFIG_HID_DRAGONRISE=y -CONFIG_HID_GYRATION=y -CONFIG_HID_TWINHAN=y -CONFIG_HID_NTRIG=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -CONFIG_HID_SMARTJOYPLUS=y -CONFIG_HID_TOPSEED=y -CONFIG_HID_THRUSTMASTER=y -CONFIG_HID_ZEROPLUS=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_MMC=y -CONFIG_SDIO_UART=y -CONFIG_MMC_MVSDIO=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_S35390A=y -CONFIG_RTC_DRV_MV=y -CONFIG_DMADEVICES=y -CONFIG_MV_XOR=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_MV_CESA=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/kota2_defconfig b/arch/arm/configs/kota2_defconfig deleted file mode 100644 index 57ad3d47de7..00000000000 --- a/arch/arm/configs/kota2_defconfig +++ /dev/null @@ -1,121 +0,0 @@ -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_CGROUPS=y -CONFIG_CPUSETS=y -CONFIG_NAMESPACES=y -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_KEYBOARD_GPIO_POLLED=y -CONFIG_ARCH_SH73A0=y -CONFIG_MACH_KOTA2=y -CONFIG_MEMORY_SIZE=0x1e000000 -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_SWP_EMULATE is not set -CONFIG_CPU_BPREDICT_DISABLE=y -CONFIG_ARM_ERRATA_460075=y -CONFIG_ARM_ERRATA_742230=y -CONFIG_ARM_ERRATA_742231=y -CONFIG_PL310_ERRATA_588369=y -CONFIG_ARM_ERRATA_720789=y -CONFIG_PL310_ERRATA_727915=y -CONFIG_ARM_ERRATA_743622=y -CONFIG_ARM_ERRATA_751472=y -CONFIG_PL310_ERRATA_753970=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_PL310_ERRATA_769419=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel" -CONFIG_CMDLINE_FORCE=y -CONFIG_KEXEC=y -CONFIG_CPU_IDLE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_CFG80211=y -CONFIG_WIRELESS_EXT_SYSFS=y -CONFIG_MAC80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_BLK_DEV is not set -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_B43=y -CONFIG_B43_PHY_N=y -CONFIG_B43_DEBUG=y -CONFIG_INPUT_SPARSEKMAP=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_SH_KEYSC=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=9 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C_SH_MOBILE=y -# CONFIG_HWMON is not set -CONFIG_BCMA=y -CONFIG_BCMA_DEBUG=y -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=y -CONFIG_LCD_PLATFORM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_SDHI=y -CONFIG_MMC_SH_MMCIF=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_RENESAS_TPU=y -CONFIG_LEDS_TRIGGERS=y -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_INFO_REDUCED=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/kr076_debug_defconfig b/arch/arm/configs/kr076_debug_defconfig deleted file mode 100755 index 7cc33f280ce..00000000000 --- a/arch/arm/configs/kr076_debug_defconfig +++ /dev/null @@ -1,3238 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="kr076" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -# CONFIG_CUSTOM_KERNEL_GYROSCOPE is not set -# CONFIG_CUSTOM_KERNEL_ALSPS is not set -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov2680_raw s5k5e2ya_mipi_raw hi708_yuv gc2355_raw" -CONFIG_CUSTOM_KERNEL_LCM="kr076_ek79007_wsvga_dsi_vdo" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/10/2015,969435, -#modify lk kernel logo direction to 180 and use wsvganl logo resource to resolve charging blue screen. -CONFIG_MTK_LCM_PHYSICAL_ROTATION="180" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -CONFIG_LCM_HEIGHT="600" -CONFIG_LCM_WIDTH="1024" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -# CONFIG_MTK_NFC is not set -# CONFIG_NFC_MT6605 is not set -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -# CONFIG_MTK_WAPI_SUPPORT is not set -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_MPU6050G is not set -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -CONFIG_MTK_BMA2XX=y -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -# CONFIG_MTK_MPU6050GY is not set -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM09911 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=n #remove vibrator by lizhi.wu@tcl.com 2015-3-27 -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/21/2015,980108, -#enable internal HDMI and disable HDCP for HDMI -CONFIG_MTK_HDMI_HDCP_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/16/2015,970453, -#disable AAL for screen white strips when device rebooting through factory function. -CONFIG_MTK_AAL_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/kr076_defconfig b/arch/arm/configs/kr076_defconfig deleted file mode 100755 index edf2c2ab05f..00000000000 --- a/arch/arm/configs/kr076_defconfig +++ /dev/null @@ -1,3225 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="kr076" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -# CONFIG_CUSTOM_KERNEL_GYROSCOPE is not set -# CONFIG_CUSTOM_KERNEL_ALSPS is not set -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov2680_raw s5k5e2ya_mipi_raw hi708_yuv gc2355_raw" -CONFIG_CUSTOM_KERNEL_LCM="kr076_ek79007_wsvga_dsi_vdo" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -#[FEATURE]-Mod by SCDTABLET.(xiangzhou.cen),04/16/2015, -#modify LCM to 90 -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/10/2015,969435, -#modify lk kernel logo direction to 180 and use wsvganl logo resource to resolve charging blue screen. -CONFIG_MTK_LCM_PHYSICAL_ROTATION="90" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -CONFIG_LCM_HEIGHT="600" -CONFIG_LCM_WIDTH="1024" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -# CONFIG_MTK_NFC is not set -# CONFIG_NFC_MT6605 is not set -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -# CONFIG_MTK_WAPI_SUPPORT is not set -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_MPU6050G is not set -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -CONFIG_MTK_BMA2XX=y -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -# CONFIG_MTK_MPU6050GY is not set -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM09911 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=n #remove vibrator by lizhi.wu@tcl.com 2015-3-27 -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/21/2015,980108, -#enable internal HDMI and disable HDCP for HDMI -CONFIG_MTK_HDMI_HDCP_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/16/2015,970453, -#disable AAL for screen white strips when device rebooting through factory function. -CONFIG_MTK_AAL_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/kr076_nand_debug_defconfig b/arch/arm/configs/kr076_nand_debug_defconfig deleted file mode 100644 index 8a8729518e9..00000000000 --- a/arch/arm/configs/kr076_nand_debug_defconfig +++ /dev/null @@ -1,3255 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=0 -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="kr076_nand" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -CONFIG_MTK_MLC_NAND_SUPPORT=y -# CONFIG_FPGA_EARLY_PORTING is not set -# CONFIG_MTK_EMMC_SUPPORT is not set -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -# CONFIG_CUSTOM_KERNEL_GYROSCOPE is not set -# CONFIG_CUSTOM_KERNEL_ALSPS is not set -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov2680_raw s5k5e2ya_mipi_raw hi708_yuv gc2355_raw" -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,02/4/2015, -#add ek79007 lcd for KD. -CONFIG_CUSTOM_KERNEL_LCM="kr076_starry_ek79007_wsvga_dsi_vdo" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/10/2015,969435, -#modify lk kernel logo direction to 180 and use wsvganl logo resource to resolve charging blue screen. -CONFIG_MTK_LCM_PHYSICAL_ROTATION="180" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,02/4/2015, -#add ek79007 lcd for KD. -CONFIG_LCM_HEIGHT="600" -CONFIG_LCM_WIDTH="1024" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -# CONFIG_MTK_NFC is not set -# CONFIG_NFC_MT6605 is not set -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_MTD_NAND=y -# CONFIG_MTK_MTD_NAND_INTERRUPT_SCHEME is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_MPU6050G is not set -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -CONFIG_MTK_BMA2XX=y -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -# CONFIG_MTK_MPU6050GY is not set -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM09911 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -#CONFIG_MTK_VIBRATOR=y /* [PLATFORM]Removed by TCTSZ.lizhi.wu, 2015.4.13*/ -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/21/2015,980108, -#enable internal HDMI and disable HDCP for HDMI -CONFIG_MTK_HDMI_HDCP_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_COMBO_NAND_SUPPORT=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/16/2015,970453, -#disable AAL for screen white strips when device rebooting through factory function. -CONFIG_MTK_AAL_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/kr076_nand_defconfig b/arch/arm/configs/kr076_nand_defconfig deleted file mode 100644 index b73979d3a58..00000000000 --- a/arch/arm/configs/kr076_nand_defconfig +++ /dev/null @@ -1,3242 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=0 -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="kr076_nand" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -CONFIG_MTK_MLC_NAND_SUPPORT=y -# CONFIG_FPGA_EARLY_PORTING is not set -# CONFIG_MTK_EMMC_SUPPORT is not set -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -# CONFIG_CUSTOM_KERNEL_GYROSCOPE is not set -# CONFIG_CUSTOM_KERNEL_ALSPS is not set -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov2680_raw s5k5e2ya_mipi_raw hi708_yuv gc2355_raw" -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,02/4/2015, -#add ek79007 lcd for KD. -CONFIG_CUSTOM_KERNEL_LCM="kr076_starry_ek79007_wsvga_dsi_vdo" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -#[FEATURE]-Mod by SCDTABLET.(xiangzhou.cen),04/16/2015, -#modify LCM to 90 -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/10/2015, -#modify lk kernel logo direction to 180 and use wsvganl logo resource to resolve charging blue screen. -CONFIG_MTK_LCM_PHYSICAL_ROTATION="90" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,02/4/2015, -#add ek79007 lcd for KD. -CONFIG_LCM_HEIGHT="600" -CONFIG_LCM_WIDTH="1024" -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -# CONFIG_MTK_NFC is not set -# CONFIG_NFC_MT6605 is not set -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_MTD_NAND=y -# CONFIG_MTK_MTD_NAND_INTERRUPT_SCHEME is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_MPU6050G is not set -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -CONFIG_MTK_BMA2XX=y -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -# CONFIG_MTK_MPU6050GY is not set -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM09911 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -#CONFIG_MTK_VIBRATOR=y /* [PLATFORM]-Removed by TCTSZ.lizhi.wu, 2015.4.13*/ -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/21/2015,980108, -#enable internal HDMI and disable HDCP for HDMI -CONFIG_MTK_HDMI_HDCP_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_COMBO_NAND_SUPPORT=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -#[BUGFIX]-Mod-BEGIN by SCDTABLET.jinghuang@tcl.com,03/16/2015,970453, -#disable AAL for screen white strips when device rebooting through factory function. -CONFIG_MTK_AAL_SUPPORT=n -#[BUGFIX]-Mod-END by SCDTABLET.jinghuang@tcl.com -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/ks8695_defconfig b/arch/arm/configs/ks8695_defconfig deleted file mode 100644 index 47c488379f8..00000000000 --- a/arch/arm/configs/ks8695_defconfig +++ /dev/null @@ -1,75 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_KS8695=y -CONFIG_MACH_KS8695=y -CONFIG_MACH_DSM320=y -# CONFIG_ARM_THUMB is not set -CONFIG_PCI=y -CONFIG_PCI_DEBUG=y -CONFIG_PCCARD=y -CONFIG_YENTA=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw" -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PRISM54=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_KS8695=y -CONFIG_SERIAL_KS8695_CONSOLE=y -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/kzm9d_defconfig b/arch/arm/configs/kzm9d_defconfig deleted file mode 100644 index 6c37f4a98eb..00000000000 --- a/arch/arm/configs/kzm9d_defconfig +++ /dev/null @@ -1,88 +0,0 @@ -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_PERF_EVENTS=y -CONFIG_SLAB=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_EMEV2=y -CONFIG_MACH_KZM9D=y -CONFIG_MEMORY_START=0x40000000 -CONFIG_MEMORY_SIZE=0x10000000 -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_SWP_EMULATE is not set -# CONFIG_CACHE_L2X0 is not set -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_HOTPLUG_CPU=y -# CONFIG_LOCAL_TIMERS is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_CROSS_MEMORY_ATTACH is not set -CONFIG_FORCE_MAX_ZONEORDER=13 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_BLK_DEV is not set -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_EM=y -# CONFIG_HW_RANDOM is not set -CONFIG_GPIOLIB=y -CONFIG_GPIO_EM=y -# CONFIG_HWMON is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_IOMMU_SUPPORT is not set -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -# CONFIG_FTRACE is not set diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig deleted file mode 100644 index f6e585b353a..00000000000 --- a/arch/arm/configs/kzm9g_defconfig +++ /dev/null @@ -1,149 +0,0 @@ -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_NAMESPACES=y -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_PERF_EVENTS=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_SH73A0=y -CONFIG_MACH_KZM9G=y -CONFIG_MEMORY_START=0x41000000 -CONFIG_MEMORY_SIZE=0x1f000000 -CONFIG_ARM_ERRATA_743622=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_SCHED_MC=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_KEXEC=y -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_IRDA=y -CONFIG_SH_IRDA=y -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -CONFIG_SMSC911X=y -# CONFIG_WLAN is not set -CONFIG_INPUT_SPARSEKMAP=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ST1232=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_ADXL34X=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=9 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_SH_MOBILE=y -CONFIG_GPIO_PCF857X=y -# CONFIG_HWMON is not set -CONFIG_REGULATOR=y -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_FB_SH_MOBILE_MERAM=y -CONFIG_SOUND=y -CONFIG_SND=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_SOC_SH4_FSI=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_R8A66597_HCD=y -CONFIG_USB_RENESAS_USBHS=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_RENESAS_USBHS_UDC=y -CONFIG_USB_ETH=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_SDHI=y -CONFIG_MMC_SH_MMCIF=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_RS5C372=y -CONFIG_DMADEVICES=y -CONFIG_SH_DMAE=y -CONFIG_ASYNC_TX_DMA=y -CONFIG_STAGING=y -CONFIG_SENSORS_AK8975=y -CONFIG_IIO=y -# CONFIG_DNOTIFY is not set -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_V4_1=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_CRYPTO=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_DES=y -CONFIG_CRC16=y diff --git a/arch/arm/configs/lart_defconfig b/arch/arm/configs/lart_defconfig deleted file mode 100644 index faa2865658a..00000000000 --- a/arch/arm/configs/lart_defconfig +++ /dev/null @@ -1,75 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_LART=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySA0,9600 root=/dev/ram" -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=m -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_SYN_COOKIES=y -# CONFIG_IPV6 is not set -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_DEBUG=y -CONFIG_SA1100_FIR=m -CONFIG_MTD=y -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=1 -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_LART=y -CONFIG_BLK_DEV_RAM=y -CONFIG_IDE=m -CONFIG_BLK_DEV_IDECD=m -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_NET_ETHERNET=y -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=m -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=m -CONFIG_REISERFS_FS=m -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=1 -CONFIG_CRAMFS=m -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=m -CONFIG_DEBUG_USER=y -CONFIG_CRC32=m diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig deleted file mode 100644 index 398a367ffce..00000000000 --- a/arch/arm/configs/lpc32xx_defconfig +++ /dev/null @@ -1,208 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_SYSFS_DEPRECATED=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_LPC32XX=y -CONFIG_GPIO_PCA953X=y -CONFIG_KEYBOARD_GPIO_POLLED=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="console=ttyS0,115200n81 root=/dev/ram0" -CONFIG_CPU_IDLE=y -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FW_LOADER is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_SLC_LPC32XX=y -CONFIG_MTD_NAND_MLC_LPC32XX=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=1 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -CONFIG_LPC_ENET=y -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_SMSC_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_LPC32XX=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_LPC32XX=y -CONFIG_SERIO_LIBPS2=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_HS_LPC32XX=y -CONFIG_SERIAL_OF_PLATFORM=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PNX=y -CONFIG_SPI=y -CONFIG_SPI_PL022=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC_PLATFORM=y -CONFIG_GPIO_EM=y -CONFIG_GPIO_PL061=y -CONFIG_GPIO_MAX7300=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCF857X=y -CONFIG_GPIO_SX150X=y -CONFIG_GPIO_ADP5588=y -CONFIG_GPIO_ADNP=y -CONFIG_GPIO_MAX7301=y -CONFIG_GPIO_MCP23S08=y -CONFIG_GPIO_MC33880=y -CONFIG_GPIO_74X164=y -CONFIG_SENSORS_DS620=y -CONFIG_SENSORS_MAX6639=y -CONFIG_WATCHDOG=y -CONFIG_PNX4008_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_SEQUENCER_OSS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_VERBOSE=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_SOC=y -CONFIG_USB=y -CONFIG_USB_PHY=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_LPC32XX=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_ARMMMCI=y -CONFIG_MMC_SPI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_PCA9532=y -CONFIG_LEDS_PCA9532_GPIO=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_DS1374=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_RTC_DRV_LPC32XX=y -CONFIG_DMADEVICES=y -CONFIG_AMBA_PL08X=y -CONFIG_STAGING=y -CONFIG_LPC32XX_ADC=y -CONFIG_IIO=y -CONFIG_MAX517=y -CONFIG_PWM=y -CONFIG_PWM_LPC32XX=y -CONFIG_EXT2_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_WBUF_VERIFY=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_CRYPTO_ANSI_CPRNG=y -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/lpd270_defconfig b/arch/arm/configs/lpd270_defconfig deleted file mode 100644 index 1c8c9ee71d3..00000000000 --- a/arch/arm/configs/lpd270_defconfig +++ /dev/null @@ -1,65 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_ARCH_PXA=y -CONFIG_MACH_LOGICPD_PXA270=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -# CONFIG_IPV6_SIT is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_BLK_DEV_NBD=y -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_FB=y -CONFIG_FB_PXA=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_PXA2XX_AC97=y -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/lubbock_defconfig b/arch/arm/configs/lubbock_defconfig deleted file mode 100644 index c4ba27458ba..00000000000 --- a/arch/arm/configs/lubbock_defconfig +++ /dev/null @@ -1,56 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_MODULES=y -CONFIG_ARCH_PXA=y -CONFIG_ARCH_LUBBOCK=y -# CONFIG_ARM_THUMB is not set -CONFIG_PCCARD=y -CONFIG_PCMCIA_PXA2XX=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=y -CONFIG_INPUT_EVDEV=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_SA1111=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_USB_GADGET=y -CONFIG_USB_G_SERIAL=m -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig deleted file mode 100644 index 9fb11895b2e..00000000000 --- a/arch/arm/configs/mackerel_defconfig +++ /dev/null @@ -1,156 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_SH7372=y -CONFIG_MACH_MACKEREL=y -CONFIG_MEMORY_SIZE=0x10000000 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_FORCE_MAX_ZONEORDER=15 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_KEXEC=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_ARM_INTEGRATOR=y -CONFIG_MTD_BLOCK2MTD=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMSC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=8 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_SH_MOBILE=y -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -CONFIG_REGULATOR=y -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_SH_MOBILE_LCDC=y -CONFIG_FB_SH_MOBILE_HDMI=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_CLUT224 is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -CONFIG_SND_SOC_SH4_FSI=y -CONFIG_USB=y -CONFIG_USB_RENESAS_USBHS_HCD=y -CONFIG_USB_RENESAS_USBHS=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_RENESAS_USBHS_UDC=y -CONFIG_MMC=y -CONFIG_MMC_SDHI=y -CONFIG_MMC_SH_MMCIF=y -CONFIG_DMADEVICES=y -CONFIG_SH_DMAE=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -# CONFIG_DNOTIFY is not set -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_V4_1=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=y -CONFIG_NLS_CODEPAGE_775=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_CODEPAGE_852=y -CONFIG_NLS_CODEPAGE_855=y -CONFIG_NLS_CODEPAGE_857=y -CONFIG_NLS_CODEPAGE_860=y -CONFIG_NLS_CODEPAGE_861=y -CONFIG_NLS_CODEPAGE_862=y -CONFIG_NLS_CODEPAGE_863=y -CONFIG_NLS_CODEPAGE_864=y -CONFIG_NLS_CODEPAGE_865=y -CONFIG_NLS_CODEPAGE_866=y -CONFIG_NLS_CODEPAGE_869=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_ISO8859_3=y -CONFIG_NLS_ISO8859_4=y -CONFIG_NLS_ISO8859_5=y -CONFIG_NLS_ISO8859_6=y -CONFIG_NLS_ISO8859_7=y -CONFIG_NLS_ISO8859_9=y -CONFIG_NLS_ISO8859_13=y -CONFIG_NLS_ISO8859_14=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_KOI8_R=y -CONFIG_NLS_KOI8_U=y -CONFIG_NLS_UTF8=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ANSI_CPRNG=y diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig deleted file mode 100644 index 557dd291288..00000000000 --- a/arch/arm/configs/magician_defconfig +++ /dev/null @@ -1,182 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_UID16 is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_H4700=y -CONFIG_MACH_MAGICIAN=y -CONFIG_NO_HZ=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="keepinitrd" -CONFIG_KEXEC=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -CONFIG_IRDA_DEBUG=y -CONFIG_IRTTY_SIR=m -CONFIG_PXA_FICP=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -# CONFIG_SERIO is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_PXA=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_PXA=y -CONFIG_W1_MASTER_DS1WM=y -CONFIG_POWER_SUPPLY=y -CONFIG_PDA_POWER=y -CONFIG_BATTERY_DS2760=y -# CONFIG_HWMON is not set -CONFIG_MFD_ASIC3=y -CONFIG_HTC_EGPIO=y -CONFIG_HTC_PASIC3=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_GPIO=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_FB_PXA_OVERLAY=y -CONFIG_FB_W100=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -CONFIG_DISPLAY_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_MINI_4x6=y -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_ARM is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=m -CONFIG_SND_PXA2XX_SOC=m -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=m -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_PXA27X=y -CONFIG_USB_ETH=m -# CONFIG_USB_ETH_RNDIS is not set -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_GPIO_VBUS=y -CONFIG_MMC=y -CONFIG_SDIO_UART=m -CONFIG_MMC_PXA=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DEBUG=y -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_TIMER_STATS=y -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/mainstone_defconfig b/arch/arm/configs/mainstone_defconfig deleted file mode 100644 index 04efa1b3ef2..00000000000 --- a/arch/arm/configs/mainstone_defconfig +++ /dev/null @@ -1,55 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_MODULES=y -CONFIG_ARCH_PXA=y -CONFIG_MACH_MAINSTONE=y -# CONFIG_ARM_THUMB is not set -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_FB=y -CONFIG_FB_PXA=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig deleted file mode 100644 index 494e70aeb9e..00000000000 --- a/arch/arm/configs/marzen_defconfig +++ /dev/null @@ -1,113 +0,0 @@ -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_EXPERIMENTAL=y -CONFIG_KERNEL_LZMA=y -CONFIG_NO_HZ=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_R8A7779=y -CONFIG_MACH_MARZEN=y -CONFIG_MEMORY_START=0x60000000 -CONFIG_MEMORY_SIZE=0x10000000 -CONFIG_SHMOBILE_TIMER_HZ=1024 -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SWP_EMULATE is not set -CONFIG_ARM_ERRATA_430973=y -CONFIG_ARM_ERRATA_458693=y -CONFIG_ARM_ERRATA_460075=y -CONFIG_ARM_ERRATA_743622=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_SMP=y -# CONFIG_ARM_CPU_TOPOLOGY is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on" -CONFIG_CMDLINE_FORCE=y -CONFIG_KEXEC=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FW_LOADER is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_ATA_SFF=y -CONFIG_ATA_BMDMA=y -CONFIG_SATA_RCAR=y -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_VT is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=6 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_RCAR=y -CONFIG_SPI=y -CONFIG_SPI_SH_HSPI=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_RCAR=y -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_RCAR_THERMAL=y -CONFIG_SSB=y -CONFIG_USB=y -CONFIG_USB_RCAR_PHY=y -CONFIG_MMC=y -CONFIG_MMC_SDHI=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -CONFIG_USB_STORAGE=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_UIO=y -CONFIG_UIO_PDRV_GENIRQ=y -# CONFIG_IOMMU_SUPPORT is not set -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_INFO_REDUCED=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_AVERAGE=y diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig deleted file mode 100644 index a07948a87ca..00000000000 --- a/arch/arm/configs/mini2440_defconfig +++ /dev/null @@ -1,385 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_RELAY=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_BLK_DEV_INTEGRITY=y -CONFIG_ARCH_S3C24XX=y -# CONFIG_CPU_S3C2410 is not set -CONFIG_CPU_S3C2440=y -CONFIG_S3C_ADC=y -CONFIG_S3C24XX_PWM=y -CONFIG_MACH_MINI2440=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_KEXEC=y -CONFIG_CPU_IDLE=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=m -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_NET_PKTGEN=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTSDIO=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_CFG80211=m -CONFIG_CFG80211_REG_DEBUG=y -CONFIG_MAC80211=m -CONFIG_MAC80211_MESH=y -CONFIG_MAC80211_LEDS=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_CONNECTOR=m -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_FTL=y -CONFIG_NFTL=y -CONFIG_NFTL_RW=y -CONFIG_INFTL=y -CONFIG_RFD_FTL=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_RAM=y -CONFIG_MTD_ROM=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_S3C2410=y -CONFIG_MTD_NAND_PLATFORM=y -CONFIG_MTD_LPDDR=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_CDROM_PKTCDVD=m -CONFIG_SENSORS_TSL2550=m -CONFIG_SCSI=m -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_SG=m -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_TUN=m -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_ZD1211RW=m -CONFIG_ZD1211RW_DEBUG=y -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIO_RAW=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=128 -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_S3C2410=y -CONFIG_I2C_SIMTEC=y -CONFIG_SPI=y -CONFIG_SPI_S3C24XX=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_SENSORS_LM75=y -CONFIG_THERMAL=m -CONFIG_WATCHDOG=y -CONFIG_S3C2410_WATCHDOG=y -CONFIG_VIDEO_OUTPUT_CONTROL=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_S3C2410=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -CONFIG_DISPLAY_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_MINI_4x6=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_CAIAQ=m -CONFIG_SND_USB_CAIAQ_INPUT=y -CONFIG_SND_SOC=y -CONFIG_SND_S3C24XX_SOC=y -CONFIG_HIDRAW=y -CONFIG_HID_PID=y -CONFIG_USB_HIDDEV=y -CONFIG_HID_GYRATION=y -CONFIG_HID_NTRIG=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_HID_TOPSEED=y -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=m -CONFIG_USB_WDM=m -CONFIG_USB_STORAGE=m -CONFIG_USB_STORAGE_DATAFAB=m -CONFIG_USB_STORAGE_ISD200=m -CONFIG_USB_STORAGE_USBAT=m -CONFIG_USB_STORAGE_SDDR09=m -CONFIG_USB_STORAGE_SDDR55=m -CONFIG_USB_STORAGE_JUMPSHOT=m -CONFIG_USB_STORAGE_ALAUDA=m -CONFIG_USB_LIBUSUAL=y -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_CP210X=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_SPCP8X5=m -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_S3C2410=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_MMC=y -CONFIG_SDIO_UART=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SPI=y -CONFIG_MMC_S3C=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_S3C24XX=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_S3C=y -CONFIG_DMADEVICES=y -CONFIG_EXT2_FS=m -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_INOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=m -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_ROMFS_BACKED_BY_BOTH=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_KEYS=y -CONFIG_CRYPTO_FIPS=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_CRYPTD=m -CONFIG_CRYPTO_AUTHENC=m -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CCM=m -CONFIG_CRYPTO_GCM=m -CONFIG_CRYPTO_CTS=m -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_LRW=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=m -CONFIG_CRYPTO_RMD160=m -CONFIG_CRYPTO_RMD256=m -CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_ARC4=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAMELLIA=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_SALSA20=m -CONFIG_CRYPTO_SEED=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_ZLIB=m -CONFIG_CRYPTO_LZO=m -CONFIG_CRC_T10DIF=y -CONFIG_LIBCRC32C=m diff --git a/arch/arm/configs/mmp2_defconfig b/arch/arm/configs/mmp2_defconfig deleted file mode 100644 index f1cb95e58af..00000000000 --- a/arch/arm/configs/mmp2_defconfig +++ /dev/null @@ -1,98 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MMP=y -CONFIG_MACH_BROWNSTONE=y -CONFIG_MACH_FLINT=y -CONFIG_MACH_MARVELL_JASPER=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=128M user_debug=255 earlyprintk" -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_ONENAND=y -CONFIG_MTD_ONENAND_GENERIC=y -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_PXA=y -# CONFIG_HWMON is not set -CONFIG_MFD_MAX8925=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_MAX8649=y -CONFIG_REGULATOR_MAX8925=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_MAX8925=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_MAX8925=y -CONFIG_MMC=y -# CONFIG_DNOTIFY is not set -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -CONFIG_MSDOS_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_DYNAMIC_DEBUG is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_DEBUG_MMP_UART3=y -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/msm_defconfig b/arch/arm/configs/msm_defconfig deleted file mode 100644 index 690b5f9c746..00000000000 --- a/arch/arm/configs/msm_defconfig +++ /dev/null @@ -1,137 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_MSM=y -CONFIG_ARCH_MSM8X60=y -CONFIG_ARCH_MSM8960=y -CONFIG_SMP=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_CLEANCACHE=y -CONFIG_CC_STACKPROTECTOR=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_CFG80211=y -CONFIG_RFKILL=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_SCSI=y -CONFIG_SCSI_TGT=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_CHR_DEV_SCH=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_PHYLIB=y -CONFIG_SLIP=y -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_USB_USBNET=y -# CONFIG_USB_NET_AX8817X is not set -# CONFIG_USB_NET_ZAURUS is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_MOUSE_PS2 is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -CONFIG_SERIO_LIBPS2=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_MSM=y -CONFIG_SERIAL_MSM_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_SPI=y -CONFIG_SSBI=y -CONFIG_DEBUG_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_POWER_SUPPLY=y -CONFIG_THERMAL=y -CONFIG_REGULATOR=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_FB=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_HID_BATTERY_STRENGTH=y -CONFIG_USB=y -CONFIG_USB_PHY=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MSM=y -CONFIG_USB_ACM=y -CONFIG_USB_SERIAL=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_NEW_LEDS=y -CONFIG_RTC_CLASS=y -CONFIG_STAGING=y -CONFIG_MSM_IOMMU=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT4_FS=y -CONFIG_FUSE_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_CIFS=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_LOCKUP_DETECTOR=y -# CONFIG_DETECT_HUNG_TASK is not set -# CONFIG_SCHED_DEBUG is not set -CONFIG_TIMER_STATS=y -CONFIG_DEBUG_INFO=y -CONFIG_DYNAMIC_DEBUG=y diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig deleted file mode 100644 index adb9aa5c88c..00000000000 --- a/arch/arm/configs/multi_v7_defconfig +++ /dev/null @@ -1,87 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_ARCH_MVEBU=y -CONFIG_MACH_ARMADA_370=y -CONFIG_ARCH_SIRF=y -CONFIG_MACH_ARMADA_XP=y -CONFIG_ARCH_HIGHBANK=y -CONFIG_ARCH_SOCFPGA=y -CONFIG_ARCH_SUNXI=y -CONFIG_ARCH_WM8850=y -# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set -CONFIG_ARCH_ZYNQ=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_PLAT_SPEAR=y -CONFIG_ARCH_SPEAR13XX=y -CONFIG_MACH_SPEAR1310=y -CONFIG_MACH_SPEAR1340=y -CONFIG_SMP=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_NET=y -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_SATA_HIGHBANK=y -CONFIG_SATA_MV=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_NET_CALXEDA_XGMAC=y -CONFIG_SMSC911X=y -CONFIG_STMMAC_ETH=y -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_DW=y -CONFIG_KEYBOARD_SPEAR=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_SIRFSOC=y -CONFIG_SERIAL_SIRFSOC_CONSOLE=y -CONFIG_SERIAL_VT8500=y -CONFIG_SERIAL_VT8500_CONSOLE=y -CONFIG_SERIAL_XILINX_PS_UART=y -CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y -CONFIG_IPMI_HANDLER=y -CONFIG_IPMI_SI=y -CONFIG_I2C=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_I2C_SIRF=y -CONFIG_SPI=y -CONFIG_SPI_PL022=y -CONFIG_SPI_SIRF=y -CONFIG_GPIO_PL061=y -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FB_WM8505=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_USB=y -CONFIG_USB_ISP1760_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_SPEAR=y -CONFIG_MMC_WMT=y -CONFIG_EDAC=y -CONFIG_EDAC_MM_EDAC=y -CONFIG_EDAC_HIGHBANK_MC=y -CONFIG_EDAC_HIGHBANK_L2=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PL031=y -CONFIG_RTC_DRV_VT8500=y -CONFIG_PWM=y -CONFIG_PWM_VT8500=y -CONFIG_DMADEVICES=y -CONFIG_PL330_DMA=y -CONFIG_SIRF_DMA=y -CONFIG_DW_DMAC=y diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_defconfig deleted file mode 100644 index 1f08219c1b3..00000000000 --- a/arch/arm/configs/mv78xx0_defconfig +++ /dev/null @@ -1,139 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MV78XX0=y -CONFIG_MACH_DB78X00_BP=y -CONFIG_MACH_RD78X00_MASA=y -CONFIG_MACH_TERASTATION_WXL=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_NET_PKTGEN=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ORION=y -CONFIG_BLK_DEV_LOOP=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_ATA=y -CONFIG_SATA_MV=y -CONFIG_NETDEVICES=y -CONFIG_MARVELL_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_NET_PCI=y -CONFIG_MV643XX_ETH=y -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MV64XXX=y -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_PRINTER=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_RS5C372=y -CONFIG_RTC_DRV_M41T80=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=m -CONFIG_INOTIFY=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig deleted file mode 100644 index f3e8ae001ff..00000000000 --- a/arch/arm/configs/mvebu_defconfig +++ /dev/null @@ -1,100 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_ARCH_MVEBU=y -CONFIG_MACH_ARMADA_370=y -CONFIG_MACH_ARMADA_XP=y -# CONFIG_CACHE_L2X0 is not set -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -# CONFIG_COMPACTION is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_INET=y -CONFIG_BT=y -CONFIG_BT_MRVL=y -CONFIG_BT_MRVL_SDIO=y -CONFIG_CFG80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_SATA_MV=y -CONFIG_NETDEVICES=y -CONFIG_MVNETA=y -CONFIG_MARVELL_PHY=y -CONFIG_MWIFIEX=y -CONFIG_MWIFIEX_SDIO=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_I2C=y -CONFIG_SPI=y -CONFIG_SPI_ORION=y -CONFIG_I2C_MV64XXX=y -CONFIG_MTD=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_SERIAL_8250_DW=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_THERMAL=y -CONFIG_ARMADA_THERMAL=y -CONFIG_USB_SUPPORT=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_MMC=y -CONFIG_MMC_MVSDIO=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_S35390A=y -CONFIG_RTC_DRV_MV=y -CONFIG_DMADEVICES=y -CONFIG_MV_XOR=y -CONFIG_MEMORY=y -CONFIG_MVEBU_DEVBUS=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_TIMER_STATS=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig deleted file mode 100644 index 1d6d8fb7f4a..00000000000 --- a/arch/arm/configs/mxs_defconfig +++ /dev/null @@ -1,190 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set -CONFIG_PERF_EVENTS=y -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_BLK_DEV_INTEGRITY=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_MXS=y -# CONFIG_ARM_THUMB is not set -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_CAN=m -CONFIG_CAN_RAW=m -CONFIG_CAN_BCM=m -CONFIG_CAN_FLEXCAN=m -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -# CONFIG_M25PXX_USE_FAST_READ is not set -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_UBI=y -# CONFIG_BLK_DEV is not set -CONFIG_EEPROM_AT24=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -CONFIG_ENC28J60=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_SMSC_PHY=y -CONFIG_ICPLUS_PHY=y -CONFIG_REALTEK_PHY=y -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_TSC2007=m -# CONFIG_SERIO is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_MXS_AUART=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MXS=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=m -CONFIG_SPI_MXS=y -CONFIG_DEBUG_GPIO=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_STMP3XXX_RTC_WATCHDOG=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_FB=y -CONFIG_FB_MXS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SOC=y -CONFIG_SND_MXS_SOC=y -CONFIG_SND_SOC_MXS_SGTL5000=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_STORAGE=y -CONFIG_USB_PHY=y -CONFIG_USB_MXS_PHY=y -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_MMC_MXS=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_STMP=y -CONFIG_DMADEVICES=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_MXS_LRADC=y -CONFIG_IIO_SYSFS_TRIGGER=y -CONFIG_COMMON_CLK_DEBUG=y -CONFIG_IIO=y -CONFIG_PWM=y -CONFIG_PWM_MXS=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -# CONFIG_DNOTIFY is not set -CONFIG_FSCACHE=m -CONFIG_FSCACHE_STATS=y -CONFIG_CACHEFILES=m -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_PRINTK_TIME=y -CONFIG_FRAME_WARN=2048 -CONFIG_MAGIC_SYSRQ=y -CONFIG_UNUSED_SYMBOLS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOCKUP_DETECTOR=y -CONFIG_TIMER_STATS=y -CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_INFO=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_STRICT_DEVMEM=y -CONFIG_DEBUG_USER=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_ITU_T=m -CONFIG_CRC7=m diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig deleted file mode 100644 index d7dc9922cff..00000000000 --- a/arch/arm/configs/neponset_defconfig +++ /dev/null @@ -1,90 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_ASSABET=y -CONFIG_ASSABET_NEPONSET=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_PCMCIA_SA1111=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x80000 -CONFIG_ZBOOT_ROM_BSS=0xc1000000 -CONFIG_ZBOOT_ROM=y -CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_RAM=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=m -CONFIG_BLK_DEV_SD=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_VENDOR_SMC=y -CONFIG_SMC9194=y -CONFIG_SMC91X=y -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_SA1111=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CS=y -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=64 -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_WATCHDOG=y -CONFIG_SA1100_WATCHDOG=m -CONFIG_FB=y -CONFIG_FB_SA1100=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_SOUND=y -CONFIG_SOUND_PRIME=y -# CONFIG_USB_HID is not set -CONFIG_USB=m -CONFIG_USB_DEBUG=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=m -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_STORAGE=m -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_PARTITION_ADVANCED=y -# CONFIG_MSDOS_PARTITION is not set -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_ISO8859_1=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/netwinder_defconfig b/arch/arm/configs/netwinder_defconfig deleted file mode 100644 index 25ed772dfb2..00000000000 --- a/arch/arm/configs/netwinder_defconfig +++ /dev/null @@ -1,87 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_ARCH_FOOTBRIDGE=y -CONFIG_ARCH_NETWINDER=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=0x301" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_IP_NF_QUEUE=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_SUPERIO=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_IDE=y -CONFIG_BLK_DEV_SL82C105=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_NET_TULIP=y -CONFIG_TULIP=y -CONFIG_TULIP_MMIO=y -CONFIG_NET_PCI=y -CONFIG_NE2K_PCI=y -CONFIG_MOUSE_SERIAL=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_PRINTER=y -CONFIG_DS1620=y -CONFIG_NWBUTTON=y -CONFIG_NWBUTTON_REBOOT=y -CONFIG_NWFLASH=y -CONFIG_WATCHDOG=y -CONFIG_977_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_CYBER2000=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SOUND_PRIME=y -CONFIG_SOUND_OSS=y -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -CONFIG_SOUND_YM3812=y -CONFIG_SOUND_WAVEARTIST=y -CONFIG_EXT2_FS=y -CONFIG_AUTOFS_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_TMPFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_SMB_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_CODEPAGE_852=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig deleted file mode 100644 index 9c0ad799398..00000000000 --- a/arch/arm/configs/netx_defconfig +++ /dev/null @@ -1,86 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_ARCH_NETX=y -CONFIG_MACH_NXDKN=y -CONFIG_MACH_NXDB500=y -CONFIG_MACH_NXEB500HMI=y -CONFIG_PREEMPT=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySMX0,115200" -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_NETFILTER=y -CONFIG_IP_NF_QUEUE=m -CONFIG_NET_PKTGEN=m -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PLATRAM=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_NETX=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_SERIAL_NETX=y -CONFIG_SERIAL_NETX_CONSOLE=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_RTC_CLASS=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_ERRORS=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRC_CCITT=m -CONFIG_LIBCRC32C=m diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig deleted file mode 100644 index b01e7632ed2..00000000000 --- a/arch/arm/configs/nhk8815_defconfig +++ /dev/null @@ -1,128 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_NOMADIK=y -CONFIG_MACH_NOMADIK_8815NHK=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_NET_IPIP=y -CONFIG_IP_MROUTE=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIVHCI=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_TESTS=m -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSMC=y -CONFIG_MTD_ONENAND=y -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_ONENAND_GENERIC=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_NETDEVICES=y -CONFIG_NETCONSOLE=m -CONFIG_TUN=y -CONFIG_SMC91X=y -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_MOUSE_PS2 is not set -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_NOMADIK=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_I2C_NOMADIK=y -CONFIG_DEBUG_GPIO=y -# CONFIG_HWMON is not set -CONFIG_MMC=y -CONFIG_MMC_CLKGATE=y -CONFIG_MMC_ARMMMCI=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PL031=y -CONFIG_DMADEVICES=y -CONFIG_AMBA_PL08X=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_FUSE_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_ROOT_NFS=y -CONFIG_CIFS=m -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/nuc910_defconfig b/arch/arm/configs/nuc910_defconfig deleted file mode 100644 index 10180cfde16..00000000000 --- a/arch/arm/configs/nuc910_defconfig +++ /dev/null @@ -1,60 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_RELAY=y -CONFIG_USER_NS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_ARCH_W90X900=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=1 -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_STORAGE=y -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_ROMFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_FS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/nuc950_defconfig b/arch/arm/configs/nuc950_defconfig deleted file mode 100644 index 27aa8731330..00000000000 --- a/arch/arm/configs/nuc950_defconfig +++ /dev/null @@ -1,76 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_RELAY=y -CONFIG_USER_NS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_ARCH_W90X900=y -# CONFIG_MACH_W90P910EVB is not set -CONFIG_MACH_W90P950EVB=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_MISC=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=1 -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_NUC900=y -CONFIG_GPM1040A0_320X240=y -CONFIG_FB_NUC900_DEBUG=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_STORAGE=y -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_ROMFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_FS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set diff --git a/arch/arm/configs/nuc960_defconfig b/arch/arm/configs/nuc960_defconfig deleted file mode 100644 index 56fd7ad0ff1..00000000000 --- a/arch/arm/configs/nuc960_defconfig +++ /dev/null @@ -1,66 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_RELAY=y -CONFIG_USER_NS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_ARCH_W90X900=y -# CONFIG_MACH_W90P910EVB is not set -CONFIG_MACH_W90N960EVB=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_MISC=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=1 -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_STORAGE=y -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_ROMFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_FS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig deleted file mode 100644 index 9940f7b4e43..00000000000 --- a/arch/arm/configs/omap1_defconfig +++ /dev/null @@ -1,278 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -# CONFIG_ELF_CORE is not set -# CONFIG_BASE_FULL is not set -# CONFIG_SHMEM is not set -# CONFIG_VM_EVENT_COUNTERS is not set -CONFIG_SLOB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_OMAP=y -CONFIG_ARCH_OMAP1=y -CONFIG_OMAP_RESET_CLOCKS=y -# CONFIG_OMAP_MUX is not set -CONFIG_OMAP_MBOX_FWK=y -CONFIG_OMAP_32K_TIMER=y -CONFIG_OMAP_DM_TIMER=y -CONFIG_ARCH_OMAP730=y -CONFIG_ARCH_OMAP850=y -CONFIG_ARCH_OMAP16XX=y -CONFIG_MACH_OMAP_INNOVATOR=y -CONFIG_MACH_OMAP_H2=y -CONFIG_MACH_OMAP_H3=y -CONFIG_MACH_OMAP_HTCWIZARD=y -CONFIG_MACH_HERALD=y -CONFIG_MACH_OMAP_OSK=y -CONFIG_MACH_OMAP_PERSEUS2=y -CONFIG_MACH_OMAP_FSAMPLE=y -CONFIG_MACH_VOICEBLUE=y -CONFIG_MACH_OMAP_PALMTE=y -CONFIG_MACH_OMAP_PALMZ71=y -CONFIG_MACH_OMAP_PALMTT=y -CONFIG_MACH_SX1=y -CONFIG_MACH_NOKIA770=y -CONFIG_MACH_AMS_DELTA=y -CONFIG_MACH_OMAP_GENERIC=y -# CONFIG_ARM_THUMB is not set -CONFIG_PCCARD=y -CONFIG_OMAP_CF=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 rootfstype=jffs2" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_MISC=y -CONFIG_PM=y -# CONFIG_SUSPEND is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_NETFILTER=y -CONFIG_BT=y -CONFIG_BT_L2CAP=y -CONFIG_BT_SCO=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_HIDP=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_CONNECTOR=y -# CONFIG_PROC_EVENTS is not set -CONFIG_MTD=y -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=3 -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_NAND=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=2 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_IDE=m -CONFIG_BLK_DEV_IDECS=m -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_TUN=y -CONFIG_PHYLIB=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_USB_CATC=y -CONFIG_USB_KAWETH=y -CONFIG_USB_PEGASUS=y -CONFIG_USB_RTL8150=y -CONFIG_USB_USBNET=y -# CONFIG_USB_NET_AX8817X is not set -# CONFIG_USB_NET_CDC_SUBSET is not set -CONFIG_PPP=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_BSDCOMP=y -CONFIG_SLIP=y -CONFIG_SLIP_COMPRESSED=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=3 -CONFIG_SERIAL_8250_RUNTIME_UARTS=3 -# CONFIG_LEGACY_PTYS is not set -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_SPI=y -CONFIG_SPI_OMAP_UWIRE=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_OMAP_WATCHDOG=y -CONFIG_VIDEO_OUTPUT_CONTROL=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_VIRTUAL=y -CONFIG_FB_OMAP=y -CONFIG_FB_OMAP_LCDC_EXTERNAL=y -CONFIG_FB_OMAP_LCDC_HWA742=y -CONFIG_FB_OMAP_MANUAL_UPDATE=y -CONFIG_FB_OMAP_LCD_MIPID=y -CONFIG_FB_OMAP_BOOTLOADER_INIT=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_FONT_6x11=y -CONFIG_FONT_MINI_4x6=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -CONFIG_SND_DUMMY=y -CONFIG_SND_USB_AUDIO=y -CONFIG_SND_SOC=y -CONFIG_SND_OMAP_SOC=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_PHY=y -CONFIG_USB_DEBUG=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_TEST=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -# CONFIG_USB_ETH_RNDIS is not set -CONFIG_USB_MASS_STORAGE=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_OMAP=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_OMAP=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_DNOTIFY is not set -CONFIG_AUTOFS4_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=866 -CONFIG_FAT_DEFAULT_IOCHARSET="koi8-r" -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_CODEPAGE_852=y -CONFIG_NLS_CODEPAGE_866=y -CONFIG_NLS_CODEPAGE_1251=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_ISO8859_5=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_KOI8_R=y -CONFIG_NLS_UTF8=y -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_SECURITY=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_PCBC=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_ZLIB=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig deleted file mode 100644 index abbe31937c6..00000000000 --- a/arch/arm/configs/omap2plus_defconfig +++ /dev/null @@ -1,286 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MULTI_V6=y -CONFIG_ARCH_OMAP2PLUS=y -CONFIG_OMAP_RESET_CLOCKS=y -CONFIG_OMAP_MUX_DEBUG=y -CONFIG_ARCH_VEXPRESS_CA9X4=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_ERRATA_411920=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_LEDS=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_MISC=y -CONFIG_PM_DEBUG=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_CAN=m -CONFIG_CAN_RAW=m -CONFIG_CAN_BCM=m -CONFIG_CAN_C_CAN=m -CONFIG_CAN_C_CAN_PLATFORM=m -CONFIG_BT=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_MAC80211_RC_PID=y -CONFIG_MAC80211_RC_DEFAULT_PID=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_CMA=y -CONFIG_CONNECTOR=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_OOPS=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_OMAP2=y -CONFIG_MTD_ONENAND=y -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_ONENAND_OMAP2=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_SENSORS_LIS3LV02D=m -CONFIG_SENSORS_TSL2550=m -CONFIG_SENSORS_LIS3_I2C=m -CONFIG_BMP085_I2C=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_MD=y -CONFIG_NETDEVICES=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -CONFIG_KS8851=y -CONFIG_KS8851_MLL=y -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_LIBERTAS_DEBUG=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_MATRIX=m -CONFIG_KEYBOARD_TWL4030=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_TWL4030_PWRBUTTON=y -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_OMAP=y -CONFIG_SERIAL_OMAP_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C_CHARDEV=y -CONFIG_SPI=y -CONFIG_SPI_OMAP24XX=y -CONFIG_PINCTRL_SINGLE=y -CONFIG_DEBUG_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_TWL4030=y -CONFIG_W1=y -CONFIG_POWER_SUPPLY=y -CONFIG_SENSORS_LM75=m -CONFIG_WATCHDOG=y -CONFIG_OMAP_WATCHDOG=y -CONFIG_TWL4030_WATCHDOG=y -CONFIG_MFD_TPS65217=y -CONFIG_MFD_TPS65910=y -CONFIG_TWL6040_CORE=y -CONFIG_REGULATOR_TWL4030=y -CONFIG_REGULATOR_TPS65023=y -CONFIG_REGULATOR_TPS6507X=y -CONFIG_REGULATOR_TPS65217=y -CONFIG_REGULATOR_TPS65910=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_OMAP_LCD_VGA=y -CONFIG_OMAP2_DSS=m -CONFIG_OMAP2_DSS_RFBI=y -CONFIG_OMAP2_DSS_SDI=y -CONFIG_OMAP2_DSS_DSI=y -CONFIG_FB_OMAP2=m -CONFIG_PANEL_GENERIC_DPI=m -CONFIG_PANEL_TFP410=m -CONFIG_PANEL_SHARP_LS037V7DW01=m -CONFIG_PANEL_NEC_NL8048HL11_01B=m -CONFIG_PANEL_TAAL=m -CONFIG_PANEL_TPO_TD043MTEA1=m -CONFIG_PANEL_ACX565AKM=m -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_DISPLAY_SUPPORT=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=m -CONFIG_SND_OMAP_SOC=m -CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m -CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m -CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_WDM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_LIBUSUAL=y -CONFIG_USB_TEST=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_ZERO=m -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=y -CONFIG_MMC_ARMMMCI=y -CONFIG_MMC_OMAP=y -CONFIG_MMC_OMAP_HS=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_TWL92330=y -CONFIG_RTC_DRV_TWL4030=y -CONFIG_RTC_DRV_OMAP=y -CONFIG_DMADEVICES=y -CONFIG_DMA_OMAP=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=y -CONFIG_QUOTA=y -CONFIG_QFMT_V2=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_FS_XATTR=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_UBIFS_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_SCHEDSTATS=y -CONFIG_TIMER_STATS=y -CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SECURITY=y -CONFIG_CRYPTO_MICHAEL_MIC=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=y -CONFIG_LIBCRC32C=y -CONFIG_SOC_OMAP5=y -CONFIG_TI_DAVINCI_MDIO=y -CONFIG_TI_DAVINCI_CPDMA=y -CONFIG_TI_CPSW=y diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_defconfig deleted file mode 100644 index 952430d9e2d..00000000000 --- a/arch/arm/configs/orion5x_defconfig +++ /dev/null @@ -1,164 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EXPERT=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_ARCH_ORION5X=y -CONFIG_MACH_DB88F5281=y -CONFIG_MACH_RD88F5182=y -CONFIG_MACH_KUROBOX_PRO=y -CONFIG_MACH_DNS323=y -CONFIG_MACH_TS209=y -CONFIG_MACH_TERASTATION_PRO2=y -CONFIG_MACH_LINKSTATION_PRO=y -CONFIG_MACH_LINKSTATION_MINI=y -CONFIG_MACH_LINKSTATION_LS_HGL=y -CONFIG_MACH_TS409=y -CONFIG_MACH_WRT350N_V2=y -CONFIG_MACH_TS78XX=y -CONFIG_MACH_MV2120=y -CONFIG_MACH_EDMINI_V2_DT=y -CONFIG_MACH_D2NET=y -CONFIG_MACH_BIGDISK=y -CONFIG_MACH_NET2BIG=y -CONFIG_MACH_MSS2=y -CONFIG_MACH_WNR854T=y -CONFIG_MACH_RD88F5181L_GE=y -CONFIG_MACH_RD88F5181L_FXO=y -CONFIG_MACH_RD88F6183AP_GE=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_NET_DSA=y -CONFIG_NET_PKTGEN=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_PLATFORM=y -CONFIG_MTD_NAND_ORION=y -CONFIG_BLK_DEV_LOOP=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_ATA=y -CONFIG_SATA_MV=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_NET_DSA_MV88E6131=y -CONFIG_NET_DSA_MV88E6123_61_65=y -CONFIG_MV643XX_ETH=y -CONFIG_MARVELL_PHY=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_HW_RANDOM_TIMERIOMEM=m -CONFIG_I2C=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MV64XXX=y -CONFIG_GPIO_SYSFS=y -CONFIG_SENSORS_LM75=y -# CONFIG_VGA_ARB is not set -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_PRINTER=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_RS5C372=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_RTC_DRV_M41T80=y -CONFIG_RTC_DRV_S35390A=y -CONFIG_RTC_DRV_M48T86=y -CONFIG_DMADEVICES=y -CONFIG_MV_XOR=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=m -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -CONFIG_LATENCYTOP=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_MV_CESA=y -CONFIG_CRC_T10DIF=y diff --git a/arch/arm/configs/palmz72_defconfig b/arch/arm/configs/palmz72_defconfig deleted file mode 100644 index 4baa83c1c57..00000000000 --- a/arch/arm/configs/palmz72_defconfig +++ /dev/null @@ -1,85 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_ARCH_PXA_PALM=y -# CONFIG_MACH_PALMTX is not set -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M console=tty root=/dev/mmcblk0" -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -# CONFIG_MISC_DEVICES is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_PXA27x=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_POWER_SUPPLY=y -CONFIG_PDA_POWER=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_DISPLAY_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_DEBUG=y -CONFIG_MMC_PXA=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_DNOTIFY is not set -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=866 -CONFIG_FAT_DEFAULT_IOCHARSET="utf8" -CONFIG_TMPFS=y -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_866=y -CONFIG_NLS_UTF8=y -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_CRC_T10DIF=y diff --git a/arch/arm/configs/pcm027_defconfig b/arch/arm/configs/pcm027_defconfig deleted file mode 100644 index 2f136c30a98..00000000000 --- a/arch/arm/configs/pcm027_defconfig +++ /dev/null @@ -1,102 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_PCM027=y -CONFIG_MACH_PCM990_BASEBOARD=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PXA=y -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PXA2XX_AC97=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_PXA=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_SA1100=m -CONFIG_EXT2_FS=m -CONFIG_EXT3_FS=m -# CONFIG_DNOTIFY is not set -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=850 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_DEFAULT="iso8859-15" -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_15=y -CONFIG_MAGIC_SYSRQ=y diff --git a/arch/arm/configs/pixi3_10_debug_defconfig b/arch/arm/configs/pixi3_10_debug_defconfig deleted file mode 100755 index fd74f8ee8cc..00000000000 --- a/arch/arm/configs/pixi3_10_debug_defconfig +++ /dev/null @@ -1,3228 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="pixi3_10" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -CONFIG_MTK_PUMP_EXPRESS_SUPPORT=y -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/pixi3_10_defconfig b/arch/arm/configs/pixi3_10_defconfig deleted file mode 100755 index 0cd7ea56e74..00000000000 --- a/arch/arm/configs/pixi3_10_defconfig +++ /dev/null @@ -1,3213 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="pixi3_10" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -CONFIG_MTK_PUMP_EXPRESS_SUPPORT=y -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/pleb_defconfig b/arch/arm/configs/pleb_defconfig deleted file mode 100644 index cb08cc561da..00000000000 --- a/arch/arm/configs/pleb_defconfig +++ /dev/null @@ -1,57 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_HOTPLUG is not set -# CONFIG_SHMEM is not set -CONFIG_MODULES=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_PLEB=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySA0,9600 mem=16M@0xc0000000 mem=16M@0xc8000000 root=/dev/ram initrd=0xc0400000,4M" -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_SYN_COOKIES=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -# CONFIG_DNOTIFY is not set -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NLS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y diff --git a/arch/arm/configs/prima2_defconfig b/arch/arm/configs/prima2_defconfig deleted file mode 100644 index 002a1ceadce..00000000000 --- a/arch/arm/configs/prima2_defconfig +++ /dev/null @@ -1,70 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_ARCH_SIRF=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_KEXEC=y -CONFIG_BINFMT_MISC=y -CONFIG_PM_RUNTIME=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_SIRFSOC=y -CONFIG_SERIAL_SIRFSOC_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_SIRF=y -CONFIG_SPI=y -CONFIG_SPI_SIRF=y -CONFIG_SPI_SPIDEV=y -# CONFIG_HWMON is not set -CONFIG_USB_GADGET=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_DMADEVICES=y -CONFIG_DMADEVICES_DEBUG=y -CONFIG_DMADEVICES_VDEBUG=y -CONFIG_SIRF_DMA=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_SECTION_MISMATCH=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_INFO=y -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/pxa168_defconfig b/arch/arm/configs/pxa168_defconfig deleted file mode 100644 index 74d7e0104f8..00000000000 --- a/arch/arm/configs/pxa168_defconfig +++ /dev/null @@ -1,70 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MMP=y -CONFIG_MACH_ASPENITE=y -CONFIG_MACH_ZYLONITE2=y -CONFIG_MACH_AVENGERS_LITE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/pxa255-idp_defconfig b/arch/arm/configs/pxa255-idp_defconfig deleted file mode 100644 index 917a070b4bb..00000000000 --- a/arch/arm/configs/pxa255-idp_defconfig +++ /dev/null @@ -1,59 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_MODULES=y -CONFIG_ARCH_PXA=y -CONFIG_ARCH_PXA_IDP=y -# CONFIG_ARM_THUMB is not set -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs ip=dhcp console=ttyS0,115200 mem=64M" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_IDE=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_FB=y -CONFIG_FB_PXA=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig deleted file mode 100644 index 60e313834b3..00000000000 --- a/arch/arm/configs/pxa3xx_defconfig +++ /dev/null @@ -1,133 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_SYSFS_DEPRECATED_V2=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_KALLSYMS_ALL=y -CONFIG_SLAB=y -CONFIG_MODULES=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_LITTLETON=y -CONFIG_MACH_TAVOREVB=y -CONFIG_MACH_SAAR=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M debug" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_PXA3xx=y -CONFIG_MTD_NAND_PXA3xx_BUILTIN=y -CONFIG_MTD_ONENAND=y -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_ONENAND_GENERIC=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_PXA27x=y -CONFIG_KEYBOARD_PXA930_ROTARY=y -CONFIG_MOUSE_PXA930_TRKBALL=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCF857X=y -CONFIG_GPIO_MAX7301=y -CONFIG_POWER_SUPPLY=y -CONFIG_POWER_SUPPLY_DEBUG=y -CONFIG_PDA_POWER=y -CONFIG_BATTERY_DA9030=y -# CONFIG_HWMON is not set -CONFIG_PMIC_DA903X=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DEBUG=y -CONFIG_REGULATOR_VIRTUAL_CONSUMER=y -CONFIG_REGULATOR_DA903X=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_TDO24M=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_DA903X=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_6x11=y -CONFIG_LOGO=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_PXA=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_DA903X=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m -CONFIG_LEDS_TRIGGER_BACKLIGHT=m -CONFIG_LEDS_TRIGGER_GPIO=m -CONFIG_LEDS_TRIGGER_DEFAULT_ON=m -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_WBUF_VERIFY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SHIRQ=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/pxa910_defconfig b/arch/arm/configs/pxa910_defconfig deleted file mode 100644 index 3bb7771d3c1..00000000000 --- a/arch/arm/configs/pxa910_defconfig +++ /dev/null @@ -1,80 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MMP=y -CONFIG_MACH_TAVOREVB=y -CONFIG_MACH_TTC_DKB=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M earlyprintk" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SPI=y -CONFIG_FB=y -CONFIG_MMP_DISP=y -CONFIG_MMP_DISP_CONTROLLER=y -CONFIG_MMP_SPI=y -CONFIG_MMP_PANEL_TPOHVGA=y -CONFIG_MMP_FB=y -CONFIG_LOGO=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_DEBUG_MMP_UART2=y -CONFIG_EARLY_PRINTK=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig deleted file mode 100644 index f7caa909b40..00000000000 --- a/arch/arm/configs/raumfeld_defconfig +++ /dev/null @@ -1,208 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_RAUMFELD_RC=y -CONFIG_MACH_RAUMFELD_CONNECTOR=y -CONFIG_MACH_RAUMFELD_SPEAKER=y -CONFIG_NO_HZ=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_CMDLINE="console=ttyS0,115200 rw" -CONFIG_CPU_FREQ=y -CONFIG_CPU_IDLE=y -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -CONFIG_CFG80211=y -CONFIG_CFG80211_REG_DEBUG=y -CONFIG_MAC80211=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_NFTL=y -CONFIG_NFTL_RW=y -CONFIG_MTD_BLOCK2MTD=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_PXA3xx=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_ISL29003=y -CONFIG_TI_DAC7512=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMSC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_LIBERTAS=y -CONFIG_LIBERTAS_SDIO=m -CONFIG_USB_USBNET=y -# CONFIG_USB_NET_AX8817X is not set -# CONFIG_USB_NET_NET1080 is not set -CONFIG_USB_NET_MCS7830=y -# CONFIG_USB_NET_CDC_SUBSET is not set -# CONFIG_USB_NET_ZAURUS is not set -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_EETI=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_GPIO_ROTARY_ENCODER=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_GPIO=y -CONFIG_SPI_SPIDEV=y -CONFIG_DEBUG_GPIO=y -CONFIG_W1_MASTER_GPIO=m -CONFIG_POWER_SUPPLY=y -CONFIG_PDA_POWER=y -CONFIG_BATTERY_DS2760=m -CONFIG_SENSORS_LIS3_SPI=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DEBUG=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_MAX8660=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_LOGO_LINUX_CLUT224 is not set -CONFIG_SOUND=y -CONFIG_SND=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_PXA2XX_SOC=y -CONFIG_SND_SOC_RAUMFELD=y -CONFIG_HID_DRAGONRISE=y -CONFIG_HID_GYRATION=y -CONFIG_HID_TWINHAN=y -CONFIG_HID_NTRIG=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -CONFIG_HID_SMARTJOYPLUS=y -CONFIG_HID_TOPSEED=y -CONFIG_HID_THRUSTMASTER=y -CONFIG_HID_ZEROPLUS=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_MMC=y -CONFIG_MMC_PXA=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_LT3593=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PXA=y -CONFIG_DMADEVICES=y -CONFIG_UIO=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XIP=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_FSCACHE=y -CONFIG_FSCACHE_STATS=y -CONFIG_CACHEFILES=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFS_FSCACHE=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=y -CONFIG_NLS_CODEPAGE_775=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_CODEPAGE_852=y -CONFIG_NLS_CODEPAGE_855=y -CONFIG_NLS_CODEPAGE_857=y -CONFIG_NLS_CODEPAGE_860=y -CONFIG_NLS_CODEPAGE_861=y -CONFIG_NLS_CODEPAGE_862=y -CONFIG_NLS_CODEPAGE_863=y -CONFIG_NLS_CODEPAGE_864=y -CONFIG_NLS_CODEPAGE_865=y -CONFIG_NLS_CODEPAGE_866=y -CONFIG_NLS_CODEPAGE_869=y -CONFIG_NLS_CODEPAGE_936=y -CONFIG_NLS_CODEPAGE_950=y -CONFIG_NLS_CODEPAGE_932=y -CONFIG_NLS_CODEPAGE_949=y -CONFIG_NLS_CODEPAGE_874=y -CONFIG_NLS_ISO8859_8=y -CONFIG_NLS_CODEPAGE_1250=y -CONFIG_NLS_CODEPAGE_1251=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=y -CONFIG_NLS_ISO8859_3=y -CONFIG_NLS_ISO8859_4=y -CONFIG_NLS_ISO8859_5=y -CONFIG_NLS_ISO8859_6=y -CONFIG_NLS_ISO8859_7=y -CONFIG_NLS_ISO8859_9=y -CONFIG_NLS_ISO8859_13=y -CONFIG_NLS_ISO8859_14=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_KOI8_R=y -CONFIG_NLS_KOI8_U=y -CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig deleted file mode 100644 index abe61bf379d..00000000000 --- a/arch/arm/configs/realview-smp_defconfig +++ /dev/null @@ -1,101 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_REALVIEW=y -CONFIG_MACH_REALVIEW_EB=y -CONFIG_REALVIEW_EB_ARM11MP=y -CONFIG_MACH_REALVIEW_PB11MP=y -CONFIG_SMP=y -CONFIG_HOTPLUG_CPU=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_ARM_CHARLCD=y -CONFIG_NETDEVICES=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_VERSATILE=y -CONFIG_SPI=y -CONFIG_GPIOLIB=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_DRIVERS is not set -CONFIG_SND_ARMAACI=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_PL031=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig deleted file mode 100644 index 7079cbe898a..00000000000 --- a/arch/arm/configs/realview_defconfig +++ /dev/null @@ -1,100 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_REALVIEW=y -CONFIG_MACH_REALVIEW_EB=y -CONFIG_REALVIEW_EB_ARM11MP=y -CONFIG_MACH_REALVIEW_PB11MP=y -CONFIG_MACH_REALVIEW_PB1176=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" -CONFIG_VFP=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP=y -CONFIG_ARM_CHARLCD=y -CONFIG_NETDEVICES=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_VERSATILE=y -CONFIG_SPI=y -CONFIG_GPIOLIB=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_DRIVERS is not set -CONFIG_SND_ARMAACI=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_PL031=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig deleted file mode 100644 index 00515ef9782..00000000000 --- a/arch/arm/configs/rpc_defconfig +++ /dev/null @@ -1,133 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_RPC=y -CONFIG_CPU_SA110=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_FIFO=y -CONFIG_BLK_DEV_FD=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=m -CONFIG_BLK_DEV_SR=y -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_ARXESCSI=m -CONFIG_SCSI_CUMANA_2=m -CONFIG_SCSI_EESOXSCSI=m -CONFIG_SCSI_POWERTECSCSI=y -CONFIG_SCSI_CUMANA_1=m -CONFIG_SCSI_OAK1=m -CONFIG_ATA=y -CONFIG_PATA_ICSIDE=y -CONFIG_PATA_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_ARM_ETHER1=y -CONFIG_ARM_ETHER3=y -CONFIG_ARM_ETHERH=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_PPP=m -CONFIG_PPPOE=m -CONFIG_INPUT_EVDEV=y -# CONFIG_MOUSE_PS2 is not set -CONFIG_MOUSE_RISCPC=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=16 -CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -CONFIG_SERIAL_8250_ACORN=y -CONFIG_LEGACY_PTY_COUNT=64 -CONFIG_PRINTER=m -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ACORN=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x16=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_OSS=m -CONFIG_SOUND_VIDC=m -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCF8583=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_INOTIFY=y -CONFIG_AUTOFS4_FS=m -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_ADFS_FS=y -CONFIG_NFS_FS=y -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION_CUMANA is not set -# CONFIG_ACORN_PARTITION_EESOX is not set -CONFIG_BSD_DISKLABEL=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_KOI8_R=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig deleted file mode 100644 index 193448f3128..00000000000 --- a/arch/arm/configs/s3c2410_defconfig +++ /dev/null @@ -1,468 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=m -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_ARCH_S3C24XX=y -CONFIG_S3C_BOOT_ERROR_RESET=y -CONFIG_S3C_ADC=y -CONFIG_S3C24XX_PWM=y -CONFIG_CPU_S3C2412=y -CONFIG_CPU_S3C2416=y -CONFIG_CPU_S3C2440=y -CONFIG_CPU_S3C2442=y -CONFIG_CPU_S3C2443=y -CONFIG_MACH_AML_M5900=y -CONFIG_ARCH_BAST=y -CONFIG_ARCH_H1940=y -CONFIG_MACH_N30=y -CONFIG_MACH_OTOM=y -CONFIG_MACH_QT2410=y -CONFIG_ARCH_SMDK2410=y -CONFIG_MACH_TCT_HAMMER=y -CONFIG_MACH_VR1000=y -CONFIG_MACH_JIVE=y -CONFIG_MACH_SMDK2412=y -CONFIG_MACH_VSTMS=y -CONFIG_MACH_SMDK2416=y -CONFIG_MACH_ANUBIS=y -CONFIG_MACH_AT2440EVB=y -CONFIG_MACH_MINI2440=y -CONFIG_MACH_NEXCODER_2440=y -CONFIG_MACH_OSIRIS=y -CONFIG_MACH_OSIRIS_DVS=m -CONFIG_MACH_RX3715=y -CONFIG_ARCH_S3C2440=y -CONFIG_MACH_NEO1973_GTA02=y -CONFIG_MACH_RX1950=y -CONFIG_SMDK2440_CPU2442=y -CONFIG_MACH_SMDK2443=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -CONFIG_BINFMT_AOUT=y -CONFIG_APM_EMULATION=m -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_NET_IPIP=m -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -# CONFIG_INET_LRO is not set -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m -CONFIG_TCP_CONG_YEAH=m -CONFIG_TCP_CONG_ILLINOIS=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_DCCP=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_CLUSTER=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_IPRANGE=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_OWNER=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_RATEEST=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_RECENT=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_IP_VS=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_BT=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_MAC80211_MESH=y -CONFIG_MAC80211_LEDS=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_ROM=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_S3C2410=y -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_AX88796=m -CONFIG_PARPORT_1284=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_ATA_OVER_ETH=m -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_PLATFORM=y -CONFIG_SCSI=y -CONFIG_SCSI_TGT=m -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=y -CONFIG_CHR_DEV_SCH=m -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_NETDEVICES=y -CONFIG_DM9000=y -CONFIG_INPUT_EVDEV=y -CONFIG_MOUSE_APPLETOUCH=m -CONFIG_MOUSE_BCM5974=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_ZHENHUA=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_JOYSTICK_XPAD=m -CONFIG_JOYSTICK_XPAD_FF=y -CONFIG_JOYSTICK_XPAD_LEDS=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_ATI_REMOTE2=m -CONFIG_INPUT_KEYSPAN_REMOTE=m -CONFIG_INPUT_POWERMATE=m -CONFIG_INPUT_YEALINK=m -CONFIG_INPUT_CM109=m -CONFIG_INPUT_UINPUT=m -CONFIG_INPUT_GPIO_ROTARY_ENCODER=m -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_PRINTER=y -CONFIG_PPDEV=y -CONFIG_HW_RANDOM=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_S3C2410=y -CONFIG_I2C_SIMTEC=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=m -CONFIG_SPI_S3C24XX=m -CONFIG_SPI_SPIDEV=m -CONFIG_SPI_TLE62X0=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM85=m -CONFIG_WATCHDOG=y -CONFIG_S3C2410_WATCHDOG=y -CONFIG_MFD_SM501=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_S3C2410=y -CONFIG_FB_SM501=y -CONFIG_BACKLIGHT_PWM=m -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_CAIAQ=m -CONFIG_SND_SOC=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_WDM=m -CONFIG_USB_STORAGE=m -CONFIG_USB_STORAGE_DATAFAB=m -CONFIG_USB_STORAGE_FREECOM=m -CONFIG_USB_STORAGE_ISD200=m -CONFIG_USB_STORAGE_USBAT=m -CONFIG_USB_STORAGE_SDDR09=m -CONFIG_USB_STORAGE_SDDR55=m -CONFIG_USB_STORAGE_JUMPSHOT=m -CONFIG_USB_STORAGE_ALAUDA=m -CONFIG_USB_STORAGE_ONETOUCH=m -CONFIG_USB_STORAGE_KARMA=m -CONFIG_USB_STORAGE_CYPRESS_ATACB=m -CONFIG_USB_LIBUSUAL=y -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_USS720=m -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_ADUTUX=m -CONFIG_USB_SEVSEG=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYPRESS_CY7C63=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_FTDI_ELAN=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_LD=m -CONFIG_USB_TRANCEVIBRATOR=m -CONFIG_USB_IOWARRIOR=m -CONFIG_USB_TEST=m -CONFIG_MMC=y -CONFIG_SDIO_UART=m -CONFIG_MMC_TEST=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_SPI=m -CONFIG_MMC_S3C=y -CONFIG_LEDS_S3C24XX=m -CONFIG_LEDS_PCA9532=m -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_PCA955X=m -CONFIG_LEDS_DAC124S085=m -CONFIG_LEDS_PWM=m -CONFIG_LEDS_BD2802=m -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m -CONFIG_LEDS_TRIGGER_GPIO=m -CONFIG_LEDS_TRIGGER_DEFAULT_ON=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_S3C=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT4_FS=m -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_NTFS_FS=m -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=m -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_CRAMFS=y -CONFIG_SQUASHFS=m -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_CIFS=m -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_INFO=y -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig deleted file mode 100644 index 3a186d653da..00000000000 --- a/arch/arm/configs/s3c6400_defconfig +++ /dev/null @@ -1,96 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_S3C64XX=y -CONFIG_S3C_BOOT_ERROR_RESET=y -CONFIG_MACH_SMDK6400=y -CONFIG_MACH_ANW6410=y -CONFIG_MACH_MINI6410=y -CONFIG_MACH_REAL6410=y -CONFIG_MACH_SMDK6410=y -CONFIG_MACH_NCP=y -CONFIG_MACH_HMT=y -CONFIG_MACH_SMARTQ5=y -CONFIG_MACH_SMARTQ7=y -CONFIG_MACH_WLF_CRAGG_6410=y -CONFIG_CPU_32v6K=y -CONFIG_AEABI=y -CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc initrd=0x51000000,6M ramdisk_size=6144" -CONFIG_VFP=y -CONFIG_PM=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_S3C2410=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_AT24=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_S3C2410=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=m -CONFIG_SPI_S3C64XX=m -CONFIG_FB=y -CONFIG_FB_S3C=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_LTV350QV=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SOC=m -CONFIG_SND_S3C24XX_SOC=m -CONFIG_SND_SOC_SMDK_WM9713=m -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_MMC=y -CONFIG_MMC_DEBUG=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_S3C=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_S3C=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/s5p64x0_defconfig b/arch/arm/configs/s5p64x0_defconfig deleted file mode 100644 index ad6b61b0bd1..00000000000 --- a/arch/arm/configs/s5p64x0_defconfig +++ /dev/null @@ -1,68 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_S5P64X0=y -CONFIG_S3C_BOOT_ERROR_RESET=y -CONFIG_S3C_LOWLEVEL_UART_PORT=1 -CONFIG_MACH_SMDK6440=y -CONFIG_MACH_SMDK6450=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_CPU_32v6K=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc" -CONFIG_FPE_NWFPE=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_NR_UARTS=3 -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_HW_RANDOM=y -# CONFIG_HWMON is not set -CONFIG_DISPLAY_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_DEBUG_S3C_UART=1 -CONFIG_CRYPTO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/s5pc100_defconfig b/arch/arm/configs/s5pc100_defconfig deleted file mode 100644 index 41bafc94dd8..00000000000 --- a/arch/arm/configs/s5pc100_defconfig +++ /dev/null @@ -1,49 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_S5PC100=y -CONFIG_MACH_SMDKC100=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=cramfs init=/linuxrc console=ttySAC2,115200 mem=128M" -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_EEPROM_AT24=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_MMC=y -CONFIG_MMC_DEBUG=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=y -CONFIG_MMC_SDHCI=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_INOTIFY=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig deleted file mode 100644 index fa989902236..00000000000 --- a/arch/arm/configs/s5pv210_defconfig +++ /dev/null @@ -1,73 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_S5PV210=y -CONFIG_S3C_LOWLEVEL_UART_PORT=1 -CONFIG_S3C_DEV_FB=y -CONFIG_S5PV210_SETUP_FB_24BPP=y -CONFIG_MACH_AQUILA=y -CONFIG_MACH_GONI=y -CONFIG_MACH_SMDKC110=y -CONFIG_MACH_SMDKV210=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_HW_RANDOM=y -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_S3C_UART=1 -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig deleted file mode 100644 index 4d0dc3c1606..00000000000 --- a/arch/arm/configs/sama5_defconfig +++ /dev/null @@ -1,181 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_SOC_SAM_V7=y -CONFIG_SOC_SAMA5D3=y -CONFIG_MACH_SAMA5_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" -CONFIG_AUTO_ZRELADDR=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -CONFIG_IPV6_SIT_6RD=y -CONFIG_CAN=y -CONFIG_CAN_AT91=y -CONFIG_CFG80211=y -CONFIG_MAC80211=y -CONFIG_MAC80211_LEDS=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_ATMEL_TCLIB=y -CONFIG_ATMEL_SSC=y -CONFIG_EEPROM_AT24=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_QT1070=y -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ATMEL_MXT=y -CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_AT91=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -CONFIG_SPI_GPIO=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_SSB=m -CONFIG_FB=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_HID_GENERIC is not set -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_AT91=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_ATMELMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_DMADEVICES=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_IIO=y -CONFIG_AT91_ADC=y -CONFIG_EXT2_FS=y -CONFIG_FANOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_MEMORY_INIT=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -CONFIG_CRYPTO_DEV_ATMEL_AES=y -CONFIG_CRYPTO_DEV_ATMEL_TDES=y -CONFIG_CRYPTO_DEV_ATMEL_SHA=y -CONFIG_CRC_CCITT=m -CONFIG_CRC_ITU_T=m diff --git a/arch/arm/configs/shannon_defconfig b/arch/arm/configs/shannon_defconfig deleted file mode 100644 index b0b96942f4b..00000000000 --- a/arch/arm/configs/shannon_defconfig +++ /dev/null @@ -1,48 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_SHANNON=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySA0,9600 console=tty1 root=/dev/mtdblock2 init=/linuxrc" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_IDE=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=y -CONFIG_PCMCIA_SMC91C92=y -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_WATCHDOG=y -CONFIG_SA1100_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_SA1100=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_JFFS2_FS=y -CONFIG_MINIX_FS=y -CONFIG_NFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig deleted file mode 100644 index e319b2c56f1..00000000000 --- a/arch/arm/configs/shark_defconfig +++ /dev/null @@ -1,80 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_SHARK=y -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_STANDALONE is not set -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=m -CONFIG_SCSI=m -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_CS89x0=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_PRINTER=m -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_CYBER2000=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=m -CONFIG_SOUND_PRIME=m -CONFIG_SOUND_OSS=m -CONFIG_SOUND_SB=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_CMOS=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFSD=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/simpad_defconfig b/arch/arm/configs/simpad_defconfig deleted file mode 100644 index d3358155bf8..00000000000 --- a/arch/arm/configs/simpad_defconfig +++ /dev/null @@ -1,111 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOCALVERSION="oe1" -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_MODULES=y -CONFIG_ARCH_SA1100=y -CONFIG_SA1100_SIMPAD=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_SA1100=y -CONFIG_PREEMPT=y -CONFIG_LEDS=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA0 root=1f02 noinitrd mem=64M jffs2_orphaned_inodes=delete rootfstype=jffs2" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_MISC=m -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRTTY_SIR=m -CONFIG_SA1100_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_RAM=y -CONFIG_MTD_SA1100=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=m -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m -CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=600 -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_EVBUG=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_SERIO=m -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_FB=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_EXT2_FS=m -CONFIG_EXT3_FS=m -CONFIG_REISERFS_FS=m -CONFIG_REISERFS_PROC_INFO=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_SMB_FS=m -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig deleted file mode 100644 index 4e1ce211d43..00000000000 --- a/arch/arm/configs/socfpga_defconfig +++ /dev/null @@ -1,84 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_CPUSETS=y -CONFIG_NAMESPACES=y -CONFIG_EMBEDDED=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SOCFPGA=y -CONFIG_MACH_SOCFPGA_CYCLONE5=y -CONFIG_ARM_THUMBEE=y -# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set -# CONFIG_CACHE_L2X0 is not set -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=2 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_STMMAC_ETH=y -# CONFIG_STMMAC_PHY_ID_ZERO_WORKAROUND is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_8250_DW=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_VFAT_FS=y -CONFIG_NTFS_FS=y -CONFIG_NTFS_RW=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DETECT_HUNG_TASK=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_INFO=y -CONFIG_ENABLE_DEFAULT_TRACERS=y -CONFIG_DEBUG_USER=y -CONFIG_XZ_DEC=y diff --git a/arch/arm/configs/spear13xx_defconfig b/arch/arm/configs/spear13xx_defconfig deleted file mode 100644 index 1fdb82694ca..00000000000 --- a/arch/arm/configs/spear13xx_defconfig +++ /dev/null @@ -1,95 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_PLAT_SPEAR=y -CONFIG_ARCH_SPEAR13XX=y -CONFIG_MACH_SPEAR1310=y -CONFIG_MACH_SPEAR1340=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -# CONFIG_SMP_ON_UP is not set -# CONFIG_ARM_CPU_TOPOLOGY is not set -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_BINFMT_MISC=y -CONFIG_NET=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_OF_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSMC=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_ATA=y -# CONFIG_SATA_PMP is not set -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_PATA_ARASAN_CF=y -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -CONFIG_STMMAC_ETH=y -# CONFIG_WLAN is not set -CONFIG_INPUT_FF_MEMLESS=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_SPEAR=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_I2C=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_SPI=y -CONFIG_SPI_PL022=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PL061=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_MPCORE_WATCHDOG=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_SPEAR=y -CONFIG_RTC_CLASS=y -CONFIG_DMADEVICES=y -CONFIG_DW_DMAC=y -CONFIG_DMATEST=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_AUTOFS4_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_INFO=y diff --git a/arch/arm/configs/spear3xx_defconfig b/arch/arm/configs/spear3xx_defconfig deleted file mode 100644 index 7ff23a077f5..00000000000 --- a/arch/arm/configs/spear3xx_defconfig +++ /dev/null @@ -1,89 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_PLAT_SPEAR=y -CONFIG_ARCH_SPEAR3XX=y -CONFIG_MACH_SPEAR300=y -CONFIG_MACH_SPEAR310=y -CONFIG_MACH_SPEAR320=y -CONFIG_BINFMT_MISC=y -CONFIG_NET=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_OF_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSMC=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -CONFIG_STMMAC_ETH=y -# CONFIG_WLAN is not set -CONFIG_INPUT_FF_MEMLESS=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_SPEAR=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_I2C=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_SPI=y -CONFIG_SPI_PL022=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PL061=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_ARM_SP805_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_SPEAR=y -CONFIG_RTC_CLASS=y -CONFIG_DMADEVICES=y -CONFIG_AMBA_PL08X=y -CONFIG_DMATEST=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_AUTOFS4_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_INFO=y diff --git a/arch/arm/configs/spear6xx_defconfig b/arch/arm/configs/spear6xx_defconfig deleted file mode 100644 index 7822980d7d5..00000000000 --- a/arch/arm/configs/spear6xx_defconfig +++ /dev/null @@ -1,78 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_PLAT_SPEAR=y -CONFIG_ARCH_SPEAR6XX=y -CONFIG_BINFMT_MISC=y -CONFIG_NET=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_OF_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSMC=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -CONFIG_STMMAC_ETH=y -# CONFIG_WLAN is not set -CONFIG_INPUT_FF_MEMLESS=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=8192 -CONFIG_I2C=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_SPI=y -CONFIG_SPI_PL022=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PL061=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_ARM_SP805_WATCHDOG=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_RTC_CLASS=y -CONFIG_DMADEVICES=y -CONFIG_AMBA_PL08X=y -CONFIG_DMATEST=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_AUTOFS4_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_INFO=y diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig deleted file mode 100644 index 2e0419d1b96..00000000000 --- a/arch/arm/configs/spitz_defconfig +++ /dev/null @@ -1,274 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EXPERT=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_PXA=y -CONFIG_PXA_SHARPSL=y -CONFIG_MACH_AKITA=y -CONFIG_MACH_BORZOI=y -CONFIG_PCCARD=y -CONFIG_PCMCIA_PXA2XX=y -CONFIG_PREEMPT=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 debug" -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_PXA_FICP=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_ROM=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_SHARPSL=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECS=y -CONFIG_SCSI=m -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -# CONFIG_USB_NET_CDC_SUBSET is not set -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_PCNET=m -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_BSDCOMP=m -CONFIG_INPUT_FF_MEMLESS=m -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_FB=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_CORGI=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_USB_KBD=m -CONFIG_USB_MOUSE=m -CONFIG_HID_A4TECH=m -CONFIG_HID_APPLE=m -CONFIG_HID_BELKIN=m -CONFIG_HID_CHERRY=m -CONFIG_HID_CHICONY=m -CONFIG_HID_CYPRESS=m -CONFIG_HID_EZKEY=m -CONFIG_HID_GYRATION=m -CONFIG_HID_LOGITECH=m -CONFIG_HID_MICROSOFT=m -CONFIG_HID_MONTEREY=m -CONFIG_HID_PANTHERLORD=m -CONFIG_HID_PETALYNX=m -CONFIG_HID_SAMSUNG=m -CONFIG_HID_SONY=m -CONFIG_HID_SUNPLUS=m -CONFIG_USB=m -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=m -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_GADGET=m -CONFIG_USB_GADGET_DUMMY_HCD=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_PXA=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_RUBIN=y -CONFIG_CRAMFS=m -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_TWOFISH=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y -CONFIG_LIBCRC32C=m diff --git a/arch/arm/configs/tcl8127_c_mlc_debug_defconfig b/arch/arm/configs/tcl8127_c_mlc_debug_defconfig deleted file mode 100755 index a17ab9641b8..00000000000 --- a/arch/arm/configs/tcl8127_c_mlc_debug_defconfig +++ /dev/null @@ -1,3238 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=0 -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tcl8127_c_mlc" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -CONFIG_MTK_MLC_NAND_SUPPORT=y -# CONFIG_FPGA_EARLY_PORTING is not set -# CONFIG_MTK_EMMC_SUPPORT is not set -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_MTD_NAND=y -# CONFIG_MTK_MTD_NAND_INTERRUPT_SCHEME is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_COMBO_NAND_SUPPORT=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tcl8127_c_mlc_defconfig b/arch/arm/configs/tcl8127_c_mlc_defconfig deleted file mode 100755 index 41aecdba966..00000000000 --- a/arch/arm/configs/tcl8127_c_mlc_defconfig +++ /dev/null @@ -1,3223 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=0 -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tcl8127_c_mlc" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -CONFIG_MTK_MLC_NAND_SUPPORT=y -# CONFIG_FPGA_EARLY_PORTING is not set -# CONFIG_MTK_EMMC_SUPPORT is not set -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_MTD_NAND=y -# CONFIG_MTK_MTD_NAND_INTERRUPT_SCHEME is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_COMBO_NAND_SUPPORT=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tcl8127_tb_c_l_debug_defconfig b/arch/arm/configs/tcl8127_tb_c_l_debug_defconfig deleted file mode 100755 index 35ebabfd766..00000000000 --- a/arch/arm/configs/tcl8127_tb_c_l_debug_defconfig +++ /dev/null @@ -1,3228 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tcl8127_tb_c_l" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -CONFIG_MTK_PUMP_EXPRESS_SUPPORT=y -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tcl8127_tb_c_l_defconfig b/arch/arm/configs/tcl8127_tb_c_l_defconfig deleted file mode 100755 index 7faa8f9b7fa..00000000000 --- a/arch/arm/configs/tcl8127_tb_c_l_defconfig +++ /dev/null @@ -1,3213 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tcl8127_tb_c_l" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -CONFIG_MTK_PUMP_EXPRESS_SUPPORT=y -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tct_hammer_defconfig b/arch/arm/configs/tct_hammer_defconfig deleted file mode 100644 index 71277a1591b..00000000000 --- a/arch/arm/configs/tct_hammer_defconfig +++ /dev/null @@ -1,70 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -# CONFIG_BUGVERBOSE is not set -# CONFIG_ELF_CORE is not set -# CONFIG_SHMEM is not set -CONFIG_SLOB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_S3C24XX=y -CONFIG_MACH_TCT_HAMMER=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M root=/dev/ram0 init=/linuxrc rw" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=10240 -# CONFIG_MISC_DEVICES is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_VT_CONSOLE is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_S3C2410=y -CONFIG_USB_ETH=m -CONFIG_EXT2_FS=y -# CONFIG_DNOTIFY is not set -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -# CONFIG_PROC_SYSCTL is not set -CONFIG_JFFS2_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DETECT_SOFTLOCKUP is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig deleted file mode 100644 index f7ba316164d..00000000000 --- a/arch/arm/configs/tegra_defconfig +++ /dev/null @@ -1,255 +0,0 @@ -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_CGROUPS=y -CONFIG_CGROUP_DEBUG=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -CONFIG_CGROUP_SCHED=y -CONFIG_RT_GROUP_SCHED=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_ELF_CORE is not set -CONFIG_EMBEDDED=y -CONFIG_PERF_EVENTS=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_TEGRA=y -CONFIG_GPIO_PCA953X=y -CONFIG_ARCH_TEGRA_2x_SOC=y -CONFIG_ARCH_TEGRA_3x_SOC=y -CONFIG_ARCH_TEGRA_114_SOC=y -CONFIG_TEGRA_PCI=y -CONFIG_TEGRA_EMC_SCALING_ENABLE=y -CONFIG_SMP=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_INET_ESP=y -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_IPV6_TUNNEL=y -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_BNEP=y -CONFIG_BT_HIDP=y -CONFIG_BT_HCIBTUSB=m -CONFIG_CFG80211=y -CONFIG_MAC80211=y -CONFIG_RFKILL=y -CONFIG_RFKILL_INPUT=y -CONFIG_RFKILL_GPIO=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_CMA=y -CONFIG_MTD=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_M25P80=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_AD525X_DPOT=y -CONFIG_AD525X_DPOT_I2C=y -CONFIG_ICS932S401=y -CONFIG_APDS9802ALS=y -CONFIG_ISL29003=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_R8169=y -CONFIG_USB_PEGASUS=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC75XX=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_BRCMFMAC=m -CONFIG_RT2X00=y -CONFIG_RT2800USB=m -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_TEGRA=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MPU3050=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_TEGRA=y -CONFIG_SERIAL_OF_PLATFORM=y -# CONFIG_HW_RANDOM is not set -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_MUX=y -CONFIG_I2C_MUX_PINCTRL=y -CONFIG_I2C_TEGRA=y -CONFIG_SPI=y -CONFIG_SPI_TEGRA20_SFLASH=y -CONFIG_SPI_TEGRA20_SLINK=y -CONFIG_GPIO_PCA953X_IRQ=y -CONFIG_GPIO_PALMAS=y -CONFIG_GPIO_TPS6586X=y -CONFIG_GPIO_TPS65910=y -CONFIG_POWER_SUPPLY=y -CONFIG_BATTERY_SBS=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_GPIO=y -CONFIG_SENSORS_LM90=y -CONFIG_MFD_TPS6586X=y -CONFIG_MFD_TPS65910=y -CONFIG_MFD_MAX8907=y -CONFIG_MFD_TPS65090=y -CONFIG_MFD_PALMAS=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_VIRTUAL_CONSUMER=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX8907=y -CONFIG_REGULATOR_PALMAS=y -CONFIG_REGULATOR_TPS51632=y -CONFIG_REGULATOR_TPS62360=y -CONFIG_REGULATOR_TPS65090=y -CONFIG_REGULATOR_TPS6586X=y -CONFIG_REGULATOR_TPS65910=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_DRM=y -CONFIG_TEGRA_HOST1X=y -CONFIG_DRM_TEGRA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_SOC_TEGRA=y -CONFIG_SND_SOC_TEGRA_WM8753=y -CONFIG_SND_SOC_TEGRA_WM8903=y -CONFIG_SND_SOC_TEGRA_TRIMSLICE=y -CONFIG_SND_SOC_TEGRA_ALC5632=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_TEGRA=y -CONFIG_USB_ACM=y -CONFIG_USB_WDM=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK_MINORS=16 -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_TEGRA=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_MAX8907=y -CONFIG_RTC_DRV_PALMAS=y -CONFIG_RTC_DRV_TPS6586X=y -CONFIG_RTC_DRV_TPS65910=y -CONFIG_RTC_DRV_EM3027=y -CONFIG_RTC_DRV_TEGRA=y -CONFIG_DMADEVICES=y -CONFIG_TEGRA20_APB_DMA=y -CONFIG_STAGING=y -CONFIG_SENSORS_ISL29018=y -CONFIG_SENSORS_ISL29028=y -CONFIG_AK8975=y -CONFIG_MFD_NVEC=y -CONFIG_KEYBOARD_NVEC=y -CONFIG_SERIO_NVEC_PS2=y -CONFIG_NVEC_POWER=y -CONFIG_NVEC_PAZ00=y -CONFIG_TEGRA_IOMMU_GART=y -CONFIG_TEGRA_IOMMU_SMMU=y -CONFIG_MEMORY=y -CONFIG_IIO=y -CONFIG_PWM=y -CONFIG_PWM_TEGRA=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -# CONFIG_DNOTIFY is not set -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_LZO=y -CONFIG_SQUASHFS_XZ=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_SCHEDSTATS=y -CONFIG_TIMER_STATS=y -CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_VM=y -CONFIG_DEBUG_SG=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_CRYPTO_TWOFISH=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_TEGRA_AES=y -CONFIG_CRC_CCITT=y diff --git a/arch/arm/configs/tpw8127_c_mlc_debug_defconfig b/arch/arm/configs/tpw8127_c_mlc_debug_defconfig deleted file mode 100755 index fefd21ff925..00000000000 --- a/arch/arm/configs/tpw8127_c_mlc_debug_defconfig +++ /dev/null @@ -1,3238 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=0 -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tpw8127_c_mlc" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -CONFIG_MTK_MLC_NAND_SUPPORT=y -# CONFIG_FPGA_EARLY_PORTING is not set -# CONFIG_MTK_EMMC_SUPPORT is not set -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_MTD_NAND=y -# CONFIG_MTK_MTD_NAND_INTERRUPT_SCHEME is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_COMBO_NAND_SUPPORT=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tpw8127_c_mlc_defconfig b/arch/arm/configs/tpw8127_c_mlc_defconfig deleted file mode 100755 index ba3bad83cd3..00000000000 --- a/arch/arm/configs/tpw8127_c_mlc_defconfig +++ /dev/null @@ -1,3223 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=0 -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tpw8127_c_mlc" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -CONFIG_MTK_MLC_NAND_SUPPORT=y -# CONFIG_FPGA_EARLY_PORTING is not set -# CONFIG_MTK_EMMC_SUPPORT is not set -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_MTD_NAND=y -# CONFIG_MTK_MTD_NAND_INTERRUPT_SCHEME is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_COMBO_NAND_SUPPORT=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tpw8127_tb_c_l_debug_defconfig b/arch/arm/configs/tpw8127_tb_c_l_debug_defconfig deleted file mode 100755 index ad2c8bbbc2a..00000000000 --- a/arch/arm/configs/tpw8127_tb_c_l_debug_defconfig +++ /dev/null @@ -1,3228 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tpw8127_tb_c_l" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -# CONFIG_MTK_WAPI_SUPPORT is not set -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -CONFIG_MTK_PUMP_EXPRESS_SUPPORT=y -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/tpw8127_tb_c_l_defconfig b/arch/arm/configs/tpw8127_tb_c_l_defconfig deleted file mode 100755 index f4867611a6b..00000000000 --- a/arch/arm/configs/tpw8127_tb_c_l_defconfig +++ /dev/null @@ -1,3213 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="tpw8127_tb_c_l" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5647_raw ov2659_yuv" -CONFIG_CUSTOM_KERNEL_LCM="CPT_CLAP070WP03XG_LVDS" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -# CONFIG_MTK_WAPI_SUPPORT is not set -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -CONFIG_MTK_PUMP_EXPRESS_SUPPORT=y -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -CONFIG_MTK_APDS9930=y -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -CONFIG_MTK_MPU6050G=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6050GY=y -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig deleted file mode 100644 index 3162173fa75..00000000000 --- a/arch/arm/configs/trizeps4_defconfig +++ /dev/null @@ -1,226 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_ARCH_PXA=y -CONFIG_TRIZEPS_PXA=y -CONFIG_MACH_TRIZEPS4=y -CONFIG_PCCARD=y -# CONFIG_PCMCIA_LOAD_CIS is not set -CONFIG_PCMCIA_PXA2XX=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=fe01 console=ttyS0,38400n8 loglevel=5" -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_IP_NF_QUEUE=m -CONFIG_VLAN_8021Q=m -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -CONFIG_IRTTY_SIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_CFG80211=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_LE_BYTE_SWAP=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_BLOCK2MTD=y -CONFIG_MTD_DOC2000=y -CONFIG_MTD_DOC2001=y -CONFIG_MTD_DOC2001PLUS=y -CONFIG_MTD_DOCPROBE_ADVANCED=y -CONFIG_MTD_DOCPROBE_ADDRESS=0x4000000 -CONFIG_MTD_DOCPROBE_HIGH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_DISKONCHIP=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x4000000 -CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=y -CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y -CONFIG_MTD_ONENAND=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=8 -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_ATA=m -CONFIG_PATA_PCMCIA=m -CONFIG_PATA_PLATFORM=m -CONFIG_NETDEVICES=y -CONFIG_PHYLIB=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -CONFIG_HOSTAP=y -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_CS=y -CONFIG_HERMES=y -CONFIG_PCMCIA_HERMES=y -CONFIG_PCMCIA_SPECTRUM=y -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_ATKBD=m -# CONFIG_MOUSE_PS2 is not set -CONFIG_MOUSE_SERIAL=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PXA=y -CONFIG_I2C_PXA_SLAVE=y -CONFIG_WATCHDOG=y -CONFIG_SA1100_WATCHDOG=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_PXA=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_PXA2XX_AC97=y -CONFIG_SND_USB_AUDIO=m -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=m -CONFIG_USB_SERIAL=m -CONFIG_USB_GADGET=m -CONFIG_USB_GADGET_DUMMY_HCD=y -CONFIG_MMC=y -CONFIG_MMC_PXA=y -CONFIG_NEW_LEDS=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_SA1100=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_INOTIFY=y -CONFIG_AUTOFS4_FS=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V4=y -CONFIG_SMB_FS=m -CONFIG_CIFS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_LDM_PARTITION=y -CONFIG_NLS_DEFAULT="iso8859-15" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_USER=y -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/ttab_debug_defconfig b/arch/arm/configs/ttab_debug_defconfig deleted file mode 100644 index 35249fb96da..00000000000 --- a/arch/arm/configs/ttab_debug_defconfig +++ /dev/null @@ -1,3231 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="ttab" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -# CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov2680_raw gc2355_mipi_raw ov5670_mipi_raw ov56702nd_mipi_raw" -#CONFIG_CUSTOM_KERNEL_LCM="a080ean01_dsi_vdo" -CONFIG_CUSTOM_KERNEL_LCM="ota7291_wxga_dsi_vdo rm72013_wxga_dsi_vdo a080ean01_dsi_vdo" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -# CONFIG_MTK_FTRACE_DEFAULT_ENABLE is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -CONFIG_PREEMPT_MONITOR=y -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -CONFIG_MT_CHRDEV_REG=y -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_MT_DEBUG_MUTEXES=y -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -CONFIG_MTK_WQ_DEBUG=y -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -# CONFIG_GATOR_DRIVER is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -#CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -CONFIG_MTK_FAN5405_SUPPORT=y -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_MPU6050G is not set -CONFIG_MTK_HALL=y -CONFIG_MTK_BMA2XX=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -# CONFIG_MTK_MPU6050GY is not set -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM09911=y -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -#[FEATURE]-Mod-BEGIN by TCTSZ.yaohui.zeng, 2015/04/20,disable BL AAL -#CONFIG_MTK_AAL_SUPPORT=y -#[FEATURE]-Mod-END by TCTSZ.yaohui.zeng, 2015/04/20 -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/ttab_defconfig b/arch/arm/configs/ttab_defconfig deleted file mode 100644 index a0673e5dfaa..00000000000 --- a/arch/arm/configs/ttab_defconfig +++ /dev/null @@ -1,3217 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.54 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_FIQ=y -CONFIG_VECTORS_BASE=0xffff0000 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -# CONFIG_KERNEL_GZIP is not set -# CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y -# CONFIG_KERNEL_LZO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_KTIME_SCALAR=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -# CONFIG_RCU_USER_QS is not set -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_OPROFILE is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_JUMP_LABEL is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_MT6572 is not set -# CONFIG_ARCH_MT6595 is not set -# CONFIG_ARCH_MT6582 is not set -# CONFIG_ARCH_MT6592 is not set -# CONFIG_ARCH_MT6752 is not set -# CONFIG_ARCH_MT6795 is not set -CONFIG_ARCH_MT8127=y -# CONFIG_ARCH_SHMOBILE is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5P64X0 is not set -# CONFIG_ARCH_S5PC100 is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x80000000 - -# -# MT8127 Board Support Package -# -# CONFIG_MT8127_FPGA is not set -CONFIG_MT8127_EVB_BOARD=y - -# -# MTK Board Support Package -# -# CONFIG_PLAT_SPEAR is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_NR_BANKS=8 -# CONFIG_MTK_KERNEL_IN_SECURE_MODE is not set -# CONFIG_L1C_OPT is not set -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_828419 is not set -# CONFIG_ARM_ERRATA_828420 is not set -# CONFIG_ARM_ERRATA_831171 is not set -# CONFIG_ARM_ERRATA_824069 is not set -# CONFIG_ARM_ERRATA_826319 is not set -CONFIG_FIQ_GLUE=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y -# CONFIG_PCI_SYSCALL is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -# CONFIG_HAVE_ARM_ARCH_TIMER is not set -# CONFIG_MCPM is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_LOCAL_TIMERS=y -CONFIG_ARCH_NR_GPIO=0 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -# CONFIG_HIGHPTE is not set -CONFIG_HW_PERF_EVENTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -# CONFIG_USE_OF is not set -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -# CONFIG_COMPAT_CPUINFO is not set -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -CONFIG_RESTART_DISABLE_CACHE=y -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG=y -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_HOTPLUG=y - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFP_OPT=y -CONFIG_VFPv3=y -CONFIG_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -CONFIG_TOI_FILE=y -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_APM_EMULATION is not set -CONFIG_CPU_PM=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_HAVE_BPF_JIT=y -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -# CONFIG_HAVE_CPU_AUTOPROBE is not set -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_CMA is not set - -# -# Bus devices -# -# CONFIG_ARM_CCI is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_NANDSIM is not set -CONFIG_MTD_NAND_PLATFORM=y -# CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -CONFIG_ANDROID_PMEM=y -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt8127" -CONFIG_ARCH_MTK_PROJECT="ttab" -# CONFIG_MTK_INTERNAL is not set -CONFIG_MTK_CIRQ=y -# CONFIG_MTK_SYSTRACKER is not set -# CONFIG_MTK_L2C_SHARE is not set -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -# CONFIG_MTK_GPT_SCHEME_SUPPORT is not set -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT=y -CONFIG_MTK_SECURITY_SW_SUPPORT=y -CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_IN_HOUSE_TEE_SUPPORT=y -CONFIG_MTK_SEC_VIDEO_PATH_SUPPORT=y -CONFIG_MTK_DRM_KEY_MNG_SUPPORT=y -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -# CONFIG_MD32_SUPPORT is not set -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -# CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -# CONFIG_CUSTOM_KERNEL_BAROMETER is not set -CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov2680_raw gc2355_mipi_raw ov5670_mipi_raw ov56702nd_mipi_raw" -#CONFIG_CUSTOM_KERNEL_LCM="a080ean01_dsi_vdo" -CONFIG_CUSTOM_KERNEL_LCM="ota7291_wxga_dsi_vdo rm72013_wxga_dsi_vdo a080ean01_dsi_vdo" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_single" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -# CONFIG_MTK_MMPROFILE_SUPPORT is not set -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set -CONFIG_MTK_COMBO_AOSP_TETHERING_SUPPORT=y - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -CONFIG_FUNCTION_DURATION_TRACER=y -# CONFIG_MT65XX_TRACER is not set -CONFIG_GENERIC_TRACER=y - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -# CONFIG_MTK_AEE_POWERKEY_HANG_DETECT is not set -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -CONFIG_MTK_RAM_CONSOLE_USING_SRAM=y -# CONFIG_MTK_RAM_CONSOLE_USING_DRAM is not set -CONFIG_MTK_RAM_CONSOLE_SIZE=0x1C00 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF900DC00 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -CONFIG_EARLY_LINUX_PORTING=y -# CONFIG_MTK_MCI is not set -# CONFIG_MTK_ETM is not set - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -# CONFIG_MT_LOAD_BALANCE_ENHANCEMENT is not set -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -# CONFIG_MTK_SCHED_RQAVG_US is not set -# CONFIG_MTK_SCHED_RQAVG_KS is not set -# CONFIG_MTK_STORAGE_PID_LOGGER is not set - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -CONFIG_MTK_TABLET_HARDWARE=y -CONFIG_GATOR_DRIVER=y -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -# CONFIG_MTK_CCCI_DEVICES is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -CONFIG_MTK_DITHERING_SUPPORT=y -CONFIG_MTK_LCM_PHYSICAL_ROTATION="0" -CONFIG_LCM_HEIGHT="1280" -CONFIG_LCM_WIDTH="800" -CONFIG_MTK_OVERLAY_ENGINE_SUPPORT=y -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -#CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_8127=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6752 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_8127" -CONFIG_MTK_WLAN_CHIP="" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6627_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -CONFIG_MTK_IDLE_TIME_FIX=y -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -# CONFIG_MTK_SPI is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -CONFIG_KEYBOARD_HID=y -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -# CONFIG_MTK_MTD_NAND is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -# CONFIG_MTK_BQ24261_SUPPORT is not set -# CONFIG_MTK_BQ24196_SUPPORT is not set -CONFIG_MTK_FAN5405_SUPPORT=y -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -CONFIG_MTK_SOUND=y -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -# CONFIG_MTK_CM36652_NEW is not set -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_MPU6050G is not set -CONFIG_MTK_HALL=y -CONFIG_MTK_BMA2XX=y -# CONFIG_MTK_BMA250 is not set -# CONFIG_MTK_MPU6515A is not set -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -# CONFIG_MTK_MPU6050GY is not set -# CONFIG_MTK_MPU6515G is not set -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM09911 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -# CONFIG_MTK_YAS532 is not set -# CONFIG_MTK_BMP180_NEW is not set -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X is not set -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -# CONFIG_MMPROFILE is not set -CONFIG_MTK_STAGING=y -# CONFIG_MTKPASR is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -# CONFIG_MTK_EMMC_CACHE is not set -CONFIG_MTK_GPU_SUPPORT=y -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="" -CONFIG_MTK_HDMI_SUPPORT=y -CONFIG_MTK_INTERNAL_HDMI_SUPPORT=y -CONFIG_MTK_HDMI_HDCP_SUPPORT=y -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_THERMAL_PA_VIA_ATCMD is not set -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -CONFIG_MTK_VIDEO_HEVC_SUPPORT=y -#[FEATURE]-Mod-BEGIN by TCTSZ.yaohui.zeng, 2015/04/20,disable BL AAL -#CONFIG_MTK_AAL_SUPPORT=y -#[FEATURE]-Mod-END by TCTSZ.yaohui.zeng, 2015/04/20 -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -CONFIG_MTK_LENS_DUMMYLENS_SUPPORT=y -# CONFIG_MTK_LENS_AD5820AF_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9714AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -CONFIG_MTK_LENS_FM50AF_SUPPORT=y -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CPU_STRESS is not set -# CONFIG_MTK_LASTPC is not set -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -# CONFIG_MTK_CMDQ is not set -# CONFIG_MTK_VIDEOX is not set -CONFIG_MTK_MT_LOGGER=y -CONFIG_MTK_CONN_MD=y -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -CONFIG_MTK_FLASHLIGHT=y -CONFIG_MTK_DUM_CHAR=y -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -CONFIG_MTK_SOUND_DRV=y -CONFIG_MTK_POWER_GS=y -CONFIG_MTK_VIDEO=y -CONFIG_MTK_MRDUMP=y -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_MTK is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_EM is not set -# CONFIG_GPIO_PL061 is not set -# CONFIG_GPIO_RCAR is not set -# CONFIG_GPIO_TS5500 is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -# CONFIG_POWER_RESET is not set -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -# CONFIG_MEDIA_CAMERA_SUPPORT is not set -# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set -# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set -# CONFIG_MEDIA_RADIO_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_TTPCI_EEPROM is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -CONFIG_LIRC=y -CONFIG_IR_LIRC_CODEC=y -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_RC5_SZ_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -# CONFIG_RC_DEVICES is not set -# CONFIG_MEDIA_USB_SUPPORT is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# - -# -# Customise DVB Frontends -# -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -# CONFIG_SND_MIXER_OSS is not set -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_PCM_OSS_PLUGINS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_SOC is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -CONFIG_HID_NTRIG=y -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set -CONFIG_USB_SERIAL=y -# CONFIG_USB_SERIAL_CONSOLE is not set -# CONFIG_USB_EZUSB is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP210X is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_F81232 is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MOTOROLA is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIEMENS_MPI is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=y -CONFIG_USB_SERIAL_OPTION=y -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set -# CONFIG_USB_SERIAL_ZIO is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_DEBUG is not set -# CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -# CONFIG_USB_ULPI is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FUSB300 is not set -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_IPC_32BIT=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set - -# -# Hardware Spinlock drivers -# -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_USE_FOR_EXT23 is not set -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_DYNAMIC_FTRACE is not set -CONFIG_FUNCTION_PROFILER=y -# CONFIG_FTRACE_MCOUNT_RECORD is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_OLD_MCOUNT is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_RODATA=y -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_OC_ETM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA1_ARM is not set -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_ARM is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig deleted file mode 100644 index 374000ec4e4..00000000000 --- a/arch/arm/configs/u300_defconfig +++ /dev/null @@ -1,73 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EXPERT=y -# CONFIG_AIO is not set -# CONFIG_VM_EVENT_COUNTERS is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_U300=y -CONFIG_MACH_U300=y -CONFIG_MACH_U300_BS335=y -CONFIG_MACH_U300_SPIDUMMY=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/ram0 rw rootfstype=rootfs console=ttyAMA0,115200n8 lpj=515072" -CONFIG_CPU_IDLE=y -CONFIG_FPE_NWFPE=y -# CONFIG_SUSPEND is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSMC=y -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_REGULATOR=y -CONFIG_FB=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_CLKGATE=y -CONFIG_MMC_ARMMMCI=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_RTC_DRV_COH901331=y -CONFIG_DMADEVICES=y -CONFIG_COH901318=y -# CONFIG_DNOTIFY is not set -CONFIG_FUSE_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_TIMER_STATS=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_CRC32 is not set diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig deleted file mode 100644 index c037aa1065b..00000000000 --- a/arch/arm/configs/u8500_defconfig +++ /dev/null @@ -1,124 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_U8500=y -CONFIG_MACH_HREFV60=y -CONFIG_MACH_SNOWBALL=y -CONFIG_MACH_U5500=y -CONFIG_MACH_UX500_DT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_NETFILTER=y -CONFIG_PHONET=y -# CONFIG_WIRELESS is not set -CONFIG_CAIF=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_AB8500_PWM=y -CONFIG_SENSORS_BH1780=y -CONFIG_NETDEVICES=y -CONFIG_SMSC911X=y -CONFIG_SMSC_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_NOMADIK=y -CONFIG_KEYBOARD_STMPE=y -CONFIG_KEYBOARD_TC3589X=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_BU21013=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_AB8500_PONKEY=y -# CONFIG_SERIO is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_NOMADIK=y -CONFIG_SPI=y -CONFIG_SPI_PL022=y -CONFIG_GPIO_STMPE=y -CONFIG_GPIO_TC3589X=y -# CONFIG_POWER_SUPPLY is not set -# CONFIG_AB8500_BM is not set -# CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL is not set -CONFIG_THERMAL=y -CONFIG_CPU_THERMAL=y -CONFIG_MFD_STMPE=y -CONFIG_MFD_TC3589X=y -CONFIG_AB5500_CORE=y -CONFIG_AB8500_CORE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_AB8500=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB_GADGET=y -CONFIG_AB8500_USB=y -CONFIG_MMC=y -CONFIG_MMC_CLKGATE=y -CONFIG_MMC_ARMMMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_LM3530=y -CONFIG_LEDS_LP5521=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AB8500=y -CONFIG_RTC_DRV_PL031=y -CONFIG_DMADEVICES=y -CONFIG_STE_DMA40=y -CONFIG_STAGING=y -CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y -CONFIG_HSEM_U8500=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=m -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig deleted file mode 100644 index 2ba9e63d0f1..00000000000 --- a/arch/arm/configs/versatile_defconfig +++ /dev/null @@ -1,85 +0,0 @@ -CONFIG_ARCH_VERSATILE=y -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MACH_VERSATILE_AB=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_LEGACY=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_ARMAACI=m -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=m -CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=m -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig deleted file mode 100644 index f2de51f0bd1..00000000000 --- a/arch/arm/configs/vexpress_defconfig +++ /dev/null @@ -1,140 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_CPUSETS=y -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_VEXPRESS=y -CONFIG_ARCH_VEXPRESS_CA9X4=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_HOTPLUG_CPU=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_ARM_INTEGRATOR=y -CONFIG_MISC_DEVICES=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -# CONFIG_SATA_PMP is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMSC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_DRIVERS is not set -CONFIG_SND_ARMAACI=y -CONFIG_HID_DRAGONRISE=y -CONFIG_HID_GYRATION=y -CONFIG_HID_TWINHAN=y -CONFIG_HID_NTRIG=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -CONFIG_HID_SMARTJOYPLUS=y -CONFIG_HID_TOPSEED=y -CONFIG_HID_THRUSTMASTER=y -CONFIG_HID_ZEROPLUS=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_MON=y -CONFIG_USB_ISP1760_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PL031=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DETECT_HUNG_TASK=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig deleted file mode 100644 index d36e0d3c86e..00000000000 --- a/arch/arm/configs/viper_defconfig +++ /dev/null @@ -1,174 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=13 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_EXPERT=y -# CONFIG_ELF_CORE is not set -# CONFIG_SHMEM is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_ARCH_VIPER=y -CONFIG_IWMMXT=y -CONFIG_PCCARD=m -CONFIG_PCMCIA_PXA2XX=m -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=31:02 rootfstype=jffs2 ro console=ttyS0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m -CONFIG_FPE_FASTFPE=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_MTD=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=0 -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_RAM=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PXA2XX=y -CONFIG_BLK_DEV_LOOP=m -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=m -CONFIG_ATA=m -# CONFIG_SATA_PMP is not set -CONFIG_PATA_PCMCIA=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_USB_PEGASUS=m -CONFIG_USB_USBNET=m -# CONFIG_USB_NET_CDC_SUBSET is not set -CONFIG_NET_PCMCIA=y -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_INPUT_MOUSEDEV=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_FUJITSU=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_INEXIO=m -CONFIG_TOUCHSCREEN_HTCPEN=m -CONFIG_TOUCHSCREEN_PENMOUNT=m -CONFIG_TOUCHSCREEN_TOUCHRIGHT=m -CONFIG_TOUCHSCREEN_TOUCHWIN=m -CONFIG_TOUCHSCREEN_TOUCHIT213=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -# CONFIG_CONSOLE_TRANSLATIONS is not set -# CONFIG_VT_CONSOLE is not set -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_NR_UARTS=5 -CONFIG_SERIAL_8250_RUNTIME_UARTS=5 -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_PXA=y -CONFIG_GPIO_SYSFS=y -CONFIG_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_PXA=m -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_PWM=m -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=m -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PXA2XX_AC97=m -CONFIG_USB=m -CONFIG_USB_DEVICEFS=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_R8A66597_HCD=m -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=m -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_GADGET=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_G_PRINTER=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_SA1100=m -CONFIG_EXT2_FS=m -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -# CONFIG_DNOTIFY is not set -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=m -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRC_T10DIF=m diff --git a/arch/arm/configs/xcep_defconfig b/arch/arm/configs/xcep_defconfig deleted file mode 100644 index 721832ffe2d..00000000000 --- a/arch/arm/configs/xcep_defconfig +++ /dev/null @@ -1,99 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_LOCALVERSION=".xcep-itech" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_UID16 is not set -# CONFIG_SHMEM is not set -# CONFIG_VM_EVENT_COUNTERS is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_SLOB=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLOCK is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_XCEP=y -CONFIG_IWMMXT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=mtd4 rootfstype=jffs2 ro console=ttyS0,115200" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=m -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FW_LOADER is not set -CONFIG_MTD_CONCAT=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PXA2XX=y -# CONFIG_MISC_DEVICES is not set -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_PXA=m -CONFIG_HWMON=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_MAX6650=m -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SA1100=m -CONFIG_DMADEVICES=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_WBUF_VERIFY=y -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_LIBCRC32C=m diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig deleted file mode 100644 index 731d4f98531..00000000000 --- a/arch/arm/configs/zeus_defconfig +++ /dev/null @@ -1,189 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_TINY_RCU=y -CONFIG_LOG_BUF_SHIFT=13 -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_PXA=y -CONFIG_MACH_ARCOM_ZEUS=y -CONFIG_PCCARD=m -CONFIG_PCMCIA_PXA2XX=m -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=31:02 rootfstype=jffs2 ro console=ttyS0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m -CONFIG_FPE_NWFPE=y -CONFIG_PM=y -CONFIG_APM_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_CFG80211=m -CONFIG_LIB80211=m -CONFIG_MAC80211=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_RAM=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PXA2XX=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_EEPROM_AT24=m -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=m -CONFIG_ATA=m -# CONFIG_SATA_PMP is not set -CONFIG_PATA_PCMCIA=m -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_DM9000=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_HERMES=m -CONFIG_PCMCIA_HERMES=m -CONFIG_RT2X00=m -CONFIG_RT73USB=m -CONFIG_NET_PCMCIA=y -CONFIG_PPP=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_FUJITSU=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_INEXIO=m -CONFIG_TOUCHSCREEN_HTCPEN=m -CONFIG_TOUCHSCREEN_PENMOUNT=m -CONFIG_TOUCHSCREEN_TOUCHRIGHT=m -CONFIG_TOUCHSCREEN_TOUCHWIN=m -CONFIG_TOUCHSCREEN_TOUCHIT213=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=7 -CONFIG_SERIAL_8250_RUNTIME_UARTS=7 -# CONFIG_LEGACY_PTYS is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_GPIO=y -CONFIG_I2C_PXA=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PCA953X=y -CONFIG_SENSORS_LM75=m -CONFIG_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_PXA=m -CONFIG_FB_PXA_PARAMETERS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=m -CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_PXA2XX_AC97=m -# CONFIG_SND_SPI is not set -# CONFIG_SND_PCMCIA is not set -CONFIG_SND_SOC=m -CONFIG_SND_PXA2XX_SOC=m -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=m -CONFIG_USB_DEVICEFS=y -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=m -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_GADGET=m -CONFIG_USB_PXA27X=y -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_G_PRINTER=m -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_PXA=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m -CONFIG_LEDS_TRIGGER_BACKLIGHT=m -CONFIG_LEDS_TRIGGER_GPIO=m -CONFIG_LEDS_TRIGGER_DEFAULT_ON=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_PXA=m -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -# CONFIG_DNOTIFY is not set -CONFIG_INOTIFY=y -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_T10DIF=m diff --git a/arch/arm/mach-mt8127/kr076/Makefile b/arch/arm/mach-mt8127/kr076/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/kr076/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/kr076/accdet/accdet_custom.h b/arch/arm/mach-mt8127/kr076/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/kr076/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/kr076/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/kr076/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/kr076/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/Makefile b/arch/arm/mach-mt8127/kr076/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/accel.c b/arch/arm/mach-mt8127/kr076/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/accel.h b/arch/arm/mach-mt8127/kr076/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/kr076/accelerometer/cust_acc.c deleted file mode 100644 index 79fce265ee4..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 4,//huichen@tcl.com change Gsensor direction - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/kr076/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/kr076/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/kr076/alsps/APDS9930.c b/arch/arm/mach-mt8127/kr076/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/kr076/alsps/APDS9930.h b/arch/arm/mach-mt8127/kr076/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/kr076/alsps/Makefile b/arch/arm/mach-mt8127/kr076/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/kr076/alsps/alsps.c b/arch/arm/mach-mt8127/kr076/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076/alsps/alsps.h b/arch/arm/mach-mt8127/kr076/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/kr076/alsps/cust_alsps.c b/arch/arm/mach-mt8127/kr076/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/kr076/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/kr076/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/kr076/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/kr076/cam_cal/Makefile b/arch/arm/mach-mt8127/kr076/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/kr076/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/kr076/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/kr076/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/kr076/camera/camera/Makefile b/arch/arm/mach-mt8127/kr076/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/kr076/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/kr076/camera/camera/dummyds.c b/arch/arm/mach-mt8127/kr076/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.c deleted file mode 100644 index 0a5189d7ef2..00000000000 --- a/arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,622 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - - u32 pinSetIdx = 0;//default main sensor - u32 pinSetIdxTmp = 0; - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - - u32 pinSet[2][8] = - { - //for main sensor - { - GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - { - GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx) - { - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) - { - pinSetIdx = 1; - } - - - //power ON - if (On) - { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx == 1) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_HI708_YUV,currSensorName))) - { - PK_DBG("[CAMERA SENSOR] kdCISModulePowerOn get in---GC2145_YUV sensorIdx:%d; pinSetIdx=%d\n",SensorIdx, pinSetIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800/*VOL_2800*/,mode_name)) //IO - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) //AVDD - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1800,mode_name)) //DVDD no use - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - - //PDN/STBY pin - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) - { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } - - //disable inactive sensor - if(pinSetIdx == 0) //disable sub - { - pinSetIdxTmp = 1; - } - else - { - pinSetIdxTmp = 0; - } -#if 1 - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdxTmp][IDX_PS_CMRST]) - { - if(mt_set_gpio_mode(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - - if(mt_set_gpio_dir(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); //high == power down lens module - } - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } -#endif - //while(1); - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2680_RAW ,currSensorName))) { - //OV5648 Power UP - //First Power Pin low and Reset Pin Low - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable IO power\n"); - goto _kdCISModulePowerOn_exit_; - } - { - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN], GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(10); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST], GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(10); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - } - - msleep(20); - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - goto _kdCISModulePowerOn_exit_; - } - - //if(TRUE != hwPowerOn(PMIC_APP_MAIN_CAMERA_POWER_D, VOL_1500,mode_name)) - // { - // PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - // goto _kdCISModulePowerOn_exit_; - // } - - - // wait power to be stable - mdelay(25); - - -; - } - else if ((pinSetIdx == 0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_S5K5E2YA_MIPI_RAW,currSensorName))) - { - PK_DBG("[CAMERA SENSOR] kdCISModulePowerOn get in---GC2145_YUV sensorIdx:%d; pinSetIdx=%d\n",SensorIdx, pinSetIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800/*VOL_2800*/,mode_name)) //IO - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) //AVDD - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1200,mode_name)) //DVDD no use - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - - //PDN/STBY pin - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) - { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } - - //disable inactive sensor - if(pinSetIdx == 0) //disable sub - { - pinSetIdxTmp = 1; - } - else - { - pinSetIdxTmp = 0; - } -#if 1 - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdxTmp][IDX_PS_CMRST]) - { - if(mt_set_gpio_mode(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - - if(mt_set_gpio_dir(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); //high == power down lens module - } - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } -#endif - //while(1); - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2355_RAW,currSensorName))) - { - PK_DBG("[CAMERA SENSOR] kdCISModulePowerOn get in---GC2145_YUV sensorIdx:%d; pinSetIdx=%d\n",SensorIdx, pinSetIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800/*VOL_2800*/,mode_name)) //IO - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) //AVDD - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1800,mode_name)) //DVDD no use - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - - //PDN/STBY pin - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) - { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } - - //disable inactive sensor - if(pinSetIdx == 0) //disable sub - { - pinSetIdxTmp = 1; - } - else - { - pinSetIdxTmp = 0; - } -#if 1 - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdxTmp][IDX_PS_CMRST]) - { - if(mt_set_gpio_mode(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - - if(mt_set_gpio_dir(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); //high == power down lens module - } - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } -#endif - //while(1); - } - else{ - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/kr076/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/kr076/common/partition_define.h b/arch/arm/mach-mt8127/kr076/common/partition_define.h deleted file mode 100644 index 8a2504f5206..00000000000 --- a/arch/arm/mach-mt8127/kr076/common/partition_define.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0xa8) - - -#define PART_NUM 25 - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info *PartInfo; - - -#endif diff --git a/arch/arm/mach-mt8127/kr076/common/partition_define_private.h b/arch/arm/mach-mt8127/kr076/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/kr076/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/kr076/common/pmt.h b/arch/arm/mach-mt8127/kr076/common/pmt.h deleted file mode 100644 index 23504536328..00000000000 --- a/arch/arm/mach-mt8127/kr076/common/pmt.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/kr076/core/Makefile b/arch/arm/mach-mt8127/kr076/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/kr076/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/kr076/core/board-custom.h b/arch/arm/mach-mt8127/kr076/core/board-custom.h deleted file mode 100644 index 93d88239e1e..00000000000 --- a/arch/arm/mach-mt8127/kr076/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/kr076/core/board.c b/arch/arm/mach-mt8127/kr076/core/board.c deleted file mode 100644 index 1ad05f7eec7..00000000000 --- a/arch/arm/mach-mt8127/kr076/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mt6575_nand_host_hw mt6575_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/kr076/core/logger_custom.h b/arch/arm/mach-mt8127/kr076/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/kr076/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/kr076/dct/dct/Makefile b/arch/arm/mach-mt8127/kr076/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/kr076/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/kr076/dct/dct/codegen.dws b/arch/arm/mach-mt8127/kr076/dct/dct/codegen.dws deleted file mode 100644 index d4bebc55cbe64e7f0b763f13e3f81c2c059e3fd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23252 zcmeHP$#SGd5N+>!g!knWe3N=2>^TksBoS($4YbB{;^MFI#h+~FD|l2=DumPxh`_OX7jadpU9Rs&(F8NZ~hS#W;94_|9Tqy+Kj$#2E(_Lprvt< zSJ&dxO({+s#=(yG??hhhv$EaiS=^>s(X{)lFm89JM)@*{dsGejy7@?9b*yG7+)pL3 z59=W|)QmV^y=&nj7dPg2YlYp^q$F%?zIuttafo$s83Uh=Lm$o9JUcxOaV{>$x^b|h z{V1DRdC?(hlc;I)vd)fOd`O}TKmy%7^$&!*V_h6GR=_C#FWj{jU%>4SZQvpBpf7h} zJ%sfT)&p;R_71w%dBOWDB=5nv*J@q&VMkv#Tcy?3suy{6&8)+%*B8UsA4D+^L1lB* z%A3jU#i5>h1_BN?;%f;!ok#2Np$(7vH~XZ$iOb#DDVf|1?0Ykv`!c;Rp&Ui|*g5?y z7z2MtZ!-+b31{Nuh7t~yGXb+NFs^+N_>;+)-6#l@sB&tY<+oWcX~ z$em9TU;8i)cG!lCa}>u(+T43((HK76mkT!L8Wv;R>{m@>3UPLvG>btWjT7m5_JEk- zH1^Vg973RA0~UuYiAzk#rE!Tz$y}TqCGC*L=Gno7jaaTUL;4u4i^;TMfn?kGyseYS zciUl-1rx=yiBO(9o37?=#w?09N;6B(j`1!g`lGSZF~e!>r3cc)&EXP@aSrTJM-~`s z;%e-N*2|iv_ywl+JrtL`>9N#_!5G#}JEXCBb{vBk;!zIc`tbqRo^#+vHxIR=^8&Ht zl@c~`s*eNgY;(B8(h_5j!CmWd?5W}MSU_rCweI7WHt?_SC}*$hjv|SUyQ5%ctR7P9 zm<^h-d3HKpGeliuX}v=|9(SmTwGptF--|SFAcsiaJ`UBNiT6dB<+C)FttAlYr|h#B z;iPINQfV0IIt6td<4g6E1ejUrmt^n6G!k@X&{D_vvfX_puWIj`90qgqC4&u(NhmvO zxBp6nnc6PSTgl_DxV0`L$nMrdlDf*Q-;JaH8&SH$B5xQI93hstQ7AdlBaB0#Pc_E467k07?ABV90k@+&@DO;=XI@wjVLj;ez#nwrvW$(l zJ1xy6yZ2L$Kix9OIo^ zmy1g*H*O9WevHw0T8H25!^URv`gRiVHsNXxpkw}&(0vpbTkmtnPxXQICgHN4rRxp2 z9ixE3eLwJ}hk`E^N>r%7e!6>2D+MDesBo z$j9%mLe{C+KHPvw)*ml@e8M(|`j*>0`XYVhA?<@ULHX0_gvH9QReEgL>l7cqLHhNGQTf3(GA=hHtm>4%sS z)Sw9@nk5_~umOx_1prlHPec;{@;_G%F73t0t1V0a3U)En@(!&<17P<50w`bdD z=HEgLN0|8+Npcbhr|f_{&TKf9ode=A6BlwmngEcCMkBpyi()HWsGrFeUsrA2M2&H+ zMS;duR}p8b%kpR@WOr-w7_ehYbg#V|oZupw#97hGpN^$*vw0zXE_N(*{4VLCzL*X; ziYE7d@VR6eei3uXk2=)JCcRNRD)R_IIsqhhDG8i-o=d|zc~{p7URKO~KI{S!xK=)i zb?}Q6+F!FEbPML#P!l-m8JJiQ;llScPW2~oJ$h|L;*&rwf1!wf61q9-dfUE-k8on`}Q`cQsi%-;o*vk1g8j24Ku;c7>T!@3qoTUz=nL{_s=jPB|dfC`X z00V$=S~T+0mEp8w4OMn^t-_fjE{n^o%Exsx!$lO|SR~Anp7F(nU^36KLlJYQppKNm V{K)!Q$e09kxQlq7AEefC`wz@8^lShC diff --git a/arch/arm/mach-mt8127/kr076/eeprom/Makefile b/arch/arm/mach-mt8127/kr076/eeprom/Makefile deleted file mode 100755 index 6ec6676af91..00000000000 --- a/arch/arm/mach-mt8127/kr076/eeprom/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_eeprom.o - diff --git a/arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.c b/arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.c deleted file mode 100644 index faafd31f13b..00000000000 --- a/arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Driver for EEPROM - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/kr076/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/kr076/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/kr076/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/Makefile b/arch/arm/mach-mt8127/kr076/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/kr076/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/kr076/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/kr076/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/kr076/hdmi/Makefile b/arch/arm/mach-mt8127/kr076/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/kr076/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/kr076/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/kr076/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/kr076/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/kr076/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/kr076/headset/Makefile b/arch/arm/mach-mt8127/kr076/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/kr076/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/kr076/headset/accdet_custom.c b/arch/arm/mach-mt8127/kr076/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/kr076/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076/headset/accdet_custom.h b/arch/arm/mach-mt8127/kr076/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/kr076/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/kr076/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/kr076/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/kr076/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076/keypad/Makefile b/arch/arm/mach-mt8127/kr076/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/kr076/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/kr076/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/kr076/keypad/mtk_kpd.h deleted file mode 100644 index 135fdc79c34..00000000000 --- a/arch/arm/mach-mt8127/kr076/keypad/mtk_kpd.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -/*[BUG-FIX]-MOD-BEGIN BY TCTSZ huichen@tcl.com pr971671 long press powerkey */ -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ -/*[BUG-FIX]-MOD-END BY TCTSZ huichen@tcl.com pr971671 long press powerkey */ - -#endif diff --git a/arch/arm/mach-mt8127/kr076/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/kr076/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/kr076/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/kr076/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/kr076/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/kr076/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/kr076/lcm/Makefile b/arch/arm/mach-mt8127/kr076/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/kr076/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/kr076/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/kr076/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/kr076/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/kr076/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/kr076/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/kr076/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/kr076/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/kr076/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/kr076/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/kr076/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/kr076/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/kr076/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/kr076/leds/Makefile b/arch/arm/mach-mt8127/kr076/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/kr076/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/kr076/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/kr076/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/kr076/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/kr076/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/kr076/lens/Makefile b/arch/arm/mach-mt8127/kr076/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/kr076/lens/dummy_lens.c b/arch/arm/mach-mt8127/kr076/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/AD5823.h b/arch/arm/mach-mt8127/kr076/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/kr076/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/kr076/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/Makefile b/arch/arm/mach-mt8127/kr076/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/akm09911.c b/arch/arm/mach-mt8127/kr076/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/akm09911.h b/arch/arm/mach-mt8127/kr076/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/kr076/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/kr076/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/mag.c b/arch/arm/mach-mt8127/kr076/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076/magnetometer/mag.h b/arch/arm/mach-mt8127/kr076/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/kr076/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/kr076/power/cust_battery_meter.h b/arch/arm/mach-mt8127/kr076/power/cust_battery_meter.h deleted file mode 100644 index 453962ef884..00000000000 --- a/arch/arm/mach-mt8127/kr076/power/cust_battery_meter.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 2834 -#define Q_MAX_POS_25 2834 -#define Q_MAX_POS_0 2834 -#define Q_MAX_NEG_10 2834 - -#define Q_MAX_POS_50_H_CURRENT 2771 -#define Q_MAX_POS_25_H_CURRENT 2771 -#define Q_MAX_POS_0_H_CURRENT 2771 -#define Q_MAX_NEG_10_H_CURRENT 2771 - -/*[BUGFIX]-Add-BEGIN by TCTSZ.pingao.yang, 4/15/2015, pr-975290, change fg integration way */ -/* Discharge Percentage */ -#define OAM_D5 0 // 1 : D5, 0: D2 -/*[BUGFIX]-Add-end by TCTSZ.pingao.yang, 4/15/2015*/ - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 40 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 90 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 30 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 1800 //30 * 60 = 30 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -/*[BUGFIX]-Add-BEGIN by TCTSZ.pingao.yang, 4/15/2015, */ -#define MAX_SUSPEND_CURRENT 420 // 42 mA -#define MIN_SUSPEND_CURRENT 30 // 3 mA -#define DEFAUL_SUSPEND_CURRENT 120 //12mA -#define SUSPEND_CURRENT_SETP 30 //3mA -#define SLEEP_AFTER_FG_DIFF 3 // diff about 3% -#define UI_REDUCE_CURRENT 180 //18mA -#define SLEEP_REDUCE_CURRENT 60 //6mA -/*[BUGFIX]-Add-END by TCTSZ.pingao.yang */ - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/kr076/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/kr076/power/cust_battery_meter_table.h deleted file mode 100644 index e4e80ee0c05..00000000000 --- a/arch/arm/mach-mt8127/kr076/power/cust_battery_meter_table.h +++ /dev/null @@ -1,947 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} - -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} - -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} - -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/kr076/power/cust_charging.h b/arch/arm/mach-mt8127/kr076/power/cust_charging.h deleted file mode 100644 index 1b4b1f01eb0..00000000000 --- a/arch/arm/mach-mt8127/kr076/power/cust_charging.h +++ /dev/null @@ -1,129 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 55 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 50 //47 Fixed to 50 degree for according to standard -#define MIN_CHARGE_TEMPERATURE 2 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 4 //6 Fixed to 2 degree accoding to TCL standard -#define MAX_LIMIT_CHARGE_TEMPERATURE 45 -#define MIN_LIMIT_CHARGE_TEMPERATURE 43 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 230 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_1000_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_1000_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -/* [PLATFORM]-Add-BEGIN by TCTSZ.leo.guo, 04/15/2015, modify ntc temperature function */ -#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -/* [PLATFORM]-Add-END by TCTSZ.leo.guo */ -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 -/* [PLATFORM]-Add-BEGIN by TCTSZ.leo.guo, 04/15/2015, modify ntc temperature function */ -#define MTK_BATTERY_PROTECT_FEATURE -/* [PLATFORM]-Add-END by TCTSZ.leo.guo */ -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/kr076/power/cust_diso.h b/arch/arm/mach-mt8127/kr076/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/kr076/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/kr076/power/cust_pe.h b/arch/arm/mach-mt8127/kr076/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/kr076/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/kr076/power/cust_pmic.h b/arch/arm/mach-mt8127/kr076/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/kr076/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/kr076/rtc/rtc-mt.h b/arch/arm/mach-mt8127/kr076/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/kr076/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/kr076/sound/Makefile b/arch/arm/mach-mt8127/kr076/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/kr076/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/kr076/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/kr076/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/kr076/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/kr076/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/kr076/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/kr076/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/kr076/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/kr076/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/kr076/ssw/Makefile b/arch/arm/mach-mt8127/kr076/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/kr076/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/kr076/ssw/inc/ssw.h b/arch/arm/mach-mt8127/kr076/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/kr076/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/kr076/ssw/sim_switch.c b/arch/arm/mach-mt8127/kr076/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/kr076/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/Makefile b/arch/arm/mach-mt8127/kr076/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/kr076/touchpanel/goodix_tool.c deleted file mode 100644 index d38808f13e7..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/goodix_tool.c +++ /dev/null @@ -1,620 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * V2.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - * V2.2:2014/01/14, compatible with Linux 3.10 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - * V2.2.7 - * Special edition for GT910 flashless - * 1. modified to support gesture wakeup module - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include - -#include "tpd_custom_gt9xx.h" -extern int gtp_autotool_setting; - -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag£¬0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif - -static struct proc_dir_entry *goodix_proc_entry; - -static ssize_t goodix_tool_read(struct file *, char __user *, size_t, loff_t *); -static ssize_t goodix_tool_write(struct file *, const char __user *, size_t, loff_t *); -static const struct file_operations tool_ops = { - .owner = THIS_MODULE, - .read = goodix_tool_read, - .write = goodix_tool_write, -}; - -//static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -//static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data ); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; -static void tool_set_proc_name(char * procname) -{ - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode"); - //sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); - //memset(procname, 0, 20); - //sprintf(procname, "goodix_tool"); - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); - //goodix_proc_entry = create_proc_entry(procname, 0666, NULL); - goodix_proc_entry = proc_create(procname, 0666, NULL, &tool_ops); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - //goodix_proc_entry->write_proc = goodix_tool_write; - //goodix_proc_entry->read_proc = goodix_tool_read; - } - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -//static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -ssize_t goodix_tool_write(struct file *filp, const char __user *buff, size_t len, loff_t *off) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - - GTP_DEBUG("[Operation]wr: %02X", cmd_head.wr); - GTP_DEBUG("[Flag]flag: %02X, addr: %02X%02X, value: %02X, relation: %02X", cmd_head.flag, cmd_head.flag_addr[0], - cmd_head.flag_addr[1], cmd_head.flag_val, cmd_head.flag_relation); - GTP_DEBUG("[Retry]circle: %d, times: %d, retry: %d, delay: %d", (s32)cmd_head.circle, (s32)cmd_head.times, - (s32)cmd_head.retry, (s32)cmd_head.delay); - GTP_DEBUG("[Data]data len: %d, addr len: %d, addr: %02X%02X, buffer len: %d, data[0]: %02X", (s32)cmd_head.data_len, - (s32)cmd_head.addr_len, cmd_head.addr[0], cmd_head.addr[1], (s32)len, buff[CMD_HEAD_LENGTH]); - - if (1 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return -EPERM; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return -EPERM; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - } - else if (3 == cmd_head.wr) //Write ic type - { - gtp_autotool_setting = 1; - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - return -EPERM; - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - } -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return -EPERM; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - memcpy(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return -EPERM; - } - } - -#endif - - return len; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -//static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data ) -ssize_t goodix_tool_read(struct file *file, char __user *page, size_t size, loff_t *ppos) -{ - s32 ret = 0; - - GTP_DEBUG_FUNC(); - - if (*ppos) // ADB call again - { - //GTP_DEBUG("[HEAD]wr: %d", cmd_head.wr); - //GTP_DEBUG("[PARAM]size: %d, *ppos: %d", size, (int)*ppos); - //GTP_DEBUG("[TOOL_READ]ADB call again, return it."); - return 0; - } - - if (cmd_head.wr % 2) - { - return -EPERM; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return -EPERM; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= len; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return -EPERM; - } - - //memcpy(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - ret = simple_read_from_buffer(&page[loc], size, ppos, &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret < 0) - { - return ret; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - return cmd_head.data_len; - } - else if (2 == cmd_head.wr) - { - ret = simple_read_from_buffer(page, size, ppos, IC_TYPE, sizeof(IC_TYPE)); - return ret; - } - else if (4 == cmd_head.wr) - { - u8 progress_buf[4]; - progress_buf[0] = show_len >> 8; - progress_buf[1] = show_len & 0xff; - progress_buf[2] = total_len >> 8; - progress_buf[3] = total_len & 0xff; - - ret = simple_read_from_buffer(page, size, ppos, progress_buf, 4); - return ret; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - ret = simple_read_from_buffer(page, size, ppos, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - return ret; - } - - return -EPERM; -} diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_driver.c deleted file mode 100644 index f345e4482d0..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,4127 +0,0 @@ -/* Copyright Statement: - * - * This software/firmware and related documentation ("MediaTek Software") are - * protected under relevant copyright laws. The information contained herein - * is confidential and proprietary to MediaTek Inc. and/or its licensors. - * Without the prior written permission of MediaTek inc. and/or its licensors, - * any reproduction, modification, use or disclosure of MediaTek Software, - * and information contained herein, in whole or in part, shall be strictly prohibited. - * - * MediaTek Inc. (C) 2012. All rights reserved. - * - * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES - * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") - * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON - * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE - * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR - * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH - * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES - * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES - * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK - * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR - * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND - * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, - * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, - * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO - * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. - * - * The following software/firmware and/or related documentation ("MediaTek Software") - * have been modified by MediaTek Inc. All revisions are subject to any receiver's - * applicable license agreements with MediaTek Inc. - */ - -/* - * Version: V2.0 - * Release Date: 2013/08/28 - * Contact: andrew@goodix.com, meta@goodix.com - * Revision Record: - * V1.4: - * 1. New Heartbeat/ESD-protect Mechanism(external watchdog) - * 2. doze mode, sliding wakeup - * 3. config length verification & 3 more config groups(GT9 Sensor_ID: 0 ~ 5) - * 4. charger status switch - * By Meta, 2013/03/11 - * V1.6: - * 1. pen/stylus support - * 2. slide wakeup, new esd optimization - * By Meta, 2013/04/18 - * V1.8: - * 1. read double check & fixed config support - * 2. other optimizations - * By Meta, 2013/06/08 - * V2.0: - * 1. compatible with GT9XXF - * 2. I2C DMA support - * By Meta, 2013/08/28 - * V2.2: - * 1. update gt9xx_config to compatible with Linux 3.10 - * 2. gesture wakeup - * 3. pen separate input device, active-pen button support - * 4. coordinates & keys optimization - * 5. no longer support GT915S - * By Meta, 2014/01/14 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - * V2.2.7 - * Special edition for GT910 flashless - * 1. modified to support gesture wakeup module - */ - -#include "tpd.h" -#include "tpd_custom_gt9xx.h" -#include - -#ifndef TPD_NO_GPIO -#include "cust_gpio_usage.h" -#endif -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif - -extern int gesture_value; -extern char tpd_firmware_version_val[5]; -extern int tpd_config_version; -extern int tpd_x_line; -extern int tpd_y_line; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -extern u8 tpd_sensor_id; -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - -int gtp_autotool_setting; -EXPORT_SYMBOL(gtp_autotool_setting); -extern struct tpd_device *tpd; - -static int tpd_sleep_flag = 0; -static int tpd_flag = 0; -int tpd_halt = 0; -static struct task_struct *thread = NULL; -static DECLARE_WAIT_QUEUE_HEAD(waiter); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); - -#if GTP_CHARGER_SWITCH - #ifdef MT6573 - #define CHR_CON0 (0xF7000000+0x2FA00) - #else - extern kal_bool upmu_is_chr_det(void); - #endif - static void gtp_charger_switch(s32 dir_update); -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = GTP_KEY_TAB; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -static s32 force_reset_guitar(s32); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -u8 esd_running = 0; -spinlock_t esd_lock; -extern unsigned char gtp_default_FW_fl[]; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; - -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; - -#if GTP_WITH_PEN -struct input_dev *pen_dev; -#endif - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -/*change counter data type to u16, because GTP_CHK_FS_MNT_MAX is 300 */ -u16 gtp_ref_retries = 0; -u16 gtp_clk_retries = 0; -static u16 is_data_mounted = 0; -/*[PLATFORM]-Add-NED by falin.luo@tcl.com 2015/4/29*/ -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 rqst_processing = 0; -u8 is_950 = 0; -u8 after_912_1020 = 0; - - -//add by caoyang for ·À¶¶ -//static struct timer_list buttons_timer; -//static DECLARE_WAIT_QUEUE_HEAD(button_waitq); -//end - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern int gup_reload_fw_dsp(void *dir, u8 dwn_mode); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); - -#if GTP_COMPATIBLE_MODE -u8 gtp_hopping_buf[16] = {0}; -#endif - -#if GTP_FL_LITTLE_SYSTEM -u8 power_is_down = 0; -u8 little_fw_mode = 0; -u8 fw_block = 0; // 0: not started, 1 ~ 11/12 ss51 seg a/b each 2K, 13: ss51 seg b, 10K/12K -u8 block_section = 1; // 1 ~ 8, 2K total, 256 Bytes each - -char symbolic_state1[][20] = {"OTHERS", "BUFFER_FULL", "CHECK_COMPLETE", "CHECK_ERROR", "WAIT_CHECK", "OTHERS", "OTHERS", "OTHERS"}; -char symbolic_state2[][20] = {"OTHERS", "IS_A_SEG", "IS_B_SEG_FIRST", "IS_B_SEG_OTHER", "IS_B_SEG_LAST", "OTHERS", "OTHERS", "OTHERS"}; - -static void tpd_up(s32 x, s32 y, s32 id); -extern u8 gup_burn_ss51_block(struct i2c_client *client, s32 block_section, s32 fw_block, u16 *fw_chksum); -extern u8 gup_burn_ss51_seg_b(struct i2c_client *client, s32 size, u16 *fw_chksum); -#endif - -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static ssize_t gt91xx_config_read_proc(struct file *, char __user *, size_t, loff_t *); -static ssize_t gt91xx_config_write_proc(struct file *, const char __user *, size_t, loff_t *); - -static struct proc_dir_entry *gt91xx_config_proc = NULL; -static const struct file_operations config_proc_ops = { - .owner = THIS_MODULE, - .read = gt91xx_config_read_proc, - .write = gt91xx_config_write_proc, -}; - -#define VELOCITY_CUSTOM -#ifdef VELOCITY_CUSTOM -#include -#include -#include - -#ifndef TPD_VELOCITY_CUSTOM_X -#define TPD_VELOCITY_CUSTOM_X 10 -#endif -#ifndef TPD_VELOCITY_CUSTOM_Y -#define TPD_VELOCITY_CUSTOM_Y 10 -#endif - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -int g_v_magnify_x = TPD_VELOCITY_CUSTOM_X; -int g_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &g_v_magnify_x, sizeof(g_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &g_v_magnify_y, sizeof(g_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "gt9xx_touch", - .fops = &tpd_fops, -}; - -//********************************************** -#endif - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - - -static ssize_t gt91xx_config_read_proc(struct file *file, char __user *page, size_t size, loff_t *ppos) -{ - char *ptr = page; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i; - - if (*ppos) // CMD call again - { - return 0; - } - - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - *ppos += ptr - page; - return (ptr - page); -} - -static ssize_t gt91xx_config_write_proc(struct file *filp, const char __user *buffer, size_t count, loff_t *off) -{ - s32 ret = 0; - - GTP_DEBUG("write count %d\n", count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%d]\n", GTP_CONFIG_MAX_LENGTH, count); - return -EFAULT; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d\n", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - //if (retry == 20) - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - return ret; - } - //#endif - } - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - if (little_fw_mode) - { - // do nothing - GTP_INFO("Little fw enabled, no esd reset."); - } - else - #endif - { - gtp_recovery_reset(client); - } - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d\n", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - //if (retry == 20) - if (retry == 5) - { - //dump_stack(); - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - return ret; - } - //#endif - } - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - if (little_fw_mode) - { - // do nothing - GTP_INFO("Little fw enabled, no esd reset."); - } - else - #endif - { - gtp_recovery_reset(client); - } - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_INFO("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - sprintf(tpd_firmware_version_val,"%02x%02x",buf[7], buf[6]); - tpd_firmware_version_val[4] = '\0'; - printk(KERN_ERR"caoyang test tpd_firmware_version_val:%s",tpd_firmware_version_val); - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - tpd_config_version= send_cfg_buf[sensor_id][0]; - /*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ - /*MMI test app read sensor id to distinguish the tp manufacturer*/ - tpd_sensor_id = sensor_id; - /*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - gtp_get_info(client); - return 0; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (is_950) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - if ((cfg_len == 186) && after_912_1020) - { - GTP_DEBUG("Firmware after 912_1020, set config length to 228."); - - cfg_len = 228; - - config[GTP_ADDR_LENGTH + 226] = config[GTP_ADDR_LENGTH + 184]; - - memset(&config[GTP_ADDR_LENGTH + 184], 0x00, 228 - 186); - - config[GTP_ADDR_LENGTH + 227] = 0x01; - - } - tpd_x_line = driver_num; - tpd_y_line = sensor_num; - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(50); -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - -#ifdef MT6573 - // power on CTP - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ONE); - -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - -#endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = gup_fw_download_proc(NULL, GTP_FL_FW_BURN); - - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return -1; - } - } - - ret = gtp_fw_startup(client); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Startup fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return -1; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - } - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (/*gup_check_fs_mounted("/data") == FAIL*/!is_data_mounted)/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - msleep(100);/*[PLATFORM]-ADD by falin.luo@tcl.com 2015/4/29*/ - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (is_950) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("Failed to allocate memory for reference buffer!"); - return FAIL; - } - memset(refp, 0, ref_len); - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0666); - if (IS_ERR(flp)) - { - GTP_ERROR("Failed to open/create %s.", GTP_BAK_REF_PATH); - if (GTP_BAK_REF_SEND == mode) - { - goto default_bak_ref; - } - else - { - goto exit_ref_proc; - } - } - - switch (mode) - { - case GTP_BAK_REF_SEND: - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("Read ref file failed, send default bak ref."); - goto default_bak_ref; - } - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; if_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - break; - - default: - GTP_ERROR("Invalid Argument(%d) for backup reference", mode); - ret = FAIL; - goto exit_ref_proc; - } - - ret = SUCCESS; - goto exit_ref_proc; - -default_bak_ref: - for (j = 0; j < ref_grps; ++j) - { - memset(&refp[j * ref_seg_len], 0, ref_seg_len); - refp[j * ref_seg_len + ref_seg_len - 1] = 0x01; // checksum = 1 - } - ret = i2c_write_bytes(client, GTP_REG_BAK_REF, refp, ref_len); - if (flp && !IS_ERR(flp)) - { - GTP_INFO("Write backup-reference data into %s", GTP_BAK_REF_PATH); - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char*)refp, ref_len, &flp->f_pos); - } - if (ret < 0) - { - GTP_ERROR("Failed to load the default backup reference"); - ret = FAIL; - } - else - { - ret = SUCCESS; - } -exit_ref_proc: - if (refp) - { - kfree(refp); - } - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -u8 gtp_fw_startup(struct i2c_client *client) -{ - u8 wr_buf[4]; - s32 ret = 0; - - //init sw WDT - wr_buf[0] = 0xAA; - ret = i2c_write_bytes(client, 0x8041, wr_buf, 1); - if (ret < 0) - { - GTP_ERROR("I2C error to firmware startup."); - return FAIL; - } - //release SS51 & DSP - wr_buf[0] = 0x00; - i2c_write_bytes(client, 0x4180, wr_buf, 1); - - //int sync - gtp_int_sync(25); - - //check fw run status - i2c_read_bytes(client, 0x8041, wr_buf, 1); - if(0xAA == wr_buf[0]) - { - GTP_ERROR("IC works abnormally,startup failed."); - return FAIL; - } - else - { - GTP_DEBUG("IC works normally,Startup success."); - wr_buf[0] = 0xAA; - i2c_write_bytes(client, 0x8041, wr_buf, 1); - return SUCCESS; - } -} - - -static void gtp_recovery_reset(struct i2c_client *client) -{ -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - force_reset_guitar(0); -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif -} - -static u8 gtp_check_clk_legality(u8 *p_clk_buf) -{ - u8 i = 0; - u8 clk_chksum = p_clk_buf[5]; - - for(i = 0; i < 5; i++) - { - if((p_clk_buf[i] < 50) || (p_clk_buf[i] > 120) || - (p_clk_buf[i] != p_clk_buf[0])) - { - break; - } - clk_chksum += p_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_DEBUG("Valid main clock data."); - return SUCCESS; - } - GTP_ERROR("Invalid main clock data."); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - u8 gtp_clk_buf[6] = {0}; - struct file *flp = NULL; - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_clk_retries);/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - if (/*gup_check_fs_mounted("/data") == FAIL*/!is_data_mounted)/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - msleep(100);/*[PLATFORM]-ADD by falin.luo@tcl.com 2015/4/29*/ - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0666); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(gtp_clk_buf); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(0); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("Invalid main clock: %d", clk_cal_result); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - - if (flp && !IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -u8 gtp_verify_hopping_buf(struct i2c_client *client) -{ - u16 checksum = 0; - s32 i = 0; - - for (i = 0; i < 6; i += 2) - { - checksum += (gtp_hopping_buf[i] << 8) + gtp_hopping_buf[i+1]; - } - if ((checksum + ((u16)(gtp_hopping_buf[6] << 8) + (u16)gtp_hopping_buf[7])) & 0xFFFF) - { - GTP_ERROR("Wrong checksum for hopping buffer, get hopping data from config instead!"); - goto get_config_hopping; - } - - for (i = 0; i < 8; i++) - { - if (gtp_hopping_buf[i] != gtp_hopping_buf[i+8]) - { - GTP_ERROR("Hopping buffer is not identical, get data from config instead!"); - goto get_config_hopping; - } - } - GTP_DEBUG("Hopping buffer is okay"); - return SUCCESS; - -get_config_hopping: - memcpy(gtp_hopping_buf, &config[2 + 0x8065 - GTP_REG_CONFIG_DATA], 4); - gtp_hopping_buf[4] = 0xAA; - gtp_hopping_buf[5] = 0x55; - - checksum = 0; - for (i = 0; i < 6; i += 2) - { - checksum += (gtp_hopping_buf[i] << 8) + gtp_hopping_buf[i+1]; - } - checksum = 0 - checksum; - gtp_hopping_buf[6] = (u8)(checksum >> 8); - gtp_hopping_buf[7] = (u8)(checksum & 0xFF); - - for (i = 0; i < 8; i++) - { - gtp_hopping_buf[i+8] = gtp_hopping_buf[i]; - } - return SUCCESS; -} - -u8 gtp_hopping_proc(struct i2c_client *client, s32 mode) -{ - s32 ret = 0; - - GTP_DEBUG("Store hopping data, wait for /data mounted."); - /*[PLATFORM]-MOD-BEGIN by falin.luo@tcl.com 2015/4/29*/ -// ret = gup_check_fs_mounted("/data"); - ret = is_data_mounted ? SUCCESS : FAIL; - /*[PLATFORM]-MOD-END by falin.luo@tcl.com 2015/4/29*/ - - if (FAIL == ret) - { - GTP_DEBUG("/data not mounted."); - return FAIL; - } - GTP_DEBUG("/data Mounted!"); - - if (GTP_HOPPING_SEND == mode) - { - gtp_verify_hopping_buf(client); - - ret = i2c_write_bytes(client, 0x8030, gtp_hopping_buf, 16); - if (ret < 0) - { - return FAIL; - } - else - { - return SUCCESS; - } - } - else - { - ret = i2c_read_bytes(client, 0x8030, gtp_hopping_buf, 16); - - if (ret < 0) - { - GTP_ERROR("Failed to read hopping data from hopping buffer, get from config instead."); - return FAIL; - } - return gtp_verify_hopping_buf(client); - } -} - -#if GTP_FL_LITTLE_SYSTEM -s32 gtp_resume_timeout(void *none) -{ - s32 timeout = 0; - GTP_DEBUG("Resume timeout thread kicks off."); - - while (timeout++ < (10 * 10)) - { - msleep(100); - if (!little_fw_mode) - { - GTP_DEBUG("Resume timeout thread terminated while counting."); - return 0; - } - } - - if (little_fw_mode) - { - GTP_INFO("Download big ss51 firmware timeout, process esd reset."); - little_fw_mode = 0; - gtp_recovery_reset(i2c_client_point); - } - - return 0; -} - -u8 gtp_get_state1(struct i2c_client *client) -{ - u8 state1 = 0; - s32 ret = 0; - - ret = i2c_read_bytes(client, GTP_REG_STATE1, &state1, 1); - - if (ret < 0) - { - GTP_ERROR("Failed to get state1!"); - return 0xFF; - } - return state1; -} - -u8 gtp_get_state2(struct i2c_client *client) -{ - u8 state2 = 0; - s32 ret = 0; - - ret = i2c_read_bytes(client, GTP_REG_STATE2, &state2, 1); - - if (ret < 0) - { - GTP_ERROR("Failed to get state2!"); - return 0xFF; - } - return state2; -} - -// size: k in unit -u8 gtp_send_check_info(struct i2c_client *client, u16 fw_chksum) -{ - s32 ret = 0; - u8 checksum = 0; - u8 bank = 0; - u8 state1 = 0x00; - u8 state2 = 0x00; - u16 start_addr = 0x0000; - u8 checkinfo_buf[10] = {0}; - - - switch (fw_block) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - bank = 0x01; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = (0xC000 + (fw_block - 1) * 1024 * 2); - break; - - case 9: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = 0xF800; - break; - - case 10: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = 0xF000; - break; - - case 11: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_B_SEG_FIRST; - start_addr = 0xE800; - break; - - case 12: - bank = 0x00; - state1 = WAIT_CHECK; - state2 = IS_B_SEG_LAST; - start_addr = 0xC000; - break; - - default: - GTP_ERROR("Invalid firmware block(%d) for checkinfo.", fw_block); - return FAIL; - } - - checkinfo_buf[3] = bank; - checkinfo_buf[4] = (u8)(start_addr >> 8); - checkinfo_buf[5] = (u8)(start_addr & 0xFF); - checkinfo_buf[7] = state2; - checkinfo_buf[8] = state1; - - GTP_DEBUG("fw_block: %d, fw_chksum: 0x%04X", fw_block, fw_chksum); - if (fw_block == 12) - { - checkinfo_buf[6] = 80; - } - else - { - checkinfo_buf[6] = 16; - } - - checkinfo_buf[0] = (u8)(fw_chksum >> 8); - checkinfo_buf[1] = (u8)(fw_chksum & 0xFF); - - checksum = 0; - for (ret = 0; ret < 6; ret++) - { - checksum += checkinfo_buf[3 + ret]; - } - checkinfo_buf[2] = 1 - checksum; - - ret = i2c_write_bytes(client, GTP_REG_CHECKINFO, checkinfo_buf, 9); - if (ret < 0) - { - GTP_ERROR("Failed to send checkinfo!"); - return FAIL; - } - else - { - GTP_DEBUG("Send checkinfo successfully!"); - } - return SUCCESS; -} - - - -u8 gtp_resume_fw_startup(struct i2c_client *client) -{ - u8 buf; - u32 retry = 0; - s32 ret = 0; - - GTP_INFO("Big ss51 firmware startup."); - - while (retry++ < 10) - { - buf = 0x0C; - ret = i2c_write_bytes(client, 0x4180, &buf, 1); // hold ss51 & dsp - if (ret < 0) - { - GTP_ERROR("Failed to hold ss51 & dsp."); - return FAIL; - } - - buf = 0x00; - ret = i2c_read_bytes(client, 0x4180, &buf, 1); - if (ret < 0) - { - GTP_ERROR("Failed to get hold ss51 & dsp status."); - return FAIL; - } - - if (buf == 0x0C) - { - GTP_DEBUG("SS51 & Dsp confirm hold!"); - break; - } - } - - if (retry >= 10) - { - GTP_ERROR("Hold ss51 & dsp retry exhausted."); - return FAIL; - } - - buf = 0x03; - i2c_write_bytes(client, 0x4048, &buf, 1); // select bank3 - - buf = 0x00; - i2c_write_bytes(client, 0x4049, &buf, 1); - - return gtp_fw_startup(client); -} - -u8 gtp_download_seg_b(struct i2c_client *client) -{ - s32 ret = 0; - u16 fw_chksum = 0; - u8 state1 = 0; - - if (block_section != 10) - { - state1 = 0x00; - i2c_write_bytes(client, 0x4048, &state1, 1); // select bank0 - - ret = gup_burn_ss51_seg_b(client, 10, &fw_chksum); - - if (FAIL == ret) - { - GTP_ERROR("Failed to burn ss51 seg B, process reburn."); - return FAIL; - } - - ret = gtp_send_check_info(i2c_client_point, fw_chksum); - if (FAIL == ret) - { - GTP_ERROR("Send checkinfo failed, process resend."); - return FAIL; - } - } - msleep(1); - - state1 = gtp_get_state1(client); - - if (CHECK_COMPLETE == state1) - { - GTP_INFO("Burn ss51 Block12 successfully"); - } - else if (CHECK_ERROR == state1) - { - GTP_DEBUG("Big SS51 Seg B check error, process reburn!"); - return FAIL; - } - else - { - GTP_ERROR("Big SS51 Seg B check imcomplete(state1:%s), process recheck.", symbolic_state1[state1&0x07]); - block_section = 10; - return FAIL; - } - ret = gtp_resume_fw_startup(client); - - little_fw_mode = 0; - if (FAIL == ret) - { - GTP_ERROR("Big ss51 firmware startup failed, process esd reset."); - if (!tpd_halt) - { - gtp_recovery_reset(i2c_client_point); - } - } - else - { - GTP_INFO("Switch to big ss51 firmware successfully!"); - } -#if GTP_ESD_PROTECT - if (!tpd_halt) - { - gtp_esd_switch(client, SWITCH_ON); - } -#endif - return SUCCESS; -} - - -u8 gtp_download_big_ss51(struct i2c_client *client) -{ - u8 state1, state2; - s32 ret = 0; - s32 i = 0; - static u16 fw_chksum = 0x0000; - - //GTP_DEBUG("Block: %d, Block Section: %d", fw_block, block_section); - if (!little_fw_mode) - { - GTP_ERROR("Download big ss51 timeout!"); - return FAIL; - } - - if (block_section == 10) // one firmware block burned - { - if (fw_block == 11) - { - mdelay(3); - } - - state1 = gtp_get_state1(i2c_client_point); - state2 = gtp_get_state2(i2c_client_point); - - GTP_DEBUG("state1: %02X (%s), state2: %02X (%s)", state1, symbolic_state1[state1&0x07], state2, symbolic_state2[state2&0x07]); - - if (CHECK_COMPLETE == state1) - { - block_section = 1; - GTP_DEBUG("Burn ss51 Block%d successfully!", fw_block); - if (fw_block == 11) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); - #endif - tpd_up(0, 0, 0); // release all - input_sync(tpd->dev); - GTP_DEBUG("Release touch manually."); - fw_block = 12; - for (i = 0; i < 5; i++) - { - if (!little_fw_mode || (fw_block != 12)) - { - GTP_ERROR("Download big ss51 timeout!"); - return FAIL; - } - ret = gtp_download_seg_b(client); - - if (SUCCESS == ret) - { - break; - } - } - return SUCCESS; - } - } - else if (CHECK_ERROR == state1) - { - GTP_ERROR("Block%d check error, process reburn.", fw_block); - block_section = 1; - fw_block--; - } - else - { - GTP_DEBUG("Block%d check incomplete, process recheck.", fw_block); - block_section = 10; - } - } - if (block_section < 9) - { - ret = gup_burn_ss51_block(i2c_client_point, block_section, fw_block+1, &fw_chksum); - if (FAIL == ret) - { - GTP_ERROR("Burn block%d section%d failed, reburn block%d", fw_block+1, block_section, fw_block+1); - } - else - { - block_section++; - } - if (block_section == 9) // one firmware block downloaded - { - fw_block++; - block_section = 10; - ret = gtp_send_check_info(i2c_client_point, fw_chksum); - } - } - return ret; -} -#endif - -#endif -//************* For GT9XXF End **********************// - -#if GTP_WITH_PEN -static void gtp_pen_init(void) -{ - s32 ret = 0; - - pen_dev = input_allocate_device(); - if (pen_dev == NULL) - { - GTP_ERROR("Failed to allocate input device for pen/stylus."); - return; - } - - pen_dev->evbit[0] = BIT_MASK(EV_SYN) | BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) ; - pen_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); - - set_bit(BTN_TOOL_PEN, pen_dev->keybit); - set_bit(INPUT_PROP_DIRECT, pen_dev->propbit); - //set_bit(INPUT_PROP_POINTER, pen_dev->propbit); - -#if GTP_PEN_HAVE_BUTTON - input_set_capability(pen_dev, EV_KEY, BTN_STYLUS); - input_set_capability(pen_dev, EV_KEY, BTN_STYLUS2); -#endif - - input_set_abs_params(pen_dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_PRESSURE, 0, 255, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_TRACKING_ID, 0, 255, 0, 0); - - pen_dev->name = "mtk-pen"; - pen_dev->phys = "input/ts"; - pen_dev->id.bustype = BUS_I2C; - - ret = input_register_device(pen_dev); - if (ret) - { - GTP_ERROR("Register %s input device failed", pen_dev->name); - return; - } -} - -static void gtp_pen_down(s32 x, s32 y, s32 size, s32 id) -{ - input_report_key(pen_dev, BTN_TOOL_PEN, 1); - input_report_key(pen_dev, BTN_TOUCH, 1); - input_report_abs(pen_dev, ABS_MT_POSITION_X, x); - input_report_abs(pen_dev, ABS_MT_POSITION_Y, y); - if ((!size) && (!id)) - { - input_report_abs(pen_dev, ABS_MT_PRESSURE, 100); - input_report_abs(pen_dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(pen_dev, ABS_MT_PRESSURE, size); - input_report_abs(pen_dev, ABS_MT_TOUCH_MAJOR, size); - input_report_abs(pen_dev, ABS_MT_TRACKING_ID, id); - } - input_mt_sync(pen_dev); -} - -static void gtp_pen_up(void) -{ - input_report_key(pen_dev, BTN_TOOL_PEN, 0); - input_report_key(pen_dev, BTN_TOUCH, 0); -} -#endif - - -static s32 tpd_i2c_probe_next(struct i2c_client *client) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; - - - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_ERROR(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - - return 0; -} - -static ssize_t cfg_load_enable_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - tpd_i2c_probe_next(i2c_client_point); - return count; -} -static ssize_t cfg_load_enable_show(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static DEVICE_ATTR(cfg_load_enable, S_IRUGO|S_IWUSR, cfg_load_enable_show, cfg_load_enable_store); - -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -/*sys interface to get and set the data partition mount status*/ -#ifdef GTP_COMPATIBLE_MODE - -static ssize_t data_is_mount_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - GTP_INFO("enter %s", __func__); - - - is_data_mounted = ((buf[0] == '1') ? 1 : 0); - - GTP_INFO("is_data_mount = %d, buf = %s", is_data_mounted, buf); - - return count; -} -static ssize_t data_is_mount_show(struct device *dev, - struct device_attribute *attr, - char *buf, size_t count) -{ - return snprintf(buf, PAGE_SIZE, "is_data_mounted = %d\n", is_data_mounted); -} - -static DEVICE_ATTR(data_is_mount, 0644, data_is_mount_show, data_is_mount_store); - -#endif - -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/4/29*/ - - -static struct miscdevice cfg_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "tp_cfg", - // .fops = &tpd_fops, -}; - -#if 0 -static void buttons_timer_function(unsigned long data) -{ - printk(KERN_ERR"caoyang1\n"); - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - tpd_sleep_flag = 1; - -} -#endif - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; -//add by caoyang for ·À¶¶ -//do not use the timer because it cause bug -#if 0 - init_timer(&buttons_timer); - buttons_timer.function = buttons_timer_function; - add_timer(&buttons_timer); -#endif -#if 0 - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } -#endif -#ifdef VELOCITY_CUSTOM - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#if 0 - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } -#endif - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0666, NULL, &config_proc_ops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - else - { - GTP_INFO("create proc entry %s success", GT91XX_CONFIG_PROC_FILE); - } -#if 0 -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_ERROR(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } -#endif - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); - -#if GTP_WITH_PEN - gtp_pen_init(); -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - -#if 1 - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - -#endif - -#if 0 - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif -#endif -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif -#if 0 -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; -#endif - misc_register(&cfg_misc_device); -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -#ifdef GTP_COMPATIBLE_MODE - device_create_file(cfg_misc_device.this_device, &dev_attr_data_is_mount); -#endif -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/4/29*/ - - device_create_file(cfg_misc_device.this_device, &dev_attr_cfg_load_enable); - tpd_load_status = 1; - return 0; -} - - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -static s32 force_reset_guitar(s32 resume) -{ - s32 i = 0; - s32 ret = 0; - - if (!resume) - { - GTP_INFO("Force_reset_guitar"); - } - else - { - GTP_INFO("Download little system."); - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -#ifdef MT6573 - //Power off TP - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ZERO); - msleep(30); - //Power on TP - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ONE); - msleep(30); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - -#endif - - for (i = 0; i < 5; i++) - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - //check code ram - if (resume) // poweroff resume - { - ret = gup_fw_download_proc(NULL, GTP_FL_PWR_RESUME_BURN); - if (FAIL == ret) - { - GTP_ERROR("Failed to download little system."); - continue; - } - } - else - #endif - { - ret = gup_fw_download_proc(NULL, GTP_FL_ESD_RECOVERY); - } - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - //startup fw - ret = gtp_fw_startup(i2c_client_point); - if(FAIL == ret) - { - if (resume) - { - GTP_ERROR("Failed to startup little system."); - } - else - { - GTP_ERROR("GT9XXF start up failed."); - } - continue; - } - break; - } - else - #endif - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - msleep(50); - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - - if (i >= 5) - { - if (resume) - { - GTP_ERROR("Failed to download little system."); - } - else - { - GTP_ERROR("Failed to reset guitar."); - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; - } - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - if (resume) - { - little_fw_mode = 1; - fw_block = 0; - block_section = 1; - - msleep(1); - gtp_main_clk_proc(i2c_client_point); - gtp_hopping_proc(i2c_client_point, GTP_HOPPING_SEND); - gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - } - else - { - little_fw_mode = 0; - fw_block = 0; - block_section = 0; - } - } -#endif - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work_sync(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - -static s32 gtp_check_fw(void) -{ - u8 versionBuff[4] = {0}; - s32 ret,retry = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - - return 1; - } - - GTP_ERROR("Check running fw version error!"); - return 0; -} - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[3] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3 || !gtp_check_fw()) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - esd_buf[0] = 0x01; - esd_buf[1] = 0x01; - esd_buf[2] = 0x01; - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, 3); - msleep(50); - force_reset_guitar(0); - } - } - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif - -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_EM_PRINT(x, y, x, y, id, 1); - -#if (defined(MT6575)||defined(MT6577)) - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - input_report_key(tpd->dev, BTN_TOUCH, 0); - input_mt_sync(tpd->dev); - TPD_EM_PRINT(x, y, x, y, id, 0); - -#if (defined(MT6575) || defined(MT6577)) - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - -#ifdef MT6573 - chr_status = *(volatile u32 *)CHR_CON0; - chr_status &= (1 << 13); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - chr_status = upmu_is_chr_det(); -#endif - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - u8 pen_active = 0; - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - u8 proximity_status; //add by caoyang - u8 doze_buf[3] = {0x81, 0x4B}; - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - - while (tpd_halt) - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - break; - } - //#endif - } - tpd_flag = 0; - msleep(20); - } - - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - TPD_DEBUG_SET_TIME; - set_current_state(TASK_RUNNING); - - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - if(gesture_value > 0){ - //#if GTP_GESTURE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if ((doze_buf[2] == 'a') || (doze_buf[2] == 'b') || (doze_buf[2] == 'c') || - (doze_buf[2] == 'd') || (doze_buf[2] == 'e') || (doze_buf[2] == 'g') || - (doze_buf[2] == 'h') || (doze_buf[2] == 'm') || (doze_buf[2] == 'o') || - (doze_buf[2] == 'q') || (doze_buf[2] == 's') || (doze_buf[2] == 'v') || - (doze_buf[2] == 'w') || (doze_buf[2] == 'y') || (doze_buf[2] == 'z') || - (doze_buf[2] == 0x5E) /* ^ */ - ) - { - if (doze_buf[2] != 0x5E) - { - GTP_INFO("Wakeup by gesture(%c), light up the screen!", doze_buf[2]); - } - else - { - GTP_INFO("Wakeup by gesture(^), light up the screen!"); - } - - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if ( (doze_buf[2] == 0xAA) || (doze_buf[2] == 0xBB) || - (doze_buf[2] == 0xAB) || (doze_buf[2] == 0xBA) ) - { - char *direction[4] = {"Right", "Down", "Up", "Left"}; - u8 type = ((doze_buf[2] & 0x0F) - 0x0A) + (((doze_buf[2] >> 4) & 0x0F) - 0x0A) * 2; - - GTP_INFO("%s slide to light up the screen!", direction[type]); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xCC == doze_buf[2]) - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - //#endif - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - continue; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - continue; - } - switch (rqst_data[2]) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - rqst_processing = 1; - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - #if GTP_POWER_CTRL_SLEEP - { - ret = gtp_hopping_proc(i2c_client_point, GTP_HOPPING_SEND); - if (FAIL == ret) - { - GTP_ERROR("Failed to send hopping data."); - goto exit_work_func; - } - else - { - GTP_INFO("Send hopping data success."); - } - } - #endif - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - - case GTP_RQST_RESET: - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) { - u8 reg_data[3] = {(u8)(0x801F >> 8), (u8)(0x801F & 0xFF), 0}; - gtp_i2c_write(i2c_client_point, reg_data, 3); - gtp_recovery_reset(i2c_client_point); - gtp_enter_doze(i2c_client_point); - } - }else - //#endif - { - gtp_recovery_reset(i2c_client_point); - } - GTP_INFO("Request Reset."); - goto exit_work_func; - - #if GTP_POWER_CTRL_SLEEP - case GTP_RQST_STORE_HOPPING: - GTP_INFO("Request store hopping data."); - ret = gtp_hopping_proc(i2c_client_point, GTP_HOPPING_STORE); - if (FAIL == ret) - { - GTP_ERROR("Failed to store hopping data."); - } - else - { - GTP_INFO("Hopping data stored."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - - case GTP_RQST_STORE_BAK_REF: - GTP_INFO("Request store backup reference."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_STORE); - if (FAIL == ret) - { - GTP_ERROR("Failed to store backup reference data."); - } - else - { - GTP_INFO("Backup reference data stored."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - #endif - - default: - GTP_INFO("Undefined request code: 0x%02X", rqst_data[2]); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - break; - } - } - #endif - - if (finger == 0x00) - { - continue; - } - - if ((finger & 0x80) == 0) - { - goto exit_work_func; - } -if((gtp_autotool_setting == 1) && !(point_data[GTP_ADDR_LENGTH] & 0x40)){ - gtp_autotool_setting = 0; -} - //add by caoyang -if(gesture_value > 0){ - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - if(tpd_sleep_flag == 1){ - goto exit_work_func; - } - if (proximity_status & 0x40) //proximity or large touch detect,enable hwm_sensor. - { - printk(KERN_ERR"caoyang0 test for xipin\n"); - //mod_timer(&buttons_timer, jiffies+HZ/50); - if(gtp_autotool_setting == 1){ - gtp_autotool_setting = 0; - goto exit_work_func; - } -#if 1 - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - tpd_sleep_flag = 1; -#endif - goto exit_work_func; - } - //end -} - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - - #if (GTP_HAVE_TOUCH_KEY || GTP_PEN_HAVE_BUTTON) - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - #if GTP_PEN_HAVE_BUTTON - if (key_value == 0x40) - { - GTP_DEBUG("BTN_STYLUS & BTN_STYLUS2 Down."); - input_report_key(pen_dev, BTN_STYLUS, 1); - input_report_key(pen_dev, BTN_STYLUS2, 1); - pen_active = 1; - } - else if (key_value == 0x10) - { - GTP_DEBUG("BTN_STYLUS Down, BTN_STYLUS2 Up."); - input_report_key(pen_dev, BTN_STYLUS, 1); - input_report_key(pen_dev, BTN_STYLUS2, 0); - pen_active = 1; - } - else if (key_value == 0x20) - { - GTP_DEBUG("BTN_STYLUS Up, BTN_STYLUS2 Down."); - input_report_key(pen_dev, BTN_STYLUS, 0); - input_report_key(pen_dev, BTN_STYLUS2, 1); - pen_active = 1; - } - else - { - GTP_DEBUG("BTN_STYLUS & BTN_STYLUS2 Up."); - input_report_key(pen_dev, BTN_STYLUS, 0); - input_report_key(pen_dev, BTN_STYLUS2, 0); - if ( (pre_key == 0x40) || (pre_key == 0x20) || - (pre_key == 0x10) - ) - { - pen_active = 1; - } - } - if (pen_active) - { - touch_num = 0; // shield pen point - //pre_touch = 0; // clear last pen status - } - #endif - #if GTP_HAVE_TOUCH_KEY - if (!pre_touch) - { - for (i = 0; i < GTP_MAX_KEY_NUM; i++) - { - input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - } - touch_num = 0; // shiled fingers - } - #endif - } - #endif - pre_key = key_value; - - GTP_DEBUG("pre_touch:%02x, finger:%02x.", pre_touch, finger); - - if (touch_num) - { - for (i = 0; i < touch_num; i++) - { - coor_data = &point_data[i * 8 + 3]; - - id = coor_data[0] & 0x0F; - input_x = coor_data[1] | coor_data[2] << 8; - input_y = coor_data[3] | coor_data[4] << 8; - input_w = coor_data[5] | coor_data[6] << 8; -//chenhui add start -// input_y=abs_y_max-input_y; -// input_x=abs_x_max-input_x; -// s32 temp_input_x=input_x; -// input_x=input_y; -// input_y=temp_input_x; - -//chenhui add end - - input_x = TPD_WARP_X(abs_x_max, input_x); - input_y = TPD_WARP_Y(abs_y_max, input_y); - - #if GTP_WITH_PEN - id = coor_data[0]; - if ((id & 0x80)) // pen/stylus is activated - { - GTP_DEBUG("Pen touch DOWN!"); - pre_pen = 1; - //id &= 0x7F; - id = 0; - GTP_DEBUG("(%d)(%d, %d)[%d]", id, input_x, input_y, input_w); - gtp_pen_down(input_x, input_y, input_w, id); - pen_active = 1; - } - else - #endif - { - GTP_DEBUG(" (%d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - } - else - { - if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - gtp_pen_up(); - pre_pen = 0; - pen_active = 1; - } - else - #endif - { - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - } - } - pre_touch = touch_num; - - #if GTP_WITH_PEN - if (pen_active) - { - pen_active = 0; - input_sync(pen_dev); - } - else - #endif - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_ERROR("I2C write end_cmd error!"); - } - } - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - if (little_fw_mode) - { - if ((fw_block == 0) && (block_section == 1)) - { - GTP_INFO("Begin downloading big ss51 firmware"); - } - gtp_download_big_ss51(i2c_client_point); - } - } - #endif - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_ERROR("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_ERROR("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_ERROR("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH - 1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_DEBUG("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); - - GTP_DEBUG("Entering gesture mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("Failed to set gesture flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_INFO("Gesture mode enabled."); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send gesture cmd failed."); - return ret; -} - -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if (GTP_COMPATIBLE_MODE && !GTP_POWER_CTRL_SLEEP) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - -#ifdef MT6573 - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ZERO); - msleep(30); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if GTP_POWER_CTRL_SLEEP - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - power_is_down = 0; - little_fw_mode = 1; - kthread_run(gtp_resume_timeout, (void*)NULL, "resume_timeout"); - - ret = force_reset_guitar(1); - if (FAIL == ret) - { - little_fw_mode = 0; - gtp_recovery_reset(client); - } - if (!gtp_check_fw()) { - little_fw_mode = 0; - gtp_recovery_reset(client); - } - return 0; - } - #endif // end compatible mode & fl little system - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else // esle PowerCtrlSleep - while (retry++ < 5) { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_WAKEUP != doze_status) - { - GTP_INFO("Powerkey wakeup."); - } - else - { - GTP_INFO("Gesture wakeup."); - } - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - ret = gup_reload_fw_dsp(NULL, GTP_FL_READ_REPAIR); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - if (ret == FAIL) { - GTP_ERROR("[gtp_wakeup_sleep]Reload dsp code failed."); - continue; - } - ret = gtp_fw_startup(client); - if (ret == FAIL) { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - if (!gtp_check_fw()) { - gtp_recovery_reset(client); - } - return 0; // succeed - //#else // else gesture wakeup - }else{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); //wake up by int gpio - msleep(5); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) { - u8 opr_buf[2] = {0}; - - ret = gtp_i2c_test(client); - if (ret >= 0) { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(0); - retry = 0; - break; - } - //#endif // end compatible mode - } - ret = gtp_i2c_test(client); - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - //#if (!GTP_GESTURE_WAKEUP) - if(!(gesture_value > 0)) - { - gtp_int_sync(25); - } - //#endif - return ret; - } - gtp_reset_guitar(client, 20); - #endif // end gesture wakeup - } - - if (retry >= 5) { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(0); - } -#endif // end PowerCtrlSleep - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - - GTP_INFO("System suspend."); - -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - little_fw_mode = 0; - power_is_down = 1; -#endif - - tpd_halt = 1; -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif -//#if GTP_GESTURE_WAKEUP -if(gesture_value > 0){ - ret = gtp_enter_doze(i2c_client_point); -//#else -}else{ - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); -//#endif -} - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } - // to avoid waking up while not sleeping, delay 48 + 10ms to ensure reliability - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - GTP_INFO("System resume."); - -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif - tpd_sleep_flag = 0; - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - - tpd_halt = 0; -//#if GTP_GESTURE_WAKEUP -if(gesture_value > 0){ - doze_status = DOZE_DISABLED; -//#else -}else{ - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); -//#endif -} - -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - if(g_boot_mode == KERNEL_POWER_OFF_CHARGING_BOOT || g_boot_mode == LOW_POWER_OFF_CHARGING_BOOT) //add by zero - return 0; - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#ifdef I2C_BUS_NUMBER - i2c_register_board_info(I2C_BUS_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_firmware.h deleted file mode 100644 index f174dbce8f6..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,3108 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ - //TODO:Puts your update firmware data here! -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]910 -*[VID]1020 -*[GENERATED]2013/09/06 10:03:05 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { - - 0x00,0x90,0x06,0x00,0x39,0x31,0x30,0x00,0x00,0x00,0x00,0x00,0x10,0x50,0x80,0x00, - 0x55,0x40,0xa0,0x99,0xb1,0xa7,0x69,0xf0,0x0c,0xc1,0x9a,0x46,0x11,0xe0,0x88,0xc4, - 0x3c,0x41,0x33,0x76,0x52,0xfe,0x32,0xe0,0x1d,0xc9,0xc2,0x24,0xf2,0x67,0x01,0x8d, - 0x05,0x02,0x8b,0x81,0x12,0x0a,0x12,0x6b,0x4d,0x21,0xe9,0xa7,0xd3,0x86,0x09,0x0d, - 0x87,0x03,0xf1,0x32,0xf2,0xd3,0x09,0x7b,0x4d,0x4b,0xd1,0x23,0x72,0x65,0xb8,0x48, - 0xa5,0xab,0x99,0xdb,0xb5,0x22,0xe1,0xe2,0xc2,0xfc,0x68,0xfa,0x51,0x54,0x36,0x81, - 0x74,0xe2,0x4f,0xbc,0xf3,0x6a,0x8f,0xf5,0xc5,0xd7,0x20,0x06,0x25,0x77,0x89,0xa9, - 0x6a,0x49,0xe1,0x9c,0x33,0xac,0x69,0xe4,0xcc,0xcc,0x6e,0x55,0xd0,0x76,0x96,0x38, - 0xbc,0x94,0x71,0xb5,0x9f,0xac,0x39,0x73,0xe0,0x4a,0x21,0x9d,0x8c,0x25,0x47,0xac, - 0x2c,0x48,0xfa,0x8e,0x11,0xf5,0x10,0xda,0x0f,0x4c,0x1a,0x80,0xb9,0x67,0x9a,0x3c, - 0x2f,0x49,0xb0,0x9e,0x91,0x78,0x20,0x3a,0x55,0x69,0x41,0x26,0x26,0x1a,0xda,0xef, - 0x0f,0xba,0xbb,0x5d,0x9c,0x25,0x17,0x7d,0x2f,0xb4,0x27,0x3d,0x7b,0x28,0x1a,0x19, - 0x0c,0xfb,0xf3,0x9f,0x11,0x73,0x9b,0x29,0xd9,0x49,0x5b,0xc0,0xed,0xc0,0x1d,0xb7, - 0x0c,0xd7,0xc0,0xaa,0x98,0x28,0x96,0xee,0x22,0x4a,0x14,0x4a,0x69,0xd6,0x3c,0xb5, - 0x79,0xb6,0x32,0xde,0x9b,0xa7,0x3d,0x9e,0xee,0x23,0x39,0xbc,0x13,0xb0,0xdf,0xb5, - 0x6c,0xf5,0x8f,0x2f,0xa9,0xaa,0x73,0x31,0x6b,0x55,0x6b,0xf2,0xc8,0x23,0xb4,0xdd, - 0xfc,0x66,0xf3,0xae,0xb6,0x29,0x39,0x68,0xca,0x2f,0x23,0x75,0x26,0x20,0x04,0x80, - 0x78,0xf8,0xa4,0x19,0x91,0xb7,0x2c,0xc0,0xd0,0x58,0xf4,0xe5,0x30,0x7f,0xde,0xb0, - 0x26,0xe9,0x84,0x64,0x7c,0x3e,0xe5,0xc2,0xef,0x34,0x9b,0x54,0x6d,0x8e,0x4f,0x28, - 0x82,0x11,0x8f,0x04,0x32,0x16,0x64,0xd3,0x6e,0x37,0x55,0xf8,0x8a,0x7b,0x02,0x1d, - 0x24,0xe6,0x39,0x65,0xf8,0x3c,0x64,0xc3,0x6f,0x36,0x66,0x31,0x8a,0x53,0xbc,0x28, - 0x0c,0x9f,0x0b,0xb6,0x95,0x24,0x72,0x86,0x9d,0xd4,0x4c,0x86,0x31,0x86,0x45,0xb2, - 0xa1,0x31,0xec,0x66,0x92,0xbf,0x05,0x2c,0xc4,0x53,0x96,0x69,0x98,0xcc,0xc1,0x27, - 0x20,0x12,0x9f,0x25,0x15,0x30,0xae,0xb3,0xa1,0x59,0xab,0x9d,0x5e,0x7b,0xc7,0x33, - 0x21,0x13,0x4a,0xb5,0xa7,0x75,0x7d,0xac,0x42,0xdb,0x69,0x97,0xb0,0x87,0xc6,0x74, - 0xba,0xb3,0x32,0x7c,0x37,0x37,0x3f,0xfb,0xec,0x44,0xac,0x53,0x8f,0x3a,0x79,0x69, - 0x1a,0x1c,0x5a,0xf3,0xbc,0xcc,0x66,0x9f,0xf8,0xf5,0x48,0x3e,0xf9,0x8b,0x37,0x37, - 0xc3,0xf1,0x33,0x9d,0x1b,0x78,0xbe,0xfa,0x64,0x06,0x4e,0x7b,0xdc,0x36,0x51,0xed, - 0xc6,0xb0,0x4f,0x61,0x2b,0x79,0xbf,0xf3,0x7c,0xf7,0xa7,0x4e,0x81,0xf6,0x4b,0xaa, - 0xa8,0x38,0x04,0x6f,0x01,0x35,0x1c,0xf5,0x2a,0x47,0xa8,0x35,0xf8,0x78,0xc7,0xba, - 0xa9,0x39,0x32,0x34,0x68,0xb0,0x44,0xf9,0x4a,0xfd,0x1f,0xdb,0xda,0x38,0xc9,0x2b, - 0x28,0x1a,0x3b,0xbe,0x19,0x0c,0xb4,0x0f,0x4f,0xe1,0x4f,0x8f,0xd4,0x38,0x46,0x3b, - 0x29,0x1b,0x37,0xd5,0xd8,0x33,0x60,0x3e,0x35,0x57,0xe1,0x7b,0xf1,0x79,0xb0,0xa6, - 0x22,0xc0,0xfa,0xf9,0xb7,0xe2,0x20,0x62,0xc4,0xc6,0xc1,0x3e,0xd3,0xf5,0x28,0x12, - 0x05,0xc1,0x6f,0x74,0xf7,0x29,0x3c,0xb5,0x64,0x56,0xbc,0xd4,0xd0,0x34,0xee,0xd4, - 0x84,0x82,0xfb,0xc2,0x16,0xa6,0xe8,0x66,0x25,0x19,0xd1,0x67,0x73,0x69,0x29,0x32, - 0x85,0x83,0x2f,0xff,0xb9,0xee,0x8d,0xcc,0x86,0x30,0x51,0x18,0x52,0x76,0xbb,0xfc, - 0x79,0x50,0xc0,0x83,0xb7,0x0b,0x2a,0x73,0xe1,0xc2,0xca,0x8e,0xfa,0xab,0xa8,0xae, - 0x2a,0x5e,0x10,0x5e,0x74,0xad,0xff,0x9a,0x8f,0x8a,0xa3,0x74,0x2c,0x4b,0xbc,0x5e, - 0x67,0x39,0xad,0xaf,0x52,0x2b,0x51,0x3e,0x67,0x4c,0x2a,0xc8,0xa9,0x2f,0x9a,0xae, - 0xac,0xfc,0x11,0xd5,0x17,0xc0,0xc1,0x8c,0xe4,0x47,0x24,0x3f,0xd1,0x0c,0x22,0x0a, - 0x0c,0xc8,0xb8,0xdf,0x3d,0xd8,0x62,0x59,0x54,0x42,0xd2,0x6f,0x10,0x63,0x2a,0x1a, - 0x0d,0xc9,0x31,0xfc,0x2e,0xc8,0x8e,0x5a,0x45,0x19,0x38,0xdc,0xdf,0xc1,0x23,0x2f, - 0x8c,0x8a,0xc3,0x0d,0xc2,0x21,0xf4,0xd5,0x2d,0xac,0x31,0xcd,0x5e,0xc2,0xf1,0xcb, - 0x8d,0x8b,0xf1,0x45,0x3a,0xad,0x94,0xeb,0x4c,0x6a,0xbd,0xcf,0x81,0xe4,0xe5,0x38, - 0xf5,0xce,0xda,0x9e,0x42,0xa5,0x70,0x8c,0xce,0xbc,0x5c,0x92,0xa8,0x17,0x70,0x26, - 0x2e,0xcd,0xb7,0x49,0xb0,0x00,0x72,0x6b,0x7c,0x69,0x0c,0x93,0x7f,0xaf,0xb8,0x2e, - 0x67,0x3f,0x62,0xcb,0xd8,0x89,0xcc,0xac,0x0c,0x0e,0x21,0x97,0x5e,0x55,0x4f,0x50, - 0xbc,0x2f,0x93,0xd6,0x30,0xb4,0x21,0x6f,0x68,0xd4,0x25,0x28,0x5d,0xeb,0x01,0x82, - 0x4f,0xb4,0xf9,0xc3,0xe8,0x19,0x90,0xec,0xbb,0xed,0xed,0xb8,0x93,0xbc,0xac,0x92, - 0x94,0x1c,0xb2,0x74,0x99,0xbc,0x63,0xfa,0x1a,0xf1,0x0c,0x50,0xf0,0xc3,0xda,0x87, - 0xa4,0xf7,0xc5,0x85,0xe2,0x1f,0xde,0xd4,0x64,0x05,0xa7,0x61,0xb6,0xe9,0xc9,0xb4, - 0x16,0x1e,0xdf,0xeb,0xad,0xf1,0xfd,0x52,0x37,0x5e,0x15,0xa7,0x70,0x53,0xe9,0xa0, - 0xa4,0xb0,0x1c,0x44,0xb6,0x33,0x76,0x0a,0xb0,0x09,0x81,0x21,0x15,0xf0,0xb3,0x8a, - 0x18,0x1e,0xf4,0xce,0x96,0x3f,0x44,0xc3,0xc6,0x74,0xc2,0x8f,0x1f,0x6c,0x68,0x21, - 0xd1,0xb2,0xdd,0x95,0xf5,0x46,0x8d,0x61,0x66,0xdc,0x8d,0xc7,0xfc,0xa6,0x57,0x28, - 0xa1,0x4c,0x95,0xe6,0x16,0x8c,0x45,0x00,0xce,0xb9,0x83,0x8f,0x16,0x58,0xc2,0xad, - 0x2d,0xf8,0xa6,0x12,0x1e,0x48,0x56,0xa8,0x65,0xd7,0x1e,0xaf,0x0b,0x1f,0x2f,0x45, - 0xce,0x9d,0x90,0xef,0x55,0xb4,0xc1,0x58,0x8c,0xbc,0xe1,0x41,0x7b,0x22,0xdd,0x89, - 0xa4,0xd5,0x23,0x0b,0xd2,0xa5,0x57,0xa9,0xe1,0x51,0x68,0x9c,0xc3,0xa0,0x3a,0xe9, - 0x23,0xfe,0xd1,0xee,0x3f,0xbf,0x47,0x9c,0x4e,0xdd,0x23,0xcd,0xce,0xfe,0xfa,0x4e, - 0x41,0x41,0xa9,0x29,0xdf,0xdf,0x14,0xaa,0x6f,0xbc,0xe9,0x0c,0xfc,0xf8,0x24,0x98, - 0xd0,0x6a,0x2e,0x4b,0x9b,0xa6,0x5e,0x3a,0xce,0x51,0x3a,0x2e,0x21,0x52,0x07,0xc9, - 0xd5,0x93,0xa2,0x28,0x8d,0x7a,0x29,0x8a,0xef,0xd8,0x6c,0x8d,0x01,0x9c,0x4f,0xde, - 0xa9,0xdc,0xf7,0xb9,0x61,0xad,0xbb,0x7e,0xac,0xbf,0xe6,0xdf,0xe9,0xdd,0x3e,0x78, - 0x8f,0xa6,0x1f,0x90,0x23,0xfa,0x2a,0xc9,0x90,0x2f,0x8d,0x64,0x5e,0xcd,0x13,0x12, - 0x05,0xf4,0x6b,0xe4,0x19,0x6e,0xe4,0xb2,0xc1,0x79,0x9f,0x42,0xae,0xcc,0x1e,0x41, - 0xc0,0xf7,0xdb,0x85,0x37,0x39,0x28,0x10,0x61,0x70,0x04,0xb6,0xe9,0x6a,0x16,0x0e, - 0xb0,0x07,0xd0,0x88,0x36,0x25,0x21,0xcf,0x43,0x47,0x08,0xf2,0x0f,0x69,0xcc,0x9f, - 0x04,0x6f,0x1e,0x26,0x21,0x50,0xaf,0x32,0x01,0xb4,0x6f,0x49,0xed,0xb9,0xf8,0xdc, - 0xe2,0x66,0x49,0x94,0x17,0xee,0xf4,0xe2,0x0b,0x4f,0xde,0xc4,0x55,0x7e,0x32,0xc5, - 0xb7,0x9d,0x3b,0x33,0x1f,0xa0,0x08,0x41,0x65,0x0b,0x00,0x8b,0x2e,0xe5,0xb6,0xd3, - 0x39,0x69,0xd3,0x13,0x91,0x6b,0xdd,0x81,0x8b,0x08,0x81,0x6a,0xfd,0xea,0x83,0x7b, - 0x39,0x66,0xa2,0x3e,0xb9,0xa9,0x1b,0x4a,0xb3,0x95,0x94,0x5f,0x64,0x9e,0x54,0x70, - 0x03,0xa4,0xd3,0x35,0xbc,0x32,0x1b,0xde,0xcb,0x4d,0xa2,0x3e,0x15,0x2b,0x61,0x88, - 0x89,0x6a,0x85,0xe5,0xa0,0x65,0x4a,0xfd,0x6f,0xf7,0x9b,0x3c,0xde,0xb1,0x10,0x5e, - 0x43,0xb2,0x0d,0xfb,0xf2,0x24,0x96,0x5b,0x3e,0x4d,0x04,0x79,0xda,0x2b,0x7a,0x15, - 0xf5,0x17,0x42,0x8a,0xe6,0x6e,0x32,0x6a,0x3d,0x41,0xaf,0x86,0xa9,0xd3,0x9e,0x88, - 0x8a,0xf5,0x71,0xba,0x0b,0xd0,0x4c,0x1a,0x78,0xce,0x83,0x69,0x5d,0x9d,0xd6,0x2f, - 0x4b,0x6d,0x18,0x9f,0xa9,0x2e,0x19,0x74,0xa2,0x43,0x28,0xe9,0x82,0xe0,0x45,0x28, - 0x74,0x4a,0x33,0x79,0x47,0xbe,0xa3,0xfb,0x4b,0x4b,0x5b,0x33,0x2e,0x33,0xfc,0x04, - 0x3d,0x89,0x6c,0x94,0xb2,0x34,0xec,0xe6,0x9c,0x1c,0x21,0x20,0x36,0x47,0x77,0xe3, - 0x72,0xb5,0x09,0x34,0x2d,0xfb,0x7c,0xb2,0x8b,0x5c,0x64,0xbc,0x98,0x40,0x3f,0x7e, - 0xa6,0xd9,0xda,0xe7,0x9e,0x74,0xd0,0x25,0xbb,0x7a,0xcc,0x2d,0x19,0x63,0x42,0x73, - 0x41,0xb7,0xed,0x97,0xcd,0x3e,0x7d,0x1f,0xc5,0x5c,0x65,0x4a,0x05,0x62,0x73,0xa8, - 0xde,0x0d,0xd8,0x54,0x70,0x9b,0x56,0xe8,0xe0,0x03,0x78,0x77,0x14,0x7e,0x32,0xac, - 0x25,0xae,0xaa,0xbd,0xd8,0x36,0x41,0x16,0x8a,0xe4,0x82,0x60,0x86,0xda,0x85,0x38, - 0x55,0x9b,0x17,0x82,0x5b,0xb5,0x44,0x83,0x6f,0xf0,0x11,0xda,0xd0,0x34,0x3e,0xa2, - 0xdb,0x9e,0x93,0x64,0x4c,0xba,0x2f,0x8c,0xa7,0x54,0x09,0xb2,0x39,0xd4,0x7e,0x55, - 0xc3,0x11,0xfc,0x73,0xba,0x3c,0x2e,0x57,0x46,0x1e,0x56,0x45,0x9c,0x7e,0xe2,0xeb, - 0x08,0x9f,0x0d,0xfe,0x37,0x7f,0x66,0x58,0x65,0xd2,0xe6,0x1c,0x73,0xc9,0x09,0x54, - 0x89,0x6a,0x14,0xef,0xc5,0x31,0x91,0xd6,0xab,0xa1,0xc7,0xa4,0x11,0x2b,0x0f,0xea, - 0xf6,0x9d,0xca,0x3d,0xa3,0xdb,0xe0,0x5b,0x6b,0x0c,0xff,0x1d,0xa5,0xd6,0xdd,0x28, - 0x45,0x1f,0xb8,0xf1,0xd3,0xcd,0xd3,0xed,0x6c,0xce,0x9e,0xf8,0xb2,0x1f,0x15,0xba, - 0xea,0x7f,0x4e,0xbf,0xec,0x90,0x85,0xca,0x8a,0x46,0xd8,0xc1,0x33,0x7e,0xc2,0x39, - 0x28,0x1a,0x6b,0x5e,0x90,0x36,0x3f,0x9b,0x15,0x1c,0x81,0xfe,0xd8,0x3d,0x8b,0x09, - 0xa7,0x04,0xd8,0xec,0xc7,0x7d,0x78,0x0f,0xd8,0xbb,0xe3,0x39,0xfd,0x76,0x28,0x13, - 0xcc,0x19,0x77,0x34,0xeb,0x75,0x10,0x6e,0xe5,0x7f,0x58,0x93,0x52,0x22,0x37,0x2a, - 0xec,0x10,0xc8,0x56,0xfb,0x2a,0x07,0x3a,0xe2,0xc7,0xc6,0x1f,0x75,0x02,0x32,0x01, - 0x88,0x26,0xd9,0x83,0xab,0xb3,0x8a,0xcb,0xd3,0x8d,0x4a,0xd4,0xe4,0x5f,0x3f,0x7b, - 0xc7,0x2c,0xad,0xf5,0x17,0xab,0x19,0xef,0x64,0xd8,0xbe,0xb3,0xa2,0xee,0xe1,0x30, - 0x28,0x5b,0xc7,0x7f,0x8a,0x75,0x48,0xe0,0xfc,0xf9,0x5d,0x19,0xcb,0x90,0xe7,0xbd, - 0xff,0x3f,0xf0,0x9c,0xb6,0x0a,0xf9,0xb2,0x4b,0x4e,0xa6,0xd3,0xa8,0xa7,0x4b,0xe6, - 0xc5,0x8b,0xbb,0x98,0xea,0xe4,0x09,0x01,0x4b,0x40,0x25,0x09,0xf7,0x86,0xde,0x3b, - 0x81,0x5c,0xbb,0xa6,0xbd,0x57,0x86,0x91,0xc1,0x2c,0xe1,0x99,0x76,0x18,0x31,0x19, - 0x3d,0x87,0x57,0x7c,0xbf,0xe4,0x5a,0xcc,0xe0,0xc5,0xd2,0x2c,0x35,0xe5,0x14,0x62, - 0x65,0x30,0xd2,0x9c,0x9d,0x12,0x02,0xd2,0xca,0x86,0xc4,0x13,0x22,0x60,0x01,0xe3, - 0x02,0x45,0x12,0x8d,0xbe,0xca,0x6a,0xe8,0x6b,0xaf,0xcd,0x03,0x70,0xe7,0x55,0xc3, - 0xbe,0xca,0x93,0xbf,0x78,0xeb,0x8f,0x59,0xfe,0xa5,0x60,0x3f,0xdb,0x90,0x11,0x38, - 0x2e,0xae,0xbb,0x62,0xbb,0x2e,0xe0,0xee,0x1c,0xc2,0xcc,0xcb,0xd1,0x1a,0x25,0xa1, - 0x8f,0x4d,0x8a,0xf5,0x46,0xa0,0x35,0xdd,0x7c,0x7c,0x03,0x0d,0x71,0xe2,0xe5,0xb8, - 0x9b,0xfb,0xfd,0x77,0xbd,0x6e,0xb3,0x36,0x25,0x8c,0xfb,0x7b,0xd8,0xe7,0x15,0x17, - 0x33,0x35,0x95,0xfe,0x12,0xed,0x21,0x84,0x68,0xcc,0xc5,0xdf,0xfe,0xfd,0xa0,0xc2, - 0x68,0x6b,0x9c,0x79,0xb9,0xd2,0xa4,0xc0,0x24,0xd6,0x21,0x44,0xf6,0xf3,0x20,0xc6, - 0xa7,0x95,0x8c,0x32,0x94,0x1e,0x42,0xde,0x56,0x93,0xb9,0xa5,0x41,0x80,0xa1,0x07, - 0xfb,0x0b,0x61,0x01,0xfc,0xb4,0xc4,0x82,0x47,0x5f,0xb2,0xd5,0x57,0xf6,0x27,0xf1, - 0xe4,0x83,0x3c,0xb0,0x14,0x1c,0xc5,0x40,0x84,0xc8,0xdd,0x17,0xad,0x78,0xf6,0x24, - 0x87,0x1e,0xfc,0xb8,0x97,0x6b,0x8e,0xea,0x81,0xcf,0xcc,0x84,0x89,0x59,0xd4,0x23, - 0x84,0xf5,0x57,0x98,0x04,0x04,0x25,0xe8,0x80,0x99,0x7e,0x72,0x56,0xf8,0xb2,0x2b, - 0xcc,0xd9,0x51,0xa5,0x09,0xea,0x57,0x15,0xf6,0x19,0xa3,0x20,0x28,0xfe,0x5f,0x22, - 0x04,0x37,0x55,0x28,0x5e,0xb4,0xbe,0xb5,0xc3,0xd1,0xc3,0x46,0x54,0xe2,0x5e,0xf9, - 0x77,0x87,0x33,0x0c,0xbc,0xe3,0xf1,0x4c,0xee,0xdc,0xb2,0x4c,0x4f,0x79,0x17,0xab, - 0x8c,0xab,0x96,0x76,0xa7,0x76,0x2c,0xab,0x5e,0xe8,0xa8,0xcd,0x41,0xb6,0x1d,0x62, - 0x38,0xf5,0x9f,0x7c,0x85,0xdf,0xfd,0xc9,0xaf,0x2a,0x89,0x83,0x5b,0xe1,0xd3,0xe8, - 0xfe,0x84,0x91,0xb3,0x30,0x1d,0xc7,0xc8,0x95,0x5c,0x7f,0xd3,0x38,0xb9,0x44,0x48, - 0x98,0xed,0x4a,0x51,0x3f,0xfe,0x56,0x1e,0xcf,0xc7,0x65,0x98,0xf1,0x5a,0x56,0x0a, - 0x73,0x86,0xbc,0xb8,0x5f,0xad,0x1c,0xf2,0x6c,0x9d,0x01,0xda,0x9b,0x5e,0x1f,0x49, - 0x2e,0x25,0xf7,0x46,0xe2,0xa5,0x52,0x1d,0x0b,0xb2,0xa1,0x2f,0xf2,0x05,0xbf,0x3d, - 0x03,0x92,0x10,0xad,0x91,0x60,0xa5,0xdb,0x6d,0xdb,0x48,0x5b,0xdb,0xff,0xdb,0x3b, - 0x7f,0xd8,0xa0,0x44,0x49,0x3b,0x2e,0x09,0xcf,0xe6,0x9c,0x15,0xb9,0x51,0x2e,0xcd, - 0x0c,0xa5,0xb6,0xb4,0x79,0x2c,0x0d,0x23,0x1a,0x4e,0x67,0x0a,0xf2,0xcc,0x5a,0xa3, - 0xfb,0xc3,0x23,0x73,0xb1,0x10,0xdc,0xe1,0xe5,0xef,0xb7,0xfc,0x73,0xe7,0x11,0x41, - 0xbe,0x01,0x76,0x66,0xed,0x40,0x2b,0x0f,0x62,0xd8,0xd0,0xd9,0xd1,0x92,0x80,0x00, - 0x46,0xa0,0x0b,0xc0,0x58,0x79,0x45,0xf1,0x15,0x06,0xd8,0x61,0x14,0x60,0x18,0x23, - 0x61,0xa4,0x03,0xd0,0x68,0xf6,0xb4,0xe3,0x77,0x4d,0x22,0x7c,0xb4,0x29,0x95,0x7c, - 0x4a,0x85,0xff,0x69,0x31,0xd3,0x17,0x16,0x63,0xb9,0x53,0x17,0xe1,0x22,0x99,0xa2, - 0xa5,0xaa,0xcc,0x74,0x84,0x4b,0xd9,0x6e,0xf7,0xcc,0x1e,0xf7,0x53,0xbf,0xdb,0x2a, - 0x0e,0x71,0x79,0x4b,0xe5,0x33,0x12,0x19,0x5b,0xe7,0xec,0x10,0xed,0xbb,0x55,0xe7, - 0x0f,0x82,0x90,0x1e,0xaa,0xf4,0x0d,0x2b,0x5a,0x18,0x0b,0x4f,0x6d,0x07,0xe2,0x8d, - 0xce,0x86,0x27,0x9b,0x8a,0xe7,0x80,0x53,0xbe,0xe5,0xed,0x14,0x10,0x70,0x29,0xf4, - 0xe3,0xa0,0x91,0x1f,0x0b,0x23,0x25,0x15,0x46,0xed,0xfd,0xf4,0xd8,0x2b,0x96,0xf9, - 0x20,0xa3,0xfc,0x99,0xd0,0xf6,0x2e,0x59,0x72,0x0e,0xea,0x3e,0x19,0x9c,0xd9,0x2b, - 0x7f,0x06,0x0a,0xc9,0xbf,0xa0,0x22,0x47,0x73,0x0f,0x99,0xfe,0xdb,0x66,0x17,0x58, - 0xbe,0xae,0xbd,0x60,0xa9,0x2a,0x15,0x07,0x23,0x1f,0xc3,0x0f,0xde,0x22,0xcb,0x48, - 0xf3,0x2e,0x2c,0xa2,0x7a,0xf9,0x04,0xc5,0xa8,0x15,0xe3,0x82,0x56,0x0d,0x83,0x7c, - 0xce,0xeb,0x05,0x6c,0xe8,0xfd,0x6a,0xa7,0xc1,0x8f,0xf3,0x64,0x22,0xfb,0x1a,0xf2, - 0x49,0x1c,0x4c,0x61,0x02,0xcd,0xe3,0xc3,0x4f,0x82,0x5a,0x61,0xd0,0xd8,0x18,0x05, - 0xee,0x27,0xe7,0x81,0xb3,0x52,0xa1,0xc3,0x88,0xd1,0x95,0x94,0x80,0x30,0xf0,0x6c, - 0x62,0xc8,0xb0,0xca,0x31,0x73,0xe6,0xce,0x89,0x10,0x8c,0x55,0xa1,0xf8,0x03,0x44, - 0x64,0xd1,0x9c,0xa6,0x3c,0x56,0x80,0x1e,0x64,0xf6,0x6b,0x61,0xf4,0xd5,0x5f,0x90, - 0x63,0xe1,0x09,0x3c,0xef,0xf5,0xe7,0x74,0x29,0x22,0x96,0x0a,0xd0,0x39,0x7d,0x3e, - 0x2d,0xb0,0x8f,0x78,0x92,0x3b,0xeb,0x83,0x6d,0xa0,0xb5,0xe7,0xbb,0x7b,0x5e,0xca, - 0x93,0xaa,0x77,0x12,0x71,0x57,0x55,0x4d,0x02,0x4c,0x4d,0xb3,0xa5,0xda,0xe1,0x0c, - 0x47,0xf4,0x59,0x91,0x3e,0x13,0x68,0x0c,0x9d,0xfb,0x1b,0x9d,0x08,0x3a,0xb4,0x67, - 0x90,0x75,0xb4,0x77,0x80,0x55,0x0d,0xa9,0x5d,0xf9,0xe6,0xbe,0x39,0xd9,0x3d,0x62, - 0x9b,0xae,0x1b,0x84,0xb0,0xf0,0x43,0x5a,0xc2,0xfa,0x55,0x86,0x59,0xfa,0xe8,0xd9, - 0xad,0x3a,0xe9,0x48,0xb8,0x7b,0x8c,0xca,0x9d,0x50,0x8c,0xbf,0x2e,0xd6,0x1e,0xb6, - 0xc3,0x4d,0xce,0x58,0x09,0xd8,0x74,0x1e,0x83,0x0d,0x1d,0x0c,0x2e,0x12,0xca,0xcb, - 0x1f,0x8c,0xbf,0x1a,0x1f,0x3b,0xf2,0x6b,0x0d,0xf0,0x12,0x76,0x7a,0xdd,0xab,0x5a, - 0x87,0x16,0x1d,0xc0,0xaa,0xf5,0x09,0x0b,0xee,0xdb,0x17,0x79,0x43,0xd7,0x15,0xd9, - 0xc3,0x0e,0xef,0x8c,0x1a,0xb7,0x09,0x89,0x6b,0x40,0xe5,0x02,0xfd,0x84,0xf7,0x3f, - 0xfc,0x89,0xf2,0xc1,0xfd,0xa3,0x7d,0xe2,0x41,0x82,0xbc,0x07,0x37,0xf1,0xf3,0x30, - 0x03,0x78,0x12,0x66,0x95,0xbe,0xaf,0xc1,0xc1,0x4a,0xe2,0x1d,0x3f,0x50,0x12,0xde, - 0xfb,0x80,0xf8,0x00,0x52,0xb0,0xf7,0xf0,0xa7,0x1a,0xa7,0x1b,0x3f,0xa6,0xda,0x97, - 0xcb,0xeb,0x97,0x2a,0xf4,0xa7,0x0e,0xb7,0x83,0x81,0xc7,0x30,0x74,0x4c,0x05,0x53, - 0x3e,0xa5,0x1b,0x81,0xeb,0x02,0x66,0x4a,0x40,0x26,0xe0,0x04,0x52,0xa8,0x0a,0xad, - 0xee,0x74,0x73,0xdc,0x16,0xb6,0xb8,0xe7,0x18,0x68,0x3a,0xfe,0x74,0xc5,0x3c,0x84, - 0x6f,0x85,0x7d,0xb7,0x16,0xb9,0xfe,0x10,0xb6,0xc9,0xe7,0x8f,0x46,0x2b,0x73,0x51, - 0x45,0x83,0xd7,0x8b,0xf7,0x87,0x6c,0x91,0x47,0x5d,0x3b,0x9f,0x47,0x2a,0x2a,0x1e, - 0x3f,0xbc,0xc3,0x4e,0x50,0xb3,0x3a,0x3e,0x84,0xab,0xa3,0x5e,0x00,0xe1,0x10,0xe9, - 0x5a,0x24,0x18,0xbe,0xf4,0x38,0x60,0xba,0x31,0x66,0xa2,0x92,0xbc,0x46,0x99,0xe3, - 0x5c,0x45,0x03,0x39,0xe0,0xba,0xa4,0x38,0xae,0xc9,0xab,0x5c,0xec,0x65,0xe5,0xfb, - 0x89,0xa2,0x47,0x8d,0x85,0xa3,0x9b,0xcb,0x6d,0x18,0xa8,0x4c,0xad,0x87,0x6a,0x5b, - 0x65,0xdd,0x22,0xdb,0xc1,0xee,0x4c,0x46,0xc1,0x6a,0xb3,0x3a,0x7d,0x5d,0x3a,0x76, - 0xf6,0x84,0xd4,0x8b,0x7e,0x8d,0xea,0xbe,0xa6,0xe7,0x01,0xfb,0x51,0x67,0x9c,0x49, - 0x82,0x2a,0xa5,0xe0,0x9d,0x8c,0xef,0xab,0x80,0xcf,0x93,0x6d,0x87,0xe3,0xb7,0x29, - 0x64,0x1e,0xb3,0x6b,0x1d,0xab,0x6d,0x1e,0x30,0x42,0x2c,0xfa,0x59,0x7d,0x6d,0x72, - 0x33,0xa1,0xb8,0x9b,0x5f,0xbf,0xc1,0xb3,0x1c,0xd4,0xa7,0xdf,0x57,0xf2,0x54,0xf9, - 0x4d,0x9c,0xc6,0x65,0xb1,0x1c,0x1c,0x75,0x8c,0xd2,0x7a,0x63,0x9c,0xe0,0xe5,0x16, - 0xf9,0x1f,0xa7,0xec,0x54,0x33,0xc3,0xb2,0xdc,0xf2,0xef,0xa7,0x8c,0xb0,0x3b,0xf1, - 0xc5,0xde,0xd5,0x27,0x6b,0xf1,0x5b,0xd6,0x86,0xd7,0xc5,0x33,0xb3,0x36,0xa4,0x57, - 0x69,0x99,0xe0,0x24,0xb6,0x34,0x4a,0x00,0x07,0xd0,0x60,0x95,0x21,0xff,0xac,0x47, - 0x7a,0x98,0xfc,0xf2,0x6b,0x6e,0xed,0xb5,0xad,0xff,0xdc,0xe6,0x96,0xee,0x1b,0xeb, - 0xc6,0xcc,0xdf,0x2f,0x6a,0x79,0x14,0x23,0xf2,0x7b,0xf3,0x0f,0x36,0x36,0x92,0xa0, - 0xd7,0xf9,0x1b,0x2a,0x8e,0xcc,0x35,0xf6,0xc7,0x96,0xdf,0x01,0xf1,0x15,0x58,0x8c, - 0xcd,0x1b,0xe0,0x68,0x3a,0x5a,0x4f,0xdb,0x10,0xce,0xec,0xaf,0xdf,0x48,0xee,0x0f, - 0xb0,0x36,0xbb,0xed,0x05,0xd7,0xee,0x28,0x6d,0x74,0xfe,0x83,0x96,0xbd,0x51,0x0f, - 0xe6,0xd5,0x0a,0x74,0x74,0xe0,0x3f,0x67,0x63,0x77,0x77,0x3a,0x37,0x71,0x3c,0x88, - 0xba,0xaa,0xc9,0x52,0xbc,0xfb,0x6b,0xcb,0x6d,0x5d,0xe5,0x9d,0xfb,0x39,0x81,0x0a, - 0x2a,0xb5,0xb5,0x37,0xfd,0x27,0xb3,0x6e,0x24,0x31,0x7a,0xae,0x78,0x51,0xd1,0xba, - 0x3f,0xdf,0xca,0x53,0x0c,0x79,0xef,0xba,0x6b,0x29,0x38,0x21,0x79,0x5f,0x64,0xd8, - 0xf9,0xaf,0x00,0x4b,0xd1,0x52,0x4f,0x14,0x61,0x78,0x3c,0xdf,0xfa,0xbc,0xa9,0x06, - 0x0e,0x30,0x55,0x18,0x7d,0xbf,0xee,0x0b,0x44,0x7e,0x0a,0xbf,0xbb,0xb1,0xc3,0xe8, - 0xc4,0xcb,0xba,0x43,0xca,0x9f,0x80,0xe0,0x44,0xad,0xa8,0x00,0x53,0x50,0x51,0x03, - 0xe4,0x08,0xd8,0x63,0x5b,0x66,0xa4,0x14,0xd9,0x05,0x3a,0xd6,0x41,0xac,0x43,0x12, - 0xd7,0xe8,0xbb,0x9f,0x63,0xff,0x81,0x8e,0x37,0x02,0xac,0x14,0x54,0x7d,0x8a,0x60, - 0xce,0x0a,0xe7,0x67,0x1c,0xd5,0xb8,0x36,0x20,0x25,0x09,0x9a,0x26,0x33,0x16,0xa2, - 0xf1,0x79,0xb8,0x60,0xa3,0x2d,0x84,0x9a,0xff,0x27,0x34,0x43,0x9b,0x00,0x7d,0xb2, - 0xbe,0xf1,0xb3,0x2f,0x1d,0x9a,0x3d,0x30,0x03,0x38,0xf1,0x27,0xd7,0x79,0xe2,0xa3, - 0x62,0xd9,0x46,0x3f,0x1f,0x44,0xac,0xe1,0x0d,0x26,0xff,0x87,0x1b,0x02,0x31,0x63, - 0x5e,0xab,0x72,0xd0,0x64,0xda,0x3c,0x9e,0x9f,0x59,0xa1,0x52,0x1a,0x03,0x83,0xe0, - 0x80,0xc5,0x7d,0x7e,0xce,0xf7,0x82,0x57,0x90,0x47,0xaf,0x1d,0xdc,0x77,0x8a,0x0c, - 0x2d,0x84,0xb0,0x87,0xe2,0xa4,0x39,0xda,0xa9,0x58,0x22,0x18,0xb0,0x0d,0xaf,0x9b, - 0x84,0x00,0x43,0x15,0x34,0x46,0x21,0x03,0x6b,0xb6,0x2b,0xde,0x7b,0x7a,0x52,0x1a, - 0x6e,0x10,0xe8,0xe7,0x19,0x4b,0xb0,0x22,0x6a,0xce,0x0a,0xce,0x55,0x56,0x3a,0x74, - 0xd3,0x3f,0x06,0xb3,0x89,0x03,0x6c,0x1a,0xf1,0x13,0xfc,0x8e,0x93,0x08,0xf3,0x6a, - 0x73,0xd1,0x75,0x1b,0x35,0xd2,0xcd,0x87,0xbe,0x2e,0x4a,0x4e,0x33,0x29,0xb8,0x3b, - 0xf8,0x91,0x53,0x27,0xbb,0xde,0xc3,0x81,0xd8,0xb3,0xfa,0x3e,0x5e,0x72,0x1d,0xbb, - 0x70,0x82,0x70,0xf8,0x6c,0x92,0xa0,0x02,0xe5,0xf0,0xa5,0x7b,0x32,0x60,0x12,0xe2, - 0x48,0x1d,0xbc,0x2c,0x93,0x71,0xaf,0x3b,0x91,0x46,0x34,0xee,0x97,0x60,0xd7,0xab, - 0x5e,0xc9,0x2c,0x9a,0xbd,0x3c,0x7b,0x4e,0x3d,0xff,0x67,0xbd,0xc8,0xd0,0xf8,0x05, - 0xcf,0xfe,0x70,0x84,0xa4,0x06,0x1d,0xb0,0x13,0x8f,0x27,0x47,0xd4,0x05,0x56,0x33, - 0xda,0xd2,0xf3,0x77,0x1d,0x3e,0x65,0xda,0x00,0x8f,0x3d,0xff,0x56,0xde,0xe4,0x4a, - 0x23,0x84,0xfe,0x43,0xc1,0xbf,0x14,0x9f,0x1e,0xab,0xea,0x18,0xd1,0x11,0xb7,0xab, - 0xb5,0xaa,0x4c,0x53,0xc4,0xbe,0x88,0x0b,0xb2,0x36,0xb9,0x09,0xf0,0xd8,0x3b,0xc7, - 0x57,0x60,0xc1,0x42,0x49,0xbd,0xee,0x44,0x15,0xeb,0xeb,0x18,0x51,0xad,0x76,0x5a, - 0x50,0xe7,0x49,0x52,0x4c,0x76,0x76,0xbb,0xcd,0x4b,0x89,0xc5,0xfb,0xc8,0xb3,0xe8, - 0x9c,0xe2,0x16,0x4c,0x7c,0xdc,0x69,0x8c,0x91,0x47,0xee,0xa4,0xdf,0x39,0x57,0x82, - 0xce,0x02,0x1e,0x33,0xce,0xd9,0x0e,0x7e,0x3b,0x86,0xb5,0xb3,0xda,0xfc,0xc7,0xf4, - 0x5b,0x97,0xff,0x84,0x55,0x08,0x69,0x4b,0x1d,0xde,0xae,0xb2,0x5b,0xff,0x2d,0xef, - 0x26,0x00,0x33,0x6e,0x1a,0x0b,0x28,0x5b,0x82,0x54,0x8c,0x47,0x40,0xaf,0x28,0x2a, - 0xed,0x91,0xfd,0x3a,0x2a,0x81,0x16,0x3f,0x26,0x2a,0xec,0x5d,0x58,0xe3,0xb7,0xaa, - 0xfa,0x22,0xcf,0xa3,0xdc,0x7c,0x56,0xf4,0x92,0x2b,0x84,0xfd,0xa5,0xc2,0xec,0x26, - 0x4b,0xa2,0x3d,0xc5,0x4f,0xf1,0x6c,0x67,0x5b,0x68,0x17,0x08,0xa8,0x12,0x7e,0xdf, - 0x8f,0x08,0xf4,0x3f,0x17,0x82,0x20,0x83,0x7d,0xc0,0xe5,0x63,0x08,0xd2,0x03,0x74, - 0xfb,0xec,0x60,0x1e,0xb8,0xa3,0xa3,0xdc,0x60,0x57,0x54,0xd5,0xf7,0x85,0x2d,0x6d, - 0x88,0x07,0x4f,0xe9,0xf4,0x77,0x2d,0x4d,0x9d,0xce,0x4d,0x37,0x5f,0x4c,0x78,0x08, - 0x42,0x88,0xcf,0x12,0x19,0x2f,0x31,0x2e,0x32,0xc2,0x8c,0xa0,0xf0,0xfd,0x28,0x53, - 0xfb,0x80,0x52,0x33,0x5c,0xac,0x1b,0xcc,0x3d,0xcc,0x19,0x1e,0x3e,0xa7,0x33,0xb8, - 0x22,0x2f,0x34,0xbd,0xe7,0xc7,0x4b,0xc7,0xb5,0xf8,0xa6,0x61,0xbd,0x80,0x68,0x2d, - 0x7b,0x7a,0x52,0xac,0x07,0x68,0x7e,0xfd,0xfe,0x93,0x86,0xd6,0x47,0xa8,0x19,0x4b, - 0xed,0xc2,0x9a,0x8d,0x3d,0xe7,0xa5,0x28,0xc4,0x28,0x61,0x8f,0xd2,0xab,0xd2,0xf6, - 0x70,0x3b,0x96,0x5f,0x72,0x78,0x71,0x66,0x36,0xb1,0x87,0xd6,0x9f,0x1c,0xe1,0xb2, - 0x3f,0x3c,0xdb,0x29,0xbd,0xb9,0xa2,0x58,0x9d,0xd7,0x8c,0x29,0x6a,0x47,0xf5,0x7c, - 0x7e,0x6e,0x94,0x18,0x57,0xed,0xad,0xc5,0xb8,0xaa,0xc2,0x19,0xfe,0xa8,0x91,0xd7, - 0xfb,0x2d,0xdb,0x5c,0x3f,0xb5,0x6d,0xc9,0xdc,0x37,0x17,0x45,0x7f,0x47,0x74,0x72, - 0x64,0x51,0xf3,0x1b,0xd7,0xcf,0xc0,0x41,0xe3,0x54,0xf3,0x36,0x64,0x4a,0xb6,0x11, - 0xdf,0xef,0xe3,0x38,0xe1,0xed,0x09,0x01,0xd8,0xf3,0xcc,0x93,0x7d,0xac,0x44,0x5c, - 0x91,0x30,0x95,0x79,0xbe,0x72,0x57,0x94,0xae,0x51,0xec,0x1c,0xa0,0x40,0x48,0x18, - 0x0a,0xed,0xdb,0xb5,0x32,0xa3,0xf4,0xa1,0x6f,0x43,0xf5,0x93,0x37,0xcd,0x8a,0x21, - 0x15,0x22,0x5f,0x3d,0x60,0xee,0x86,0x5f,0xa4,0xc0,0xab,0xfb,0xda,0x9d,0x81,0x14, - 0x25,0x20,0x18,0x0f,0x10,0x84,0x35,0xdd,0x18,0x2f,0xcc,0x94,0x04,0x6f,0xd3,0x16, - 0x5a,0xf0,0x48,0x65,0x96,0x3a,0xba,0x38,0x66,0x11,0xaf,0x4c,0xc0,0x25,0x1f,0x6b, - 0x64,0x5d,0x05,0x89,0x38,0x3f,0x0a,0x06,0x1f,0xda,0x14,0x45,0x0d,0x77,0x0d,0x96, - 0x96,0x07,0xa9,0x10,0x91,0xc4,0x53,0x51,0x42,0x92,0xc5,0x85,0x2c,0xe6,0x64,0x81, - 0x9c,0x94,0x9c,0xe1,0xc3,0xbb,0x4d,0x69,0xd5,0x24,0xa0,0xd7,0xd7,0x0b,0x57,0xdd, - 0x84,0x11,0xdd,0xd0,0xff,0xd1,0x53,0x1d,0x86,0x49,0xa6,0x30,0x0b,0x5a,0x28,0x6d, - 0xa6,0x27,0x51,0xb8,0x15,0xf7,0x1b,0x01,0x71,0x5b,0xcb,0x47,0xd8,0x29,0xc2,0x8d, - 0x7e,0x08,0x95,0x15,0x3b,0xb9,0x84,0x81,0x76,0xe8,0x5d,0x07,0x6d,0x24,0xa4,0x62, - 0xb8,0x55,0xa2,0x0e,0xd5,0xfc,0x9a,0x20,0x97,0x28,0xce,0xa1,0xdf,0x7d,0xdb,0x9b, - 0x69,0xad,0x0a,0x32,0xd6,0xdd,0x96,0x69,0x9c,0xda,0xc6,0x45,0xc4,0x0d,0x3f,0x8a, - 0xea,0xdb,0xb2,0x7c,0x38,0x17,0x59,0x49,0x59,0x9b,0xa0,0xf5,0xce,0x5b,0x8f,0x95, - 0x21,0x96,0x97,0x6c,0x1e,0xde,0x81,0xb2,0x4b,0x75,0xc7,0x8d,0x8d,0x47,0x58,0x28, - 0xb3,0xa3,0x46,0x4a,0x62,0x47,0xe6,0x85,0xb0,0x73,0x88,0xe9,0x8f,0xf3,0x91,0xa4, - 0x01,0x42,0x69,0x23,0x39,0x4d,0x06,0x91,0xb5,0x95,0xde,0xae,0xde,0x75,0x3e,0x43, - 0x53,0x6f,0x27,0xd2,0xc1,0xfc,0x0f,0x85,0x38,0x96,0x43,0x94,0x5d,0xf8,0x50,0x7e, - 0x54,0x02,0x30,0xad,0x90,0x32,0x07,0x91,0x3d,0x77,0xdf,0x1d,0xdb,0xff,0x3a,0xf3, - 0x74,0xff,0xba,0x9b,0xef,0xad,0x14,0x22,0x06,0xdd,0x80,0x18,0x35,0x7b,0x76,0x2d, - 0xe8,0x88,0xee,0xc4,0xf8,0x4b,0x0a,0x21,0xba,0x9c,0xfe,0x08,0x50,0xa1,0x3f,0x64, - 0x0d,0x60,0x62,0xfb,0x1d,0xdf,0x4f,0xc3,0x88,0xc7,0x76,0x53,0x2f,0x0c,0x11,0x00, - 0xea,0xd2,0x49,0x51,0xeb,0x29,0xf5,0xaa,0xc0,0x71,0x26,0xa6,0xa5,0xac,0x10,0x68, - 0x4a,0x05,0xbe,0xf4,0xfb,0x9e,0x70,0xea,0x43,0x74,0xe9,0x94,0xad,0xcb,0x11,0xcf, - 0xe6,0xfa,0x93,0x54,0x15,0xb5,0xbf,0x84,0x85,0x41,0x88,0xc6,0x43,0x65,0xd4,0x45, - 0x8b,0xeb,0x3c,0xa9,0x92,0x99,0x91,0x25,0x8b,0x5d,0x07,0x96,0xe0,0xcb,0xa5,0xc2, - 0xf7,0x0f,0xb0,0x4a,0xbd,0xf2,0x4c,0xb6,0x3a,0xe1,0xd1,0x71,0x5b,0xda,0x06,0xf5, - 0x0c,0xa5,0x80,0x32,0x17,0xdd,0x4b,0xf7,0xed,0xc1,0xb2,0x3c,0xb9,0x73,0x6a,0x1a, - 0x57,0x04,0x86,0xf3,0x1a,0x6b,0x9a,0xde,0x5b,0x04,0x20,0xdc,0x5d,0x27,0x9c,0xa9, - 0x69,0xd8,0xc9,0xe5,0x79,0x68,0x17,0x49,0xdc,0xc1,0x74,0xdb,0xeb,0x9c,0x79,0x64, - 0xc7,0x61,0x30,0xfb,0x89,0xd6,0x0d,0x05,0x6e,0x4f,0xcf,0x9d,0xf3,0x62,0xc0,0x37, - 0xc0,0xdd,0x94,0x73,0x7c,0x90,0xc5,0x98,0xca,0x53,0xb2,0xe9,0x9c,0xcd,0x13,0xc7, - 0xec,0xf8,0x0a,0x44,0xa8,0x99,0x9a,0x3c,0x02,0x56,0xc6,0x32,0x72,0x22,0xb9,0x4b, - 0xca,0x83,0x7e,0x16,0xe9,0x2e,0x48,0xe3,0xcb,0x7e,0xeb,0x88,0xf3,0xab,0xd7,0xa5, - 0x8b,0x61,0x1b,0xfd,0xcd,0x7d,0xbc,0x8d,0x9d,0x4b,0xff,0xe9,0x53,0xec,0x5d,0x53, - 0x85,0xa6,0xe6,0x85,0x31,0x12,0x1c,0xb0,0xe7,0xa1,0xa8,0xc2,0x08,0x3f,0x0c,0x76, - 0x12,0x9f,0x8f,0x10,0x47,0xd3,0xd9,0x58,0xb6,0x1c,0xde,0xf3,0x90,0xd7,0xfd,0x09, - 0x05,0x94,0xbf,0x63,0x92,0x23,0x2f,0x47,0xc2,0xa3,0xd4,0xc3,0x82,0x76,0xb5,0x99, - 0x83,0xfe,0xc5,0x80,0x82,0x36,0x0b,0x8d,0x46,0xfe,0x0a,0x31,0xf4,0xf0,0xa8,0x53, - 0x56,0x1c,0x04,0xdc,0x81,0xc0,0x6a,0x30,0xa8,0x3d,0xea,0x50,0x0e,0xdb,0xb6,0xd2, - 0x63,0x98,0xca,0x8b,0x8e,0xc9,0x9d,0xb7,0x82,0xf3,0xda,0x54,0x9a,0xcf,0xc7,0xba, - 0x68,0xc7,0xd2,0x3d,0xb2,0x8d,0x95,0xa5,0x9a,0x5c,0x84,0x9b,0x72,0x37,0x14,0x4e, - 0x44,0x0c,0x16,0xd5,0xb5,0xa7,0xc1,0x75,0xea,0xd8,0xcf,0x0a,0x0c,0xfa,0x46,0x28, - 0x50,0x58,0x5c,0x9c,0xbd,0x9b,0x58,0xc8,0x6c,0xd5,0xde,0x2c,0xf5,0x63,0x57,0x4a, - 0x4a,0x39,0x82,0x9c,0x1b,0x48,0xf2,0x2a,0x79,0x51,0x66,0x34,0xdc,0xff,0xef,0xb1, - 0x2f,0xab,0x17,0xad,0x88,0x7a,0xef,0x41,0x3f,0x17,0xab,0xcb,0x32,0x8b,0xf7,0x91, - 0xca,0x8a,0x0f,0xdc,0xb9,0x79,0x99,0xcb,0x4e,0x40,0x9f,0x5b,0xca,0x8d,0xa1,0xbe, - 0x09,0x5c,0xa2,0x35,0x2a,0x7e,0x1e,0x69,0x59,0x11,0x84,0x13,0x7c,0xe6,0xd4,0xab, - 0x60,0x16,0x97,0xfb,0x9e,0x36,0xe6,0xbf,0xa9,0xfd,0x96,0x68,0x92,0xc7,0xaf,0x68, - 0x88,0x3d,0xc4,0x27,0x66,0xef,0xef,0xd8,0x9e,0x11,0x4d,0x69,0xa9,0x59,0x4e,0xf9, - 0xf5,0xbf,0x4e,0x35,0x7b,0x72,0x57,0xf0,0xd8,0x5a,0xcd,0x03,0x04,0xd2,0xbf,0x7d, - 0xe5,0x9b,0x58,0xa6,0x24,0xf0,0x75,0x50,0x77,0x3e,0x70,0x62,0x40,0xfb,0xf2,0x84, - 0x36,0xcc,0xae,0x92,0x10,0xad,0x7c,0xda,0x92,0x8c,0x00,0xcd,0xd8,0x1c,0xca,0xe5, - 0xb7,0x74,0x61,0xbb,0xda,0xa8,0xc9,0xab,0x63,0xc6,0x89,0x41,0x27,0xf2,0xd1,0x55, - 0xb9,0xcd,0x89,0x37,0xa6,0xde,0xc2,0xf4,0x1b,0xcb,0xde,0xc8,0x20,0x75,0x5e,0x92, - 0xd8,0xc6,0xb9,0x5d,0xf3,0xc8,0x36,0x8a,0xe7,0x86,0xd4,0x1b,0xde,0x52,0xc4,0x20, - 0xcd,0xec,0xb7,0x42,0x11,0x3f,0x1e,0x17,0x41,0x8d,0x24,0x05,0x04,0x67,0xe9,0x7a, - 0x85,0x04,0x83,0x43,0x95,0xe4,0xf9,0x7b,0x4b,0x4b,0xd5,0xd8,0xd0,0x7c,0x16,0x21, - 0x45,0x87,0x18,0xae,0x87,0xe5,0x2b,0xb3,0x8b,0x85,0x86,0x04,0xf9,0x8b,0xb1,0xfb, - 0x78,0x4e,0xf8,0x0a,0xbb,0xac,0x34,0x54,0x92,0x87,0x49,0x15,0x20,0x73,0xae,0xba, - 0x39,0x59,0xf3,0x71,0xb8,0x08,0xd1,0xdc,0x7e,0x17,0xe0,0x3c,0xee,0x30,0xfc,0x9d, - 0xae,0x3b,0xb3,0x8b,0x99,0xa6,0x13,0x3b,0x2d,0xd1,0xb3,0xe8,0x21,0x5c,0x15,0x27, - 0x76,0xe7,0x38,0xf9,0x38,0xc5,0x83,0xfc,0x0f,0x9b,0xda,0x7f,0xc9,0xf0,0x19,0x0d, - 0x3d,0xa8,0xe1,0xa4,0xc2,0x1d,0xfa,0x3b,0x7d,0x3a,0x95,0xae,0x14,0x41,0x66,0xa5, - 0x0c,0xef,0xca,0x43,0x64,0x4d,0xc0,0x9a,0x0f,0xdd,0xc4,0xdb,0xd2,0x5b,0xdb,0xd0, - 0x7f,0xcc,0xb8,0x4f,0xe5,0xce,0xa9,0x67,0xfd,0x38,0xb8,0x5f,0x29,0x51,0x32,0xc4, - 0x6a,0x30,0x2b,0x87,0x29,0x1f,0xa1,0x7f,0xeb,0xa3,0xf3,0x7b,0x57,0x52,0xdc,0xa2, - 0x58,0x5a,0x2c,0xae,0x35,0xf0,0x04,0x56,0x6c,0x91,0x6e,0x3a,0x47,0x06,0x72,0x70, - 0x6d,0x14,0x16,0x13,0x3b,0x3b,0x6c,0xb7,0x45,0xc0,0x49,0x32,0x70,0xa1,0x7c,0x4b, - 0x01,0x4d,0xb1,0xec,0x87,0x97,0x25,0x8e,0xa0,0xd3,0x0f,0x47,0xee,0xda,0x3f,0x82, - 0x5e,0x88,0x7a,0x68,0x4e,0xdd,0x24,0x37,0xb0,0x97,0xe4,0x94,0x10,0x9f,0xa4,0x86, - 0x16,0x9c,0x1b,0xb5,0x71,0xda,0xae,0xe7,0x42,0x59,0x24,0xa1,0xa8,0xfc,0x54,0xb4, - 0xd4,0x85,0x7f,0x91,0x39,0x1a,0x42,0x96,0x44,0x95,0xb7,0xa5,0x1d,0x56,0xe5,0xc1, - 0xbb,0x8d,0x02,0x87,0xf2,0x1b,0x2c,0x85,0x41,0x97,0x75,0xe4,0x0f,0xb4,0xd5,0x28, - 0x2a,0x3a,0x7e,0xa4,0xcf,0xd5,0x49,0xed,0xe1,0x4c,0x83,0x42,0x7f,0x4a,0x3a,0xec, - 0xdf,0xf6,0x98,0x5e,0xe6,0xfa,0x08,0x7b,0x4f,0xf0,0x72,0x55,0xf1,0x05,0xc1,0xfc, - 0xa2,0x1f,0x02,0xec,0xe3,0xfb,0x3f,0xdc,0x92,0x04,0x25,0x34,0x7e,0x79,0x40,0xcb, - 0xfc,0x81,0x2f,0xb6,0xbf,0xca,0x6e,0xa9,0x49,0x05,0xd0,0x5f,0x7c,0xe5,0x2b,0x5b, - 0x89,0x10,0xa3,0x6d,0xbc,0xdb,0x6f,0xcc,0xa1,0xb7,0xe6,0x20,0x9a,0x3d,0x2c,0x51, - 0xd5,0x31,0x22,0x1e,0x40,0x13,0x60,0xf4,0x04,0x28,0xf0,0x4e,0x97,0x46,0x51,0x45, - 0xda,0x14,0xd0,0x7e,0xb2,0x3b,0x00,0xfc,0x0c,0x18,0x3e,0x26,0x16,0x50,0xab,0x51, - 0x5d,0xf0,0x70,0xbd,0x55,0xbd,0xa5,0x1b,0xde,0x2f,0xe5,0xee,0x01,0x73,0x4f,0x31, - 0x5e,0x16,0xee,0x9f,0xbb,0x97,0xac,0x08,0x63,0xd2,0x2b,0x9f,0xb5,0x91,0x62,0x01, - 0x03,0x40,0xbe,0xa5,0x9f,0xd6,0x5b,0xb0,0xbf,0xed,0xf6,0x19,0x51,0xa0,0x6e,0xc9, - 0xea,0x12,0x70,0x37,0x60,0x8c,0xd8,0xb4,0x12,0x05,0xde,0x2b,0x19,0x62,0x25,0x7a, - 0x69,0xc1,0x89,0x00,0x79,0x01,0xc5,0x66,0x1e,0x48,0x51,0xfd,0xc3,0x20,0x37,0xa0, - 0x43,0x03,0xdd,0xd2,0x5b,0xd2,0xb5,0x42,0xa7,0xe5,0x85,0xdd,0xf5,0xe8,0x09,0x44, - 0x5e,0x0e,0xd9,0x26,0xe5,0x22,0x0b,0x26,0xbf,0x05,0x40,0xe6,0xe8,0x5a,0xb5,0x17, - 0xfa,0x73,0x73,0x70,0x9c,0x23,0x23,0x57,0xe2,0xfa,0xb1,0x16,0x85,0x24,0x3f,0x46, - 0x23,0x39,0xe1,0x30,0x33,0x99,0x31,0xd7,0x9c,0x4b,0xe9,0xfa,0x50,0x51,0x13,0x53, - 0x30,0x9e,0xbc,0x82,0x32,0xd1,0xc9,0x93,0xb4,0x63,0xb9,0xde,0x08,0x6a,0x7c,0xbd, - 0x80,0xb5,0x8a,0xe4,0xf1,0x3b,0x5d,0xdb,0x7e,0xe5,0x96,0xce,0xa4,0xab,0x18,0xe7, - 0xf6,0x84,0x5c,0xee,0x38,0x19,0x4f,0x1b,0x25,0xe9,0x6d,0x18,0xa6,0xbc,0x05,0xa9, - 0x61,0xb0,0xf9,0xed,0x94,0x87,0x45,0xbb,0xc8,0xe5,0x20,0x9c,0xde,0xd3,0x59,0xe6, - 0x7e,0x49,0x4b,0xc5,0x3d,0x86,0x4b,0x4a,0x92,0xf4,0x8e,0x2c,0xe1,0xe0,0x23,0x6c, - 0x7c,0xa3,0xa2,0xe7,0xdd,0x21,0x8d,0x2a,0xb2,0x45,0x35,0xee,0xe0,0xf2,0xfe,0x3a, - 0xe0,0x8e,0xbf,0x93,0xba,0x9b,0xe8,0x81,0x7b,0xb1,0x2b,0x50,0xfa,0x92,0xe7,0x2b, - 0x61,0x6d,0x20,0x69,0x15,0x28,0x60,0xb4,0xee,0xd5,0xeb,0xf3,0xfe,0x68,0xa7,0xca, - 0xa9,0xa2,0xab,0xf6,0x0c,0x22,0x64,0x26,0x1e,0xd2,0x82,0x5c,0x7e,0x03,0xc3,0x7f, - 0xad,0xbd,0xba,0x34,0xbf,0xc6,0xef,0x91,0x06,0xff,0xf5,0x80,0x13,0xb9,0xcc,0x48, - 0x0e,0xbc,0x60,0x0a,0x30,0xe2,0x4a,0x43,0x0b,0xfc,0xce,0x1b,0x9a,0x15,0x12,0x1e, - 0x4b,0xa3,0x8d,0xd5,0x59,0xb1,0xc7,0x51,0x1f,0xf1,0x02,0x56,0x74,0xff,0xdd,0xf1, - 0xf7,0xbe,0x36,0x10,0x46,0xce,0xcd,0x51,0xe5,0x76,0xa5,0x85,0xf1,0xcc,0x12,0xc6, - 0xea,0x97,0x96,0x73,0x16,0x5a,0x04,0x6d,0xc1,0x15,0xec,0x17,0x4c,0x35,0xf7,0x36, - 0x33,0xe8,0x96,0xd6,0x80,0x9c,0xe9,0x90,0xd7,0xaf,0xa5,0x92,0x57,0xf8,0xe1,0xe5, - 0x91,0x52,0xfb,0x71,0x78,0x1c,0x8e,0xca,0x9d,0x47,0x8f,0x81,0x9a,0x67,0xb5,0x53, - 0x23,0xaf,0x9b,0x5f,0x97,0x98,0xcd,0x82,0xd3,0xf6,0xa3,0xc8,0x18,0x74,0x4d,0x18, - 0xd3,0xb5,0x2a,0x09,0x4c,0x97,0xb7,0xdb,0x46,0x53,0xac,0x1c,0x5e,0xe7,0x4c,0x1c, - 0x7a,0xb5,0x86,0x3c,0x3f,0xa3,0x55,0xeb,0x03,0xfa,0x3e,0xa6,0xf5,0x38,0xd3,0xce, - 0x72,0x10,0xd3,0x4a,0x72,0xeb,0x97,0x8a,0x7c,0x18,0xa8,0xdd,0xf4,0xd5,0x59,0x28, - 0x42,0xf8,0x28,0xdd,0xef,0x20,0x61,0x0c,0x9e,0x5b,0x5b,0x38,0xba,0x88,0x7e,0x18, - 0x26,0xe3,0x66,0xbe,0x58,0xdb,0x6e,0xd8,0x36,0xf3,0xa8,0x4d,0x91,0x3f,0x66,0x34, - 0xcf,0x66,0x6e,0xae,0x59,0xda,0x20,0xff,0x4f,0xf0,0xe6,0x03,0x92,0xcc,0xd7,0x35, - 0x22,0xe5,0xb9,0xca,0x9e,0x91,0xf7,0x9b,0x88,0xb9,0x47,0x9e,0x8e,0xdf,0x5e,0xca, - 0xf4,0x77,0xb1,0xda,0x9f,0xb4,0x4e,0xc8,0x4a,0xde,0x0b,0x03,0xdf,0x80,0x6b,0xf7, - 0xed,0xc3,0xf4,0xc1,0xca,0xa8,0x6b,0x22,0x2c,0xcd,0xb8,0x1a,0xbf,0xa4,0x2c,0xd2, - 0x01,0xa5,0xe3,0xde,0xb4,0x28,0x26,0x41,0x6b,0xc8,0x1c,0x12,0xa1,0xa2,0x39,0x1b, - 0x0b,0x04,0xbf,0x24,0x54,0xe0,0xce,0x59,0xc2,0x58,0x8b,0x97,0x5c,0x4d,0x16,0x97, - 0xd6,0xc7,0xad,0x77,0x8a,0xe1,0x79,0xb7,0x96,0xe4,0x0e,0x92,0x48,0x1e,0xf7,0x32, - 0x86,0x9b,0x83,0x62,0x94,0x63,0xdb,0x4d,0x67,0x91,0x17,0x42,0xf3,0x3b,0x09,0x76, - 0xa6,0x7a,0xd0,0xad,0x33,0x2e,0x6f,0x81,0xc3,0x48,0x68,0x2d,0xaa,0x59,0x5f,0xe6, - 0xe7,0x82,0xb6,0x25,0x65,0xc3,0xbe,0x47,0xa5,0xbe,0xf0,0x01,0x29,0x8a,0x53,0xa9, - 0x7c,0x58,0xf2,0x6b,0x7c,0xe3,0x2b,0xc4,0x2c,0xa3,0xd2,0x09,0x06,0xa6,0x06,0x71, - 0x44,0x8b,0xe9,0x28,0x7f,0xb9,0x7a,0x27,0x4a,0x52,0x1f,0x60,0xa9,0xb4,0x54,0x27, - 0xe4,0x38,0xf0,0x28,0x77,0x9a,0x44,0x96,0xbc,0xcd,0x56,0xa5,0xac,0x60,0x1d,0x32, - 0x01,0xe8,0xb5,0xa3,0x77,0xee,0x93,0x58,0xaa,0x7b,0x89,0xc4,0x6f,0xab,0xef,0x9e, - 0x83,0x01,0xd5,0x18,0x3c,0x74,0xaa,0x2a,0xef,0x40,0x9b,0xd5,0xbe,0xef,0xbf,0x88, - 0x39,0x6c,0xd8,0xfe,0xf0,0x03,0xe2,0x08,0x0d,0x3c,0xab,0xf2,0xf9,0xea,0x00,0x24, - 0x2b,0x52,0xd2,0x6f,0xbe,0x2c,0xea,0xf8,0xcf,0x74,0x82,0x5a,0xb4,0x89,0x1e,0xa1, - 0x88,0x3e,0x47,0x2d,0xba,0x0f,0x2d,0x89,0xee,0x4b,0x86,0x10,0x7d,0x8b,0xab,0x47, - 0xd0,0x2b,0xf6,0xac,0x1b,0x22,0x43,0xab,0x93,0xc9,0xc3,0x8c,0xe9,0x8a,0x88,0xf1, - 0x42,0x66,0x85,0xe0,0xcb,0x1d,0x0a,0x16,0x0c,0x6a,0xa6,0xa7,0x8f,0x7d,0xcf,0x61, - 0x1f,0xb4,0x28,0xe5,0x1f,0xfe,0x6a,0x41,0x5f,0xd5,0xc0,0x9f,0x9e,0xb5,0x5b,0x2f, - 0x4d,0x31,0xf1,0x40,0x6a,0xba,0x4b,0x0f,0x11,0x71,0x61,0x5d,0xd0,0x79,0xbb,0x82, - 0x87,0x18,0xab,0x43,0xb3,0x29,0xec,0x37,0xb6,0xc9,0x87,0x07,0x13,0x5c,0x42,0xa2, - 0x67,0x2f,0xb9,0xf7,0x06,0x1b,0x63,0x11,0xe2,0x59,0xce,0x43,0x81,0x9a,0x54,0x95, - 0x29,0x6a,0x92,0xd1,0x13,0xaa,0xec,0x81,0x24,0x73,0x6c,0x07,0x78,0xf1,0x4d,0x3b, - 0x6a,0xd7,0x45,0xb5,0xd4,0x71,0x27,0x54,0x0d,0xb2,0xcb,0xca,0x28,0x2b,0xb6,0xd3, - 0x25,0xc0,0x55,0x28,0xa7,0xfa,0xe1,0x03,0x67,0xc8,0xa3,0x27,0xf7,0xec,0xa6,0xbb, - 0x4a,0x37,0xef,0x0a,0x76,0x4c,0x0e,0xda,0x64,0xd3,0x12,0x8a,0x97,0x9c,0x50,0x2b, - 0x2b,0x03,0x6e,0x77,0xf8,0xbd,0x75,0xa5,0x6c,0x29,0xc1,0x99,0xdc,0x26,0xf5,0xf9, - 0xc6,0x39,0x10,0x3b,0x48,0x19,0xb7,0x88,0x78,0x98,0x8f,0x55,0x50,0xf7,0x5b,0x5b, - 0xff,0x36,0xa8,0xec,0x97,0xd5,0x66,0xb1,0x48,0x24,0x0b,0xdd,0x02,0xe0,0xfe,0xa8, - 0xdd,0xf9,0x49,0x2c,0x92,0x41,0xe6,0xb0,0x9b,0x40,0xd6,0x1e,0x01,0xb3,0x0a,0x26, - 0xaf,0x66,0x34,0xcf,0xba,0x2d,0x85,0xf3,0xc2,0xc6,0xc4,0x16,0x56,0xb2,0x5f,0x30, - 0xaa,0x0e,0x9f,0xeb,0x8d,0xc8,0x58,0x94,0x37,0xb3,0xf6,0x1f,0x01,0xb1,0xe1,0x22, - 0x02,0xdd,0xd5,0x37,0x3d,0x70,0xff,0xdf,0x6d,0xdb,0xa6,0x37,0x58,0xbe,0x60,0xb6, - 0x5e,0x0d,0x3a,0xe4,0x1c,0xdf,0x69,0x46,0x61,0x00,0xd8,0xb1,0x56,0x32,0x76,0x2c, - 0x83,0xc6,0x24,0x91,0x79,0x2c,0x38,0x5a,0x61,0xb3,0x5a,0xd7,0x84,0x0d,0x7f,0x38, - 0x2c,0x0f,0xa1,0xb9,0x79,0x5b,0x31,0x81,0x88,0x53,0x0f,0xcc,0x4c,0x20,0x5e,0x73, - 0x6a,0xf2,0xf7,0x3d,0x78,0x5a,0x9f,0x42,0x8a,0x2d,0x5d,0x6b,0xdf,0x7d,0x5a,0x45, - 0x21,0xcc,0xf7,0x69,0x6d,0xaa,0xe8,0x9e,0x52,0x09,0x7b,0x42,0xbf,0x06,0x88,0xc5, - 0x8b,0x0d,0x73,0xd0,0x25,0x93,0xf4,0x54,0x28,0xc6,0xa7,0x07,0x2b,0xb0,0x81,0xcd, - 0xc9,0x68,0x1a,0xda,0x94,0x2d,0xae,0xe5,0xf5,0xc3,0x7a,0xe0,0x41,0x79,0x5c,0xd5, - 0x95,0xee,0x92,0xca,0xec,0xa9,0xeb,0x80,0xa9,0x56,0xca,0x5f,0xef,0x77,0xb6,0x6a, - 0xe3,0x0b,0xc0,0x6c,0x16,0xaa,0x70,0x29,0x49,0x08,0xef,0xd3,0xd7,0xd5,0x9b,0x18, - 0xe0,0x93,0x8d,0x2c,0x15,0x20,0x00,0x39,0x68,0xa9,0x90,0x4e,0xb2,0x78,0x5d,0x20, - 0x8c,0xa1,0x9b,0x04,0xda,0x23,0x33,0x09,0x21,0xe0,0x74,0x57,0x0e,0x62,0x19,0xe6, - 0x76,0xf6,0x0b,0x5c,0x8c,0xde,0x42,0x27,0x2c,0x40,0xc2,0xb2,0x3c,0xea,0xae,0xcc, - 0x44,0x98,0x19,0xd3,0x1c,0xd5,0x68,0x9b,0x7a,0xe1,0xf2,0x78,0x8f,0x29,0x5b,0xb0, - 0x1d,0x40,0xca,0x2e,0xe0,0xd6,0x52,0x7c,0xc3,0xdb,0xb3,0x96,0xa4,0x01,0x4b,0x69, - 0x6b,0xa1,0x47,0xa0,0x9f,0x75,0x42,0x2e,0x00,0xd4,0x6d,0xe8,0x0f,0x0c,0x1b,0x2b, - 0x87,0xa4,0x8b,0xa1,0x3b,0x6d,0x65,0xa0,0x30,0xd4,0xb9,0x3d,0xda,0x2f,0x97,0x68, - 0xb6,0xdf,0x88,0xc8,0xcc,0x49,0x4d,0x81,0xc5,0xdf,0x25,0xa6,0x32,0x6b,0x1a,0xf2, - 0x49,0x1c,0x98,0x64,0xce,0x7e,0x45,0x22,0x84,0xf0,0x1f,0x45,0x41,0x04,0xba,0x70, - 0xd4,0x12,0x45,0xf5,0x5a,0x29,0x4d,0xa5,0xe9,0x0a,0x54,0xc3,0xd2,0x5f,0x73,0xa8, - 0x92,0x87,0x81,0xd9,0x50,0x35,0x25,0x4f,0x6c,0xfe,0xbd,0xbc,0xc2,0x21,0x41,0x38, - 0xd4,0xaf,0xfe,0x57,0x46,0x9b,0x63,0xdd,0x92,0x85,0x90,0x60,0x44,0x32,0x92,0x87, - 0x25,0xf7,0x18,0x75,0x00,0xe9,0x8d,0x83,0x10,0x55,0x3f,0xb4,0x3f,0xa0,0x42,0x2c, - 0xe2,0x54,0x15,0x36,0x90,0x92,0x95,0x79,0x23,0x14,0xc2,0x16,0xc6,0x18,0xab,0x11, - 0xaf,0x5a,0x75,0x2b,0xa3,0x7a,0x02,0xb1,0xe5,0xc7,0x4c,0x86,0xcb,0xf5,0xbe,0xb8, - 0x28,0xb7,0x77,0xe1,0x9b,0x23,0x85,0x3a,0x68,0xf5,0x2e,0x0c,0xdd,0x18,0x8e,0x6b, - 0x55,0x1f,0x9a,0x47,0x0a,0x89,0x47,0x3e,0x8c,0xf8,0x8f,0xdc,0x7d,0x51,0x57,0x01, - 0x0d,0x99,0xe7,0xfb,0x9b,0x7a,0x00,0x37,0xe9,0x9b,0xc9,0x85,0x46,0xd7,0xfd,0x04, - 0x40,0xaa,0xb1,0xa4,0x1e,0x2b,0x27,0x47,0x66,0xf6,0x08,0xcf,0xca,0x7d,0x44,0x2e, - 0x55,0x1c,0x39,0xfd,0x14,0x93,0x2f,0x97,0x2a,0xf3,0xa8,0xc1,0x32,0x4d,0xb5,0xd0, - 0x8e,0xe2,0xb0,0xe4,0xb6,0x90,0x16,0xfd,0x00,0x0c,0x0e,0x0f,0x55,0xd2,0xd7,0x21, - 0xb2,0x53,0xd0,0xbe,0x9c,0xed,0xc6,0xae,0x28,0xde,0xf7,0x3b,0x1b,0xd1,0x16,0xc0, - 0x0e,0x80,0x1b,0x42,0x50,0xce,0x5d,0x8b,0x00,0x2e,0x4e,0x0e,0xc3,0xd2,0x7e,0x3a, - 0x04,0x21,0x3d,0x82,0x75,0x07,0xb0,0x03,0x11,0xc3,0x4b,0x46,0x1e,0x62,0xc9,0x64, - 0x24,0xf1,0x9b,0x2f,0x13,0xf3,0x82,0x52,0x0f,0x83,0xae,0x06,0x59,0xea,0x19,0xf0, - 0xb8,0x99,0xb5,0xf1,0x6c,0x73,0x32,0xaf,0xf7,0xc4,0xa9,0xbe,0x96,0xeb,0x17,0xc2, - 0xa4,0x63,0xf4,0x93,0xdb,0x87,0x71,0x99,0xf6,0xc5,0x28,0xdf,0xc3,0xae,0x71,0x18, - 0x35,0xd2,0xba,0x54,0xf7,0x0b,0x70,0x8f,0x36,0x6f,0x2f,0xdb,0xb7,0x3b,0x40,0xa1, - 0x37,0x28,0x8e,0x8f,0x14,0x75,0xcb,0xc2,0x41,0x3c,0xc7,0x66,0xbc,0xd4,0xdb,0x23, - 0xc6,0x07,0xf4,0x34,0xae,0xca,0xa6,0x5f,0x3a,0x65,0xaf,0x4a,0x29,0x16,0x78,0x33, - 0x99,0x78,0x29,0xfb,0x04,0x26,0x8a,0x83,0xe4,0x66,0xc7,0x5e,0x58,0x11,0x18,0xfc, - 0x3f,0x5c,0xaa,0x8e,0x54,0xb9,0x8d,0xdc,0x6f,0x58,0xe2,0x4c,0x3c,0x43,0x64,0xfa, - 0x6f,0x92,0x6a,0x92,0x26,0xeb,0x60,0xc5,0xea,0x87,0xe3,0xb2,0xf8,0xea,0xd9,0xf8, - 0xb1,0x27,0x94,0xaf,0x6c,0x5b,0x9b,0x33,0xff,0xeb,0xa2,0x81,0x5c,0x18,0x88,0x6d, - 0x72,0x82,0x6d,0x05,0x9c,0xeb,0xfd,0xc6,0xcd,0x8a,0x07,0xb6,0xb6,0xfa,0xa2,0x9a, - 0x48,0x77,0xa6,0xca,0x28,0x2a,0x63,0x99,0xca,0x41,0xba,0x5e,0x3d,0xee,0xea,0x28, - 0x3c,0xac,0xca,0x31,0x92,0x20,0x42,0x9a,0x4b,0xe9,0xa0,0x63,0x59,0xbe,0x67,0x6f, - 0xe5,0xf7,0xe1,0xad,0xd6,0x9f,0x21,0xe0,0x25,0xaa,0x33,0xc3,0x58,0x51,0x93,0xa7, - 0x79,0x74,0x8d,0x62,0x74,0xcc,0x39,0xff,0xf1,0x8f,0x1b,0x46,0x24,0x64,0x5c,0xa5, - 0xcd,0x41,0x9a,0xba,0x93,0xa0,0xa7,0x30,0x64,0x7d,0x4e,0x4e,0xea,0x3b,0x12,0xaf, - 0x86,0xf4,0x92,0x36,0x92,0xf3,0x90,0xc1,0x47,0x77,0x7a,0x21,0x74,0x51,0x5d,0x01, - 0x42,0x21,0x9b,0xba,0x13,0xa2,0x22,0x3d,0xe7,0x10,0xb3,0xe1,0xa4,0xb0,0x13,0x33, - 0x06,0x38,0x6c,0x46,0x8e,0x87,0xac,0xc0,0x99,0x75,0x87,0x48,0xf3,0xea,0x65,0xa4, - 0xdd,0xd6,0xda,0x62,0xe0,0x1b,0x52,0xce,0x5e,0x79,0xe1,0xa1,0xbc,0x4e,0xe9,0xb4, - 0xd0,0x85,0xd6,0x25,0x43,0x1a,0xb8,0x01,0x5f,0x75,0x95,0x09,0xfa,0x53,0xbc,0xf1, - 0x82,0x8d,0x76,0x67,0x5b,0x16,0x60,0x83,0xf6,0xba,0xbd,0x7f,0xf0,0xa5,0xd5,0x2c, - 0x94,0x67,0x7a,0xa4,0xc7,0xb4,0xe8,0xf1,0x04,0x95,0x68,0xb7,0xab,0x5a,0x37,0x8b, - 0x1f,0x2e,0x66,0x1a,0x97,0x64,0x23,0xea,0x70,0xb6,0x2e,0xdd,0x41,0x7f,0x82,0x05, - 0x2e,0x49,0xc7,0x75,0xc2,0xd7,0x00,0x87,0xa7,0xa8,0x84,0x56,0x55,0xb6,0x9f,0x74, - 0x45,0x8b,0x0b,0x0a,0x69,0xd8,0x09,0x0b,0x26,0x4b,0xb3,0xa7,0xb4,0x83,0x75,0xff, - 0xc5,0x8a,0x90,0x00,0x4c,0x6d,0x37,0xb3,0xde,0x0f,0x9f,0xe7,0x14,0x82,0xde,0x30, - 0x3e,0xd1,0x58,0xdf,0xdf,0x13,0xa7,0x71,0x1d,0x2a,0x63,0xde,0x7a,0x23,0xfe,0xa9, - 0x1f,0x3c,0x79,0xe0,0x4b,0xa8,0xbe,0x87,0x9c,0x70,0xf8,0x7a,0x49,0x36,0x18,0x4f, - 0x99,0x1b,0xf4,0x3c,0xc6,0x13,0xc0,0x5a,0x1a,0x5d,0x48,0x28,0x28,0xf4,0x57,0xeb, - 0xb7,0x80,0x7a,0xd7,0x3f,0x7f,0x30,0x14,0xd8,0xdf,0xf9,0xd3,0xb7,0xce,0x20,0xdb, - 0xe9,0x51,0x98,0x14,0xb3,0x6d,0x27,0x85,0xb0,0x03,0x76,0x52,0xaf,0x66,0xd9,0xab, - 0x89,0xba,0x30,0xd3,0xd3,0x71,0x57,0xc1,0xe2,0x01,0xcc,0x52,0x2d,0x9e,0x19,0x15, - 0x7b,0x40,0x83,0xe3,0xa3,0x73,0xd1,0xb9,0x01,0xef,0xc1,0x2c,0x73,0x79,0x2f,0xb1, - 0xa7,0xa7,0x81,0x1c,0xf2,0x73,0x2b,0x0f,0x62,0xe2,0xf9,0x95,0x8d,0x6c,0x3e,0x7d, - 0xeb,0xbe,0xb9,0x94,0xb1,0x38,0x90,0x01,0x06,0x06,0x40,0xfc,0xd2,0xd9,0x30,0x30, - 0x07,0xa5,0xc1,0xa7,0x63,0x3e,0x78,0xe2,0xc1,0xd0,0x4f,0x87,0x71,0xca,0xe6,0xa3, - 0x42,0xab,0x7e,0x17,0xd1,0xd6,0xd6,0xb9,0x8a,0x97,0xeb,0x96,0xa6,0xc9,0xde,0x22, - 0xd8,0xa6,0x65,0x33,0x6c,0x49,0x01,0x02,0xfa,0x48,0x8d,0x4f,0xab,0xfa,0x56,0xad, - 0x80,0xb3,0x7a,0x8e,0xa2,0x90,0x44,0xdb,0x22,0x95,0xc2,0x29,0x0c,0x73,0xde,0xeb, - 0x31,0xa4,0xda,0x14,0x7a,0x09,0x1c,0x10,0x40,0x2f,0xca,0x35,0xa4,0x66,0x39,0xfa, - 0xae,0xa5,0xd9,0x10,0x3b,0x2c,0x45,0x99,0x23,0xc9,0x75,0x5b,0x2f,0x6c,0x1e,0x5e, - 0x43,0xb1,0xf3,0x9f,0xbb,0xfb,0x7b,0x96,0x3c,0x46,0xfb,0x9d,0x85,0xb6,0xd5,0xd8, - 0xc2,0xfd,0xa4,0x74,0x19,0x8c,0x0b,0xe3,0xaf,0x29,0x3e,0xf7,0x59,0xcd,0xb2,0x2a, - 0xe0,0x0e,0x4e,0xa1,0xec,0x6c,0x21,0x70,0xee,0xf2,0xa4,0x44,0x33,0x9c,0x3b,0x5b, - 0xb9,0x9f,0x03,0x2d,0x10,0x26,0x2b,0x81,0xd8,0x03,0x13,0x0d,0xe7,0x63,0x35,0x65, - 0xb8,0x9e,0x92,0xf3,0x3e,0x34,0x60,0x5e,0x68,0x2a,0xa5,0x40,0x3a,0xcc,0x62,0x20, - 0xcb,0x13,0xd4,0xf3,0x28,0xbf,0xec,0xa8,0xc7,0x11,0x07,0x55,0xd3,0x80,0x6a,0x31, - 0x33,0x5c,0x6a,0x62,0xb6,0x51,0xab,0x01,0x95,0xd2,0xa2,0x88,0x1a,0x7e,0xa9,0x69, - 0x79,0x5f,0x87,0x63,0x11,0x29,0xa0,0x10,0x54,0xd1,0xb7,0x4d,0x62,0xbd,0x6b,0x31, - 0xa2,0xf2,0xd4,0x34,0x14,0x28,0xdd,0xcd,0x21,0x12,0x1a,0xa7,0xc2,0xb5,0xf9,0x87, - 0xe8,0xe5,0xd3,0xa2,0xcd,0x4f,0x2b,0xa7,0xbc,0xdf,0x8d,0xe1,0x74,0x84,0x48,0x2e, - 0xd8,0x8a,0x05,0x33,0xea,0xc8,0x7c,0x7a,0x60,0x35,0x63,0xb6,0xd2,0xa0,0x0d,0x61, - 0x43,0xed,0xc1,0x3c,0xea,0x74,0x75,0x0b,0x13,0xdf,0x93,0x9b,0x73,0x7b,0x17,0xef, - 0xcb,0x14,0xe2,0x92,0x4a,0x91,0x82,0x0e,0xc7,0x4c,0x4e,0xca,0x8f,0x0b,0xc6,0x24, - 0xc1,0xe5,0xd6,0x6a,0xd9,0x23,0xcd,0x07,0x17,0x8d,0xa8,0x4e,0x9f,0x3a,0x6f,0x58, - 0x7b,0x02,0x76,0x18,0x42,0xae,0xc3,0x98,0x6f,0xb2,0xa1,0xc3,0xda,0xf4,0xc7,0x25, - 0x44,0xc3,0x05,0x6b,0x8b,0xdb,0x4c,0xab,0x93,0xbd,0xc9,0x9f,0x7a,0x4d,0x24,0xea, - 0x8b,0x54,0xd6,0x0a,0x5c,0x55,0xb1,0xcb,0x02,0x82,0xff,0x13,0x89,0x74,0x38,0xce, - 0xcb,0x9f,0xd1,0x0b,0xf8,0x5c,0x23,0x8e,0x95,0x30,0x69,0xa3,0xef,0xa1,0x33,0x32, - 0x2d,0xed,0x5e,0xae,0xc8,0xa0,0x27,0x80,0xf9,0x57,0xb6,0x9e,0x84,0x73,0xb2,0x3a, - 0x26,0x13,0xcf,0xc8,0xc5,0xe1,0x68,0x76,0x89,0x5a,0x7e,0x9f,0x41,0x61,0x09,0xaa, - 0xc9,0xe7,0x63,0x4e,0xc3,0x35,0x5e,0x11,0x72,0x12,0xe7,0x03,0xfd,0xaf,0x68,0x17, - 0x02,0xd3,0xd8,0x84,0x36,0x90,0xdc,0xb0,0xd5,0xc8,0xc8,0xa4,0x76,0xd0,0xd0,0x29, - 0x5e,0xc3,0x00,0x13,0xf4,0xba,0x93,0x54,0xb2,0xd1,0xd8,0x96,0x09,0xec,0xfb,0x12, - 0xbc,0x86,0x99,0xef,0x5a,0x6d,0xf2,0x51,0x67,0xd9,0x89,0xcf,0xb4,0xad,0xf8,0xa8, - 0x4d,0xc0,0xf9,0xf1,0xb7,0x81,0x81,0xcc,0xf6,0x7f,0xe0,0x06,0x72,0x8f,0xd8,0xbd, - 0xef,0x55,0x17,0xa0,0x10,0xad,0x4f,0x80,0xc4,0xc7,0x63,0x95,0x22,0x79,0xc4,0x21, - 0x5c,0x23,0x55,0xb4,0x24,0xe9,0x22,0x90,0x41,0xcc,0xdd,0x94,0xb7,0x30,0xcd,0xdc, - 0x85,0xcf,0x45,0x29,0x35,0xc3,0x70,0x01,0x44,0x53,0xf3,0x8c,0x3f,0x77,0xfe,0xac, - 0x6e,0x84,0x51,0x47,0xfc,0xa8,0x95,0x11,0xf4,0x01,0x81,0x46,0xfd,0x48,0x72,0x19, - 0x22,0xab,0xb6,0x8c,0x3e,0x58,0x8a,0x17,0xb3,0xda,0xeb,0xb9,0xb9,0x4e,0xaf,0x5d, - 0xec,0x2f,0x48,0xf7,0x37,0xc6,0x67,0x64,0xe2,0x34,0xbb,0x5c,0xaa,0x14,0x1d,0xab, - 0xae,0x67,0x9b,0x48,0xaf,0x4c,0x8b,0x97,0x41,0xa8,0xae,0xd0,0x5e,0xe9,0x7f,0xe8, - 0xa7,0x06,0xf2,0xbe,0x38,0x54,0xff,0x32,0x62,0x46,0x18,0xdd,0x1d,0x44,0x8e,0xd5, - 0x0f,0xcc,0xe3,0x7c,0xe1,0xed,0xe0,0xe8,0xbe,0x67,0xa6,0x10,0x34,0xef,0x38,0xa9, - 0x21,0x22,0x37,0xa1,0xfe,0x12,0xc2,0x85,0x7c,0xc1,0x10,0x40,0x7d,0x18,0xc4,0xeb, - 0x6f,0x21,0xba,0x09,0x3b,0x51,0x0b,0x4f,0xfd,0x09,0x8d,0xcf,0x8e,0xea,0xbb,0xa8, - 0xa5,0xf0,0x2b,0x93,0x30,0x5b,0xc3,0x81,0xdf,0x82,0xaf,0x0d,0x2c,0x50,0x25,0xf1, - 0x0e,0xdf,0xc2,0xef,0x37,0x30,0x98,0x4a,0xfe,0x1d,0xd4,0xa4,0xf0,0xfd,0x4a,0x33, - 0x37,0xdc,0xf5,0x36,0x90,0x4e,0x62,0x50,0x39,0x55,0xe4,0xb2,0x35,0xbe,0x89,0x6b, - 0x79,0xdf,0x9b,0xee,0xf4,0x7d,0x53,0xca,0x0f,0x03,0xec,0x9f,0x53,0xbf,0x4b,0x33, - 0xa6,0x73,0x01,0x7f,0x2f,0x7e,0x64,0x9f,0x42,0x7e,0xe4,0x8f,0x50,0x9d,0x1a,0x72, - 0xcf,0xf7,0x67,0x42,0x17,0xcd,0x2c,0xe7,0x19,0x2b,0x3b,0xf8,0x54,0x00,0xbc,0x8b, - 0xcc,0xd6,0x68,0x2b,0xc0,0xf4,0x25,0x49,0xc2,0x5f,0x03,0x1e,0x89,0xba,0xee,0x30, - 0x88,0x3b,0x25,0xa7,0x6a,0xbe,0xe5,0xc3,0x84,0x4e,0xa1,0x0f,0x40,0xbb,0x53,0x72, - 0xf6,0x38,0xee,0xd5,0x46,0x2c,0xfa,0x0c,0x90,0xd7,0xfc,0x91,0x04,0xe7,0x18,0x2a, - 0x8b,0x88,0x41,0x71,0x7e,0x67,0xa5,0x5b,0xcf,0x28,0xd4,0xb3,0x7d,0x98,0xdb,0xe4, - 0x8c,0x19,0x4d,0xde,0x7d,0x44,0x5e,0x11,0x34,0x52,0xad,0xd8,0x82,0x54,0x19,0x2a, - 0x0b,0x9c,0xfe,0x18,0x59,0xd6,0x15,0xb8,0x4f,0x2b,0xed,0xb2,0x5b,0xe1,0x57,0x1f, - 0x93,0xdb,0xbd,0x61,0x5a,0xa0,0xb8,0x59,0x04,0x2a,0xf0,0xa0,0x5e,0x7f,0x32,0xdb, - 0x0c,0xec,0xe1,0xb4,0xb1,0x0a,0x2f,0xa8,0xcb,0x83,0x4e,0x15,0x83,0xbe,0xdd,0x7f, - 0xd7,0xde,0x73,0x5a,0x1e,0x49,0x55,0x94,0xbe,0x9f,0x4a,0x85,0xdc,0x08,0x47,0x85, - 0x52,0x1d,0xef,0xd3,0xb8,0xb7,0x76,0x8d,0x51,0x61,0xef,0xe8,0x0f,0xf1,0x5c,0x7a, - 0x46,0x4e,0xe7,0xda,0xc0,0x60,0x7c,0x78,0x1a,0x53,0xab,0xdb,0xff,0xff,0x3a,0xf3, - 0x38,0xaf,0xe0,0x26,0xd3,0x2d,0x2e,0x1d,0xe3,0xed,0xd8,0x39,0x56,0x33,0x1e,0x14, - 0x29,0x1f,0x24,0x6b,0xcb,0xde,0x0d,0x2d,0x49,0xa9,0x58,0x98,0xfa,0x65,0x12,0xf2, - 0xf8,0x03,0xfa,0x22,0x31,0x9d,0x00,0xc1,0xc4,0xb6,0xec,0xa1,0xe6,0x23,0x33,0xe2, - 0x8e,0xac,0x32,0x8f,0x66,0x8e,0x1f,0x19,0xc9,0xd0,0x9b,0x24,0xe1,0x42,0x53,0x48, - 0x82,0xa4,0x27,0x2a,0xc4,0x2c,0xe8,0xee,0x43,0x04,0xc6,0x4c,0xe1,0x29,0xe3,0x9a, - 0xb8,0xfa,0x37,0x27,0x14,0x4b,0x42,0x74,0x60,0x5d,0x18,0x4c,0x91,0x6e,0xed,0xe4, - 0x57,0x65,0x40,0xad,0x7a,0x6b,0xf9,0xd4,0x2b,0x05,0xc9,0xa5,0xb1,0x29,0x10,0x73, - 0x26,0xdd,0x2e,0x95,0xae,0x87,0xee,0x4c,0xc5,0x1c,0xd4,0x85,0xf8,0xc6,0x48,0xf5, - 0x38,0xd3,0xc9,0x3c,0xef,0x97,0x2c,0xe9,0xf7,0x13,0x06,0xeb,0xb1,0x99,0x34,0xc0, - 0x61,0x04,0x4a,0x04,0xaa,0xa4,0x8d,0x56,0x67,0xe6,0xfc,0xc4,0x58,0x4b,0xb1,0x8d, - 0x8d,0x97,0xb9,0xbd,0x67,0xb5,0x13,0x18,0xe5,0xe5,0xf5,0xd4,0x31,0xbb,0xf6,0xe0, - 0x4a,0x90,0xf5,0x21,0x72,0xda,0x88,0x4a,0xce,0x40,0xa5,0x00,0xb1,0xd0,0x3c,0xe8, - 0x1a,0x41,0x51,0x0d,0x78,0x8c,0xa3,0x17,0xc7,0xca,0xc3,0x86,0xff,0xc3,0xb2,0x69, - 0x7b,0x4f,0x1c,0xd8,0xf2,0x0e,0x4d,0x84,0x89,0xcd,0xe2,0x83,0xb2,0x3c,0x8c,0xba, - 0xa0,0x85,0xd4,0x0c,0xb6,0x2d,0x51,0x29,0xba,0x0c,0x42,0xe9,0xaa,0xb0,0x58,0xcf, - 0x60,0x4c,0xb1,0xa2,0x72,0x2c,0x53,0x48,0xf0,0x8b,0x83,0xf1,0xe8,0x4a,0x4f,0x40, - 0x79,0xbd,0x44,0x29,0x3e,0x86,0x81,0x5f,0x95,0x03,0x54,0x08,0x61,0x32,0xa0,0x03, - 0x72,0x1b,0xf2,0xb8,0x37,0x62,0x69,0xf9,0xc0,0x4e,0x30,0x27,0x22,0x7b,0x14,0x91, - 0x5f,0xef,0xfb,0xa8,0x05,0xa4,0xee,0xd3,0x1b,0x54,0x81,0x6e,0x19,0x63,0xda,0x15, - 0x97,0x41,0xf0,0x11,0x87,0x72,0xa9,0xd3,0x5a,0x36,0x98,0x8a,0xc1,0x31,0x53,0x44, - 0x52,0xd2,0x04,0xfc,0xf4,0x9b,0x0c,0xb9,0x46,0x38,0x45,0x1b,0x11,0xa0,0xdf,0x54, - 0x53,0xd3,0x0c,0xb1,0xfd,0xbe,0x1d,0x96,0xf5,0x5f,0x24,0x04,0x58,0xd4,0xba,0x31, - 0x61,0xb7,0x56,0x3e,0x4e,0xc7,0x0c,0xf6,0x47,0x20,0xc3,0xcd,0x41,0xfb,0x32,0x55, - 0xc6,0x9c,0x0a,0xe4,0xc7,0x75,0xd5,0x82,0xc9,0xff,0xcc,0x1f,0x1a,0x26,0x3e,0x72, - 0x84,0x15,0xbe,0x76,0x94,0x35,0xd6,0x05,0x66,0x1a,0xc0,0x34,0x30,0x69,0x4d,0x1c, - 0x17,0x7b,0x99,0xe6,0xaf,0x96,0x0e,0x25,0x75,0x5f,0x0e,0x45,0xba,0xe2,0x78,0xf6, - 0xae,0x49,0xf8,0xca,0x26,0x95,0x94,0x4a,0xeb,0x8a,0xb7,0x4f,0x7f,0xe9,0x68,0xe3, - 0xc8,0x1f,0x9c,0xda,0x50,0x4a,0x6a,0xf0,0xef,0xab,0xab,0x39,0x84,0xe4,0xeb,0xb7, - 0xb7,0x40,0xd5,0x66,0x59,0xc3,0x06,0x08,0x18,0x1d,0x2e,0x68,0x0a,0xa2,0x58,0xba, - 0x43,0x10,0xdd,0x58,0x4b,0xfb,0x5f,0x9e,0x90,0xfc,0xe0,0xd4,0x1a,0x8d,0xfc,0x87, - 0x43,0x8f,0xbf,0x3d,0x1d,0x9f,0x0e,0xff,0x4f,0xc1,0x68,0x0f,0xb2,0x6f,0x31,0xe4, - 0xad,0xae,0x8d,0x3f,0xf3,0x8e,0x67,0x06,0x1a,0x3c,0x87,0xdf,0x1a,0xd0,0xc7,0xff, - 0xc7,0x5b,0xfe,0x2e,0x1c,0x0d,0x70,0x51,0x0f,0xcb,0x4f,0x55,0x20,0x43,0xe8,0xbe, - 0xed,0x28,0xb9,0x51,0xcf,0xab,0x60,0x27,0x65,0x33,0xe3,0x49,0x5b,0x4e,0x11,0x87, - 0xeb,0x6e,0xea,0x97,0x6f,0x0f,0x32,0xcb,0x2c,0x8f,0xea,0x60,0xda,0x4d,0xe5,0x99, - 0x86,0xb3,0xb3,0xe6,0x36,0xe3,0x3b,0x75,0xb7,0xc7,0xe6,0xb3,0xe3,0xfb,0x5a,0xb1, - 0x7e,0x29,0x9a,0xb8,0x25,0xa1,0xcc,0x9c,0x5e,0xa9,0x48,0x86,0x52,0xf6,0x7f,0x15, - 0xd9,0x8d,0x50,0x8b,0xb0,0xe4,0xd3,0xd7,0x92,0xdb,0xe0,0x63,0x64,0x33,0xb1,0xd3, - 0x79,0x2b,0x59,0x9b,0x31,0xb6,0x28,0x67,0x4b,0xa5,0x49,0x07,0xda,0x1b,0xe9,0x32, - 0xc9,0x2a,0x89,0xc8,0x54,0xaa,0x04,0x8c,0xb4,0xc7,0x41,0x33,0xe3,0xe3,0x1c,0x6f, - 0x81,0xea,0x9c,0x26,0xfc,0x29,0xa3,0x0a,0x3e,0x8b,0x72,0x0f,0xc7,0x45,0x75,0x68, - 0xe6,0x98,0x92,0xe4,0xb1,0xa4,0x61,0x3a,0x36,0x69,0xab,0x01,0x6d,0xab,0x7d,0xf3, - 0x8c,0x25,0x4b,0x8b,0xaa,0xeb,0x80,0x17,0x30,0x3b,0xa2,0x4f,0xc4,0x48,0x15,0x33, - 0x00,0x2d,0xd4,0x9b,0xab,0xf9,0xfb,0x23,0x47,0x36,0xed,0xa7,0x5d,0x84,0x75,0x5a, - 0xe5,0x5d,0x9c,0x73,0x75,0x1d,0x2d,0x6f,0x48,0x5c,0xb3,0x9f,0x6a,0xcc,0xba,0x1a, - 0x0b,0xa4,0x8c,0xfa,0x1c,0x6c,0xc3,0xe4,0x4e,0xa7,0xc4,0x52,0x1c,0xe2,0x5d,0x77, - 0x03,0x28,0xe7,0x3c,0xe6,0xc2,0xc7,0xac,0x73,0x38,0xc9,0x90,0x5e,0xcc,0xaf,0xab, - 0x4c,0x2e,0xb1,0x8d,0xf7,0x1e,0x45,0xda,0x86,0xcc,0xe3,0x72,0x3e,0x40,0x5d,0xec, - 0x45,0x94,0x43,0xf5,0x00,0x66,0x2d,0xa2,0x64,0xd0,0x92,0x8f,0x44,0xb1,0xfd,0x1e, - 0x23,0xc2,0xbb,0x09,0xdc,0x20,0x31,0x36,0x39,0xc8,0xe6,0x57,0x09,0xee,0x44,0x43, - 0x80,0xd0,0xed,0xb2,0x39,0x1f,0x35,0x87,0x66,0xe5,0x12,0x9f,0x73,0x11,0x51,0x17, - 0x93,0xc1,0x4e,0xd7,0xe3,0xf1,0x3d,0xb3,0xe5,0xd3,0x05,0x67,0x56,0x9d,0xc4,0x50, - 0x6e,0x9e,0xc4,0x01,0xca,0x45,0x8f,0x25,0xdb,0x22,0xe5,0x95,0x46,0x98,0x0e,0xc3, - 0x26,0x45,0xe8,0x2a,0x37,0xa0,0x42,0x53,0x2e,0xd6,0xc8,0xee,0x71,0x64,0xe3,0x47, - 0xde,0x4d,0x25,0x36,0x41,0x3d,0xcc,0x7d,0xe7,0xc6,0x93,0x23,0xf7,0xb6,0x81,0x3b, - 0xfc,0xda,0xfe,0xdf,0x37,0x17,0x25,0xf7,0xce,0x8c,0x1d,0x17,0xf3,0xd2,0x9f,0x68, - 0x80,0xe5,0x77,0x02,0x3a,0xeb,0x68,0x48,0x68,0x75,0xd4,0x2e,0x7d,0xb8,0x91,0x1e, - 0x1b,0x6b,0x32,0x6e,0xbd,0xa6,0xfe,0x16,0x49,0xd4,0x7e,0xd3,0x25,0x72,0x5f,0x7a, - 0x0f,0xda,0xdb,0xc8,0x45,0x1c,0x7c,0x99,0x8c,0x94,0xab,0x43,0x00,0x6b,0x11,0xa7, - 0x0e,0xfe,0x94,0xef,0x3d,0xad,0xc4,0x9c,0x4c,0x24,0xbb,0x43,0xfd,0xee,0x83,0x42, - 0x8b,0xca,0x4a,0x6b,0xeb,0xdf,0x49,0xb4,0x9f,0x00,0xf7,0x6a,0x0e,0x7b,0x4e,0xc2, - 0xa0,0x86,0xf9,0x82,0x1b,0x30,0xd5,0x5f,0xba,0xc3,0x7e,0xfd,0xef,0x76,0x6f,0x4b, - 0x2b,0x7d,0x4c,0x05,0x05,0xfc,0x2e,0xef,0x63,0xbd,0xcf,0x04,0x1d,0xf5,0x77,0xbd, - 0x31,0x8d,0x91,0xf7,0xdc,0x6b,0x02,0x04,0x60,0xa2,0xa3,0xd6,0x4c,0xb2,0x7e,0x2c, - 0x33,0xb6,0x95,0x77,0x28,0x4c,0x4c,0x09,0xf3,0xed,0xee,0x80,0x56,0xd8,0xef,0x50, - 0x0e,0xac,0x8e,0x3c,0x38,0x0c,0xd8,0x08,0xa3,0x4c,0xa0,0xcf,0xed,0x90,0xb9,0xfe, - 0x39,0x6e,0xe3,0x18,0x91,0x64,0x80,0xc7,0x68,0x52,0x95,0x47,0x23,0x07,0x98,0xc1, - 0x22,0x08,0x19,0x66,0xda,0x2a,0x63,0xd1,0xfa,0x01,0x28,0x09,0xa6,0x43,0x51,0x60, - 0xa3,0x66,0xb8,0x37,0x2e,0xa2,0x4c,0x27,0x4c,0x3b,0xd5,0x17,0x2a,0x0a,0x7f,0xf1, - 0xf3,0x06,0xaa,0xb6,0xe6,0xa3,0x57,0x62,0xbc,0xce,0xf8,0x61,0xba,0xd4,0x18,0x73, - 0x27,0x79,0xc1,0x85,0x82,0xdb,0x91,0x85,0xf5,0x04,0xb3,0x55,0xd3,0xb4,0xfe,0x68, - 0x77,0x96,0xc9,0x15,0x97,0x69,0xeb,0x40,0xfb,0x58,0x35,0xe7,0x51,0x6f,0x0d,0xfb, - 0x30,0x13,0x87,0x8e,0xa6,0x81,0x01,0xae,0xc7,0xee,0xb2,0xa1,0xb1,0x79,0x1f,0x5f, - 0xd7,0x01,0xaa,0x0d,0xf8,0x2f,0x64,0x11,0x2a,0x9d,0xb9,0x10,0x81,0x18,0x64,0x6f, - 0x77,0xa7,0xbb,0x3d,0x8c,0x25,0x5f,0x69,0xe3,0xc7,0x85,0x4f,0x33,0x7b,0x8b,0x3a, - 0x99,0x80,0x7e,0x6c,0x3a,0x80,0x0d,0x10,0x7a,0x06,0x5b,0x64,0xb9,0x29,0x82,0xac, - 0x3d,0xd8,0xd2,0x3f,0x22,0xa6,0xed,0x8e,0xa3,0x7d,0x94,0x9c,0xfd,0xcd,0x5b,0x78, - 0xa2,0x6f,0x93,0x80,0xbe,0xac,0xca,0xd8,0x6f,0x1d,0x98,0x9e,0x38,0x9f,0x50,0x56, - 0xf2,0xa3,0xbb,0xb6,0xbb,0xcc,0x4b,0x6d,0x62,0x0f,0x42,0xe9,0xaa,0xa8,0x12,0x6b, - 0x2e,0x70,0xf3,0xa7,0x62,0x43,0x02,0x77,0x2e,0x21,0xcd,0x55,0xdd,0xfe,0x17,0x96, - 0xdf,0x9b,0x5b,0x78,0xb0,0x80,0x2a,0x89,0x66,0xe1,0x34,0xdf,0xba,0x34,0xb3,0x76, - 0x42,0xc5,0x53,0x20,0xb1,0x91,0x22,0x98,0xe3,0x54,0xbc,0x20,0x8c,0xc0,0xa6,0xb0, - 0x98,0x0d,0x5a,0x49,0x30,0x02,0x15,0x50,0x43,0x12,0xea,0xdf,0x32,0x72,0x18,0x7b, - 0x40,0x5c,0xb3,0xf4,0x3c,0x51,0xd0,0x35,0x91,0xc6,0xe3,0xb3,0x10,0xe0,0x4b,0xf0, - 0x24,0xac,0xcc,0xc0,0xb2,0x8c,0x93,0xd1,0x52,0x16,0x26,0x96,0x99,0x65,0xf8,0xa3, - 0x5b,0x1a,0x77,0x46,0x33,0x3f,0xcd,0x02,0x40,0x15,0x1c,0xcc,0xc1,0x78,0xc6,0xb2, - 0xd2,0x19,0x69,0xba,0x70,0x33,0x46,0x4b,0x43,0xf9,0x8f,0xef,0x9a,0x67,0x8d,0x88, - 0xf2,0xba,0xce,0xa6,0xc3,0xb1,0x61,0x4a,0x80,0x7c,0xc5,0x68,0x90,0x38,0x00,0x59, - 0x2e,0x89,0x79,0x0e,0x86,0x91,0xe9,0xdb,0x50,0x1a,0xe8,0xab,0xf5,0xd5,0x3a,0x90, - 0x61,0x28,0xc6,0x8c,0x5a,0xa0,0x9b,0x48,0x52,0x1b,0x7f,0x7c,0x61,0x84,0x75,0x79, - 0x57,0x15,0xbf,0xca,0x7a,0x21,0x00,0x99,0xee,0xeb,0x37,0x22,0x11,0x1e,0x2f,0x2a, - 0x40,0x4a,0x18,0x62,0xbf,0x83,0x0c,0x0f,0x48,0xa4,0x88,0x46,0x18,0xe8,0xd7,0x2a, - 0x86,0xb1,0xee,0xbf,0x06,0xba,0x40,0xc4,0xd9,0x11,0xc0,0xc4,0x7c,0xed,0x87,0xab, - 0x5b,0x12,0x9f,0x1b,0xd2,0xac,0x48,0xd4,0x6d,0xcc,0x82,0xcd,0x4b,0x62,0xd2,0x2b, - 0xac,0xa6,0x43,0x8d,0xbe,0x3a,0x29,0xc0,0x89,0x9b,0x35,0x0d,0xbc,0xf5,0xfb,0xaa, - 0xd3,0x10,0x28,0xae,0x87,0xe9,0xe7,0x9b,0x50,0xea,0x67,0x0e,0xc3,0xf5,0x83,0x33, - 0x3c,0x9f,0xb5,0x1b,0x5e,0x91,0x68,0xfb,0x42,0x51,0xbf,0x3a,0xf5,0x7f,0xd0,0x3b, - 0x03,0x10,0x28,0x55,0x93,0x54,0x2e,0x1b,0xf6,0x3c,0xe8,0x19,0x7f,0x6c,0x99,0xe3, - 0xaa,0x09,0x61,0x5e,0x08,0xa9,0x93,0xdc,0xa7,0x16,0x05,0x45,0x2f,0xb7,0xcb,0x83, - 0x26,0x08,0xb5,0x93,0xcc,0x26,0xc1,0xc3,0x62,0x62,0x42,0x48,0xe9,0x4c,0x57,0x7f, - 0xf6,0x55,0x83,0x06,0x46,0x59,0x12,0x6b,0x47,0x84,0x81,0x96,0xa9,0xeb,0xa8,0xb6, - 0x30,0x51,0xe8,0x96,0x57,0x7e,0x27,0x94,0x34,0x33,0xfb,0x96,0x51,0x9a,0xd6,0x6e, - 0x72,0xd7,0x83,0xdf,0x63,0x20,0x4d,0x91,0xf9,0x36,0xd1,0xf2,0x6f,0x6c,0xf8,0x4c, - 0xbb,0xc5,0xe9,0xaa,0xc5,0xa1,0xa6,0x79,0xb0,0xc2,0xce,0x5b,0x2b,0xf6,0xda,0x3b, - 0x34,0xca,0x9a,0xee,0x20,0xb3,0x27,0xae,0x34,0xaa,0x12,0x5c,0x6a,0x47,0x1d,0x32, - 0xf1,0xb8,0x2f,0x8e,0x3c,0x39,0x42,0x3e,0xa4,0xd8,0x1a,0x44,0x97,0x8d,0x30,0x9d, - 0xcc,0x85,0x44,0x69,0xde,0xa3,0x69,0x2a,0x6f,0x61,0x17,0xe8,0x25,0x4c,0xeb,0xff, - 0xdd,0xc9,0xb9,0x1b,0xbe,0x3b,0xfb,0x03,0x75,0x34,0xb3,0x27,0x20,0x44,0x6d,0x78, - 0x6d,0xac,0xc2,0xd3,0xbf,0x25,0xb2,0x9f,0x83,0x41,0x32,0xaf,0x27,0xe4,0x54,0x76, - 0xac,0xe8,0xd4,0x66,0xdd,0xa5,0xd6,0xe9,0x48,0xc5,0x4d,0x56,0x59,0xc7,0x1b,0xcf, - 0xd7,0xae,0x7c,0x2f,0xc6,0xc0,0x0d,0x43,0x27,0xdf,0xf2,0x62,0x26,0xbf,0x55,0x76, - 0x2c,0xcd,0xd5,0x72,0x5d,0xef,0xfb,0x18,0x46,0x44,0xe4,0x6e,0xef,0xc3,0x6e,0x9f, - 0x05,0xf0,0xaf,0xe4,0xdf,0x61,0x6e,0x94,0x0c,0xe1,0xcf,0xe3,0x44,0xd0,0x11,0xcd, - 0x23,0xaa,0x6c,0xcf,0x22,0xbc,0x60,0x83,0x5d,0xce,0x89,0xac,0x05,0x45,0xe9,0xaf, - 0x07,0x6e,0x11,0xe5,0x5f,0x43,0x4c,0xdc,0x43,0x59,0x0e,0xd7,0xfc,0xfb,0x37,0xc8, - 0x1c,0x2f,0xd3,0x37,0x19,0xbe,0x04,0xf1,0x44,0x9e,0xaa,0xc4,0xc5,0xf8,0x3e,0xf4, - 0x4e,0xa5,0xec,0xcf,0x30,0x05,0xe5,0xdd,0x56,0x96,0x8c,0x06,0x62,0x7f,0x93,0x56, - 0x7e,0xe1,0x79,0xd4,0x77,0x00,0xdb,0xca,0xea,0x78,0xeb,0x53,0x14,0xd5,0x1c,0xa5, - 0x2b,0xf4,0x8c,0xf8,0xc6,0x63,0x29,0xca,0x32,0xa7,0x5e,0xd6,0xc6,0xb4,0xc1,0x56, - 0xdb,0x68,0xfe,0xed,0x8b,0xf5,0x6e,0x61,0xe6,0x7a,0x85,0xe6,0xc7,0x5a,0x91,0xa2, - 0x2a,0xa1,0xd8,0x2f,0xdd,0x17,0xc9,0x42,0x3b,0x95,0x35,0xbd,0x08,0xa9,0xd1,0x6a, - 0xf9,0xa8,0xbb,0x1a,0x64,0x31,0x56,0xd8,0xde,0x24,0xee,0x86,0xb5,0xda,0xac,0x0f, - 0xdc,0xdc,0xb6,0x7f,0xa0,0x1b,0xcc,0xd4,0xb9,0x25,0x91,0x92,0xc0,0x5e,0x56,0xe4, - 0x0a,0x10,0x97,0xd8,0xb3,0x39,0xc7,0xb9,0xf5,0x7b,0xa8,0xbd,0x9b,0x56,0xa6,0x93, - 0xee,0x63,0xbd,0xd7,0xe2,0x0d,0xe3,0x78,0x6e,0xd6,0xe7,0x5c,0x22,0xf2,0x78,0xf3, - 0x9c,0xd0,0xf4,0xa3,0x1e,0xec,0xef,0x7e,0x44,0x53,0xa4,0xeb,0xdc,0x98,0xbc,0xcb, - 0xcd,0x5b,0x87,0xcd,0xe0,0xb3,0xf7,0x88,0x0a,0x2b,0x67,0x6d,0x90,0x3f,0x10,0x23, - 0xaf,0x32,0xd2,0x0f,0xef,0xb4,0x93,0x88,0x9f,0x59,0xa5,0x00,0x5c,0xbe,0x28,0x62, - 0x81,0x0f,0x1e,0x75,0x21,0x2b,0x91,0x52,0x6e,0x9f,0xf8,0xe6,0xd4,0x6e,0x20,0xd2, - 0x6a,0x0f,0x16,0x84,0xee,0x64,0x97,0xdf,0xb9,0xfb,0xa0,0x90,0xd3,0x45,0x29,0x06, - 0x01,0x46,0x01,0xfc,0x9c,0x8f,0x3b,0x84,0x83,0x4f,0x35,0xe7,0x73,0x6c,0x49,0xb1, - 0x83,0x11,0x88,0xb2,0x17,0x70,0xae,0x59,0xc7,0x98,0x12,0x57,0xf0,0x23,0xfb,0x86, - 0x58,0x1f,0x98,0x5d,0x21,0xf0,0x2b,0x47,0xe3,0xfb,0xc8,0xe5,0x31,0x55,0x68,0x41, - 0x30,0x66,0x1c,0x32,0x32,0x45,0x98,0x9c,0xa3,0x43,0x82,0x42,0x39,0x14,0x95,0x27, - 0xc0,0x49,0x7b,0xa5,0x82,0x3d,0xe6,0x59,0x36,0x37,0xc7,0x5d,0x39,0x22,0x13,0x54, - 0x24,0xac,0x09,0xa0,0xce,0x66,0x79,0xa4,0x62,0xf8,0x19,0x48,0x2d,0x6d,0xaa,0xa4, - 0x8d,0x7b,0x2a,0xa1,0x2b,0xaa,0x61,0xc0,0x42,0x05,0x9e,0xc6,0x7a,0x7a,0x83,0x18, - 0x62,0x71,0x32,0xef,0x0c,0x32,0x65,0xc9,0x5c,0x49,0xc0,0x38,0xfa,0x25,0x5d,0x40, - 0x88,0xa1,0x3b,0xfe,0x81,0x3a,0xec,0xc1,0xc6,0x07,0x90,0xaf,0x58,0x02,0x0b,0xe8, - 0xd8,0x0b,0x49,0x7b,0x72,0x53,0xae,0xe0,0xcf,0xf0,0xda,0xfb,0x83,0x43,0x57,0x55, - 0xeb,0xa3,0xf8,0xbf,0x2e,0x83,0xfe,0x17,0x90,0x91,0x52,0x6f,0x75,0xc1,0x2d,0x3e, - 0xf4,0xa0,0x9b,0x5c,0xf2,0xc7,0x9a,0xec,0xd4,0x40,0xc2,0xfd,0xb2,0xd7,0xd2,0xba, - 0xba,0x15,0x0d,0x0b,0xc4,0x6c,0x31,0x69,0xc9,0xdc,0x98,0xfd,0xb3,0x7f,0x5a,0x1e, - 0x55,0x07,0x67,0xcf,0xc7,0x27,0x20,0x5e,0x6a,0xf0,0x80,0x7d,0xb3,0xfe,0x5d,0x01, - 0xdd,0x5f,0xd9,0x07,0xdd,0x5c,0x4d,0x27,0x85,0xd1,0xd3,0x4c,0xf0,0xbd,0xb9,0x78, - 0x2f,0xec,0x5e,0x7c,0xbb,0xfa,0xe3,0x4e,0x99,0x48,0x2e,0x65,0xf6,0xc3,0xb2,0xf8, - 0xa6,0xa9,0xdc,0x02,0x76,0x3a,0xea,0x5e,0x01,0xd1,0x8b,0x74,0xd1,0xb2,0xf5,0x93, - 0xa7,0xe6,0x8d,0x7d,0x63,0xf3,0x46,0xb1,0xe7,0xc3,0xbd,0x28,0xc2,0xa7,0x84,0x55, - 0xe3,0x1f,0xba,0xc3,0x93,0x3f,0x94,0x74,0xfd,0xf9,0xea,0xcc,0x53,0x16,0xdd,0xef, - 0x1b,0xb5,0xdd,0xc7,0x68,0x3a,0xcf,0x12,0x2b,0x44,0xe2,0xcc,0xa9,0xca,0xc5,0x80, - 0x37,0xb6,0x45,0xc6,0x3a,0x9b,0x42,0x03,0x4e,0xfb,0xeb,0x3c,0x09,0x1a,0x58,0x21, - 0xa2,0xe6,0xff,0xc6,0x10,0x46,0x51,0x64,0xd0,0x83,0xe3,0xd8,0x31,0x77,0x19,0x0c, - 0x5f,0x2b,0xd6,0x81,0x48,0x93,0x72,0xd7,0x5c,0xe7,0x2c,0x53,0xfa,0xbf,0xb9,0xe0, - 0x2f,0xa2,0x4e,0x64,0x04,0x3d,0x08,0xda,0xa1,0x40,0x1c,0xc3,0xda,0x37,0x5e,0x0c, - 0x55,0x55,0x1c,0x8c,0x3d,0x7a,0x2c,0x15,0x1b,0x27,0x54,0xcf,0x85,0x73,0xba,0x71, - 0xa3,0xe6,0x1f,0x19,0xca,0x42,0x67,0x8b,0x16,0x37,0xd8,0xbf,0xad,0x3e,0x86,0x59, - 0x8e,0xb1,0xb8,0xf4,0xdb,0x93,0xec,0x6c,0x20,0x0a,0x16,0xd1,0x9c,0x76,0xab,0xab, - 0x5b,0x12,0xa8,0x05,0x3a,0x7d,0x54,0xfa,0x80,0x4c,0x49,0x1a,0x18,0x5d,0x56,0x2b, - 0xac,0xbc,0xd2,0xbe,0x82,0x52,0xe8,0x0b,0x03,0x0f,0x57,0xee,0xd5,0x3c,0x71,0xf4, - 0xad,0xbd,0xeb,0xde,0xbd,0xce,0xe0,0x99,0xe7,0x37,0xa7,0xee,0xc3,0x65,0x1a,0xf9, - 0xfb,0xc2,0xa1,0x60,0xff,0x38,0xcb,0xca,0xce,0x0d,0xc9,0x86,0x00,0x70,0x16,0x6e, - 0x24,0xc1,0x75,0xcd,0xfc,0x48,0x40,0x00,0x8d,0x7b,0xbe,0xd4,0xd0,0x31,0xf9,0x53, - 0xac,0x79,0x61,0xe3,0xd5,0xe0,0xcc,0x50,0xf5,0xb6,0xd1,0x25,0xd9,0x69,0x3d,0xca, - 0x6c,0x6a,0x45,0x84,0xa4,0xab,0x41,0x01,0x3a,0xd8,0x51,0xae,0xdc,0xfc,0xe0,0x03, - 0xd3,0xc6,0x60,0x45,0xde,0x09,0xc7,0x5e,0xb2,0x75,0x8f,0x1c,0x3c,0x95,0x64,0x1c, - 0xe6,0x3a,0xd0,0xa5,0x23,0x28,0x58,0xba,0xe6,0x7a,0x78,0x75,0x78,0x48,0xa7,0x11, - 0xa5,0xc6,0x2f,0x76,0x37,0x07,0xb1,0x8f,0x26,0xc0,0x31,0x5a,0x30,0xec,0xde,0x7b, - 0x81,0xb4,0x97,0x7f,0x7e,0xb6,0xd5,0x0c,0x1d,0x1a,0xec,0x17,0xdd,0x6c,0x38,0x0b, - 0x2d,0xc8,0x29,0x7c,0xe3,0xea,0x70,0x59,0xef,0x87,0xe2,0x3a,0x0c,0xee,0x92,0xfa, - 0x4f,0x7c,0xaa,0xd8,0x5b,0xe7,0x25,0xd2,0x71,0x84,0xc2,0x78,0x19,0xa7,0x27,0xf8, - 0xbf,0xfb,0x78,0x3d,0xf7,0x43,0x32,0x54,0x6b,0x9f,0x93,0x6a,0xbf,0x2a,0x30,0x9f, - 0xfa,0xb8,0x2b,0xf7,0x17,0x6b,0x63,0x3f,0x79,0x52,0xfc,0x7e,0x6e,0xa7,0xa6,0x54, - 0x32,0x78,0x4e,0xdd,0x4d,0xa4,0x10,0x6a,0x4f,0x0e,0x64,0x5f,0x2e,0x43,0x7b,0xde, - 0x35,0xef,0xb2,0x6f,0x2f,0x02,0x55,0x09,0x73,0xc2,0x6f,0xfa,0x23,0x1a,0x70,0xb2, - 0x86,0x7b,0x63,0x4c,0x56,0x25,0x9b,0xf2,0xc8,0x0c,0x53,0x9f,0x3a,0x4d,0xc8,0x62, - 0x53,0x5e,0x4b,0x2d,0xfd,0x99,0xcf,0x08,0xbf,0xc0,0xb3,0x7b,0x57,0x84,0xdc,0x06, - 0x0b,0x07,0xfd,0xb2,0x91,0x4f,0x0b,0x3d,0x9b,0x4d,0x73,0x06,0x5c,0xd0,0xd3,0x10, - 0x9f,0xff,0xe4,0x9a,0x33,0x6a,0x73,0x4a,0x65,0x93,0x7b,0x30,0x5d,0xbf,0x95,0x0f, - 0x45,0xf1,0x9b,0xfb,0x39,0x44,0x53,0x41,0x13,0x67,0x41,0x67,0xb0,0xb7,0x15,0xce, - 0x5a,0x88,0x23,0x13,0xea,0xb3,0x3e,0x30,0xd6,0x11,0xfa,0xc4,0xbe,0xf8,0x85,0xbd, - 0x85,0xd6,0x1c,0xa4,0x17,0xf4,0x65,0x62,0x44,0x26,0xd2,0xcf,0x6d,0x50,0x14,0xa1, - 0x5f,0xd7,0xfa,0xee,0xdc,0xf1,0x2c,0x6b,0x77,0xd3,0x31,0x05,0x30,0xee,0x23,0x4c, - 0x4f,0x47,0xc1,0x22,0xd5,0xa7,0xf1,0xa6,0xd6,0xde,0xe4,0x2b,0x3e,0xe7,0x2b,0x5d, - 0x5a,0x98,0xb7,0xe1,0xdd,0xc6,0x59,0xaf,0x0e,0xc6,0xdc,0x88,0x50,0x7a,0xb3,0xec, - 0xed,0xfb,0xa0,0xf2,0xbc,0xa8,0x8d,0x4c,0x7c,0x25,0xf3,0x46,0xa8,0x35,0xd1,0xe9, - 0x44,0x38,0x2e,0x1a,0x0e,0xae,0xa0,0x08,0x65,0xb9,0xfa,0x56,0x53,0xb4,0xf3,0x5b, - 0x2d,0x62,0xf9,0xf3,0xbc,0xf4,0xcf,0x52,0xe4,0x77,0xef,0x3f,0xdc,0x08,0x17,0xc6, - 0x52,0xde,0x6f,0x4b,0x12,0xb5,0x78,0xb9,0xfd,0x76,0xe7,0xba,0xf9,0x10,0xa6,0x5f, - 0xef,0xde,0x98,0xc9,0x9f,0x43,0x0e,0xe8,0x26,0x51,0x88,0x8a,0x82,0x6d,0x68,0xf3, - 0x67,0xac,0x6e,0xdd,0x10,0x10,0x2e,0x6a,0x63,0xdc,0x54,0x7a,0x79,0xe0,0x21,0x45, - 0x53,0x91,0x4b,0x5c,0x93,0xb4,0x17,0xe8,0xbb,0xd1,0x44,0xc2,0xf8,0xc5,0xaf,0x4f, - 0x76,0x92,0xa0,0x4f,0xd6,0x8e,0x38,0xe7,0x06,0x75,0xa6,0xf5,0x5a,0xf6,0xd8,0x73, - 0x1b,0xa9,0xde,0xe6,0x44,0xa5,0x5e,0x31,0x70,0x69,0x82,0x20,0xaf,0x22,0x36,0xdd, - 0xcb,0x5b,0xb2,0xa4,0xff,0x8e,0xaf,0x18,0x47,0x78,0x08,0xc4,0x64,0xc0,0x48,0xe1, - 0x94,0x6e,0x93,0x32,0x7b,0x66,0x82,0x05,0x38,0x73,0x48,0x8b,0x2d,0x0e,0xe5,0x83, - 0xc1,0x09,0x2d,0x6b,0x32,0x46,0x92,0x0e,0xf9,0x01,0x8c,0xc6,0x55,0xee,0x78,0xbf, - 0x3d,0x55,0xfe,0x95,0x31,0x84,0xc1,0x12,0xe5,0x06,0xaf,0x43,0xf3,0xbb,0x8b,0x4f, - 0x3b,0x1e,0x4e,0xbc,0x41,0x68,0xfb,0x59,0xa2,0xba,0x0e,0x46,0xac,0xe8,0x1e,0xc0, - 0x84,0xe6,0x98,0x5b,0x77,0x2f,0x48,0xe5,0x1e,0x17,0x65,0x07,0xf6,0xcb,0x28,0x27, - 0x7c,0x7c,0x8b,0xb3,0x13,0xb7,0x00,0xe9,0x66,0x4e,0xa2,0x8e,0x6e,0x96,0x9a,0x4f, - 0xe1,0x32,0x3d,0xee,0x3c,0x87,0x4f,0x58,0x2b,0x25,0xc0,0x9b,0xb3,0x0c,0x68,0x08, - 0x08,0xc9,0xf4,0x1b,0x3d,0x26,0x20,0x88,0x97,0xe6,0x8c,0x15,0xb2,0x2d,0x65,0xc1, - 0x77,0x64,0x23,0x7f,0xfa,0xdc,0x05,0x01,0x23,0x0e,0xab,0x09,0xbb,0x13,0x35,0xd4, - 0xe0,0x51,0xb4,0xec,0x3a,0x6b,0xbf,0x5b,0xed,0xd7,0xa1,0x8d,0x37,0xc4,0xd3,0x3a, - 0xf1,0x4e,0xf8,0xa4,0x48,0x63,0x53,0xea,0xf0,0x91,0x2d,0x02,0x30,0x63,0x74,0x70, - 0xe8,0x04,0x35,0xd8,0x04,0x40,0xa5,0x07,0xc4,0xcb,0xe1,0xd4,0xa8,0x2c,0xc5,0xd5, - 0x56,0x1f,0xfd,0x64,0xf2,0x17,0x6b,0x2e,0x00,0x7f,0x28,0x16,0xe0,0xd1,0xcf,0x4a, - 0xbb,0x3e,0xab,0xf6,0x22,0x22,0xdb,0x39,0xd3,0xb2,0x08,0x83,0xb8,0x7e,0x46,0x66, - 0xc9,0xda,0xba,0xa8,0x36,0xc0,0xab,0x51,0xc3,0x10,0xa7,0x46,0x9b,0x7f,0x04,0x94, - 0xc5,0xdb,0xb4,0x6f,0xcc,0x90,0x9b,0x3b,0x02,0x68,0xe4,0x0c,0x86,0x30,0xe9,0x69, - 0x34,0xd4,0xe0,0xe7,0x43,0x57,0x75,0x83,0xe8,0x12,0xa7,0x9c,0x0f,0xdf,0x54,0x9b, - 0x04,0xec,0xb5,0xb1,0x4e,0x28,0x0b,0x98,0x0a,0x17,0x5d,0xc1,0x92,0x1d,0x80,0x10, - 0x5c,0x78,0x42,0xb7,0x02,0x3b,0x57,0x08,0x30,0xdf,0x70,0x86,0x85,0x89,0x8c,0xb1, - 0x61,0xba,0xf2,0x05,0x12,0xf5,0x24,0x82,0x50,0x45,0xe4,0xc5,0xd2,0xf4,0x23,0xed, - 0xa3,0xd7,0xff,0x2d,0xa2,0x79,0x51,0x07,0x0b,0x47,0x79,0x7b,0xd6,0xd7,0x5c,0xa2, - 0x9b,0x7b,0x94,0xdd,0x16,0x96,0xa5,0x19,0x81,0x1a,0xc0,0x06,0x77,0xfa,0xc6,0xb5, - 0x9c,0xe5,0xb6,0xea,0x6d,0x77,0x2c,0x18,0x86,0xf7,0xcf,0xbb,0xdd,0x8e,0x89,0xb0, - 0x4a,0x20,0x1e,0x6f,0xb5,0x34,0x66,0xbc,0xeb,0x5c,0xb1,0xc3,0xa0,0xe5,0x7f,0x61, - 0xbb,0x58,0x86,0xeb,0xe5,0x75,0xb3,0x8d,0x55,0xf1,0xd6,0xcb,0x2e,0x3b,0x19,0xb5, - 0xaf,0xea,0xf4,0xba,0x18,0x84,0xd2,0x9d,0x8a,0x9e,0x24,0xe7,0xdd,0xd0,0x20,0xe0, - 0x29,0xce,0xdc,0x2a,0xb8,0x6b,0x40,0xc4,0x95,0x30,0x84,0x5b,0x91,0x18,0xb6,0x4a, - 0x23,0x15,0xcf,0xba,0xb6,0xcb,0x81,0x07,0x82,0x2c,0x85,0xfc,0x7d,0xed,0x1e,0xdd, - 0x0f,0x9e,0x52,0xaf,0x45,0x25,0x31,0xc5,0xe9,0x1e,0x47,0x13,0x5f,0xc1,0x09,0xaa, - 0x93,0xbe,0xc7,0xcc,0x5a,0x70,0xb3,0x66,0xea,0xcc,0xbb,0x15,0x74,0x32,0x38,0xc3, - 0x89,0x2d,0xc0,0x24,0x0b,0xe1,0x0f,0x78,0xd9,0x3d,0x14,0x44,0x70,0x6b,0xd3,0x6d, - 0x45,0x55,0xba,0xff,0xfe,0xe5,0xb8,0xb0,0xe5,0x72,0x18,0x44,0x37,0x06,0xec,0x90, - 0x93,0x02,0xff,0xe5,0xc0,0x27,0x9c,0x4c,0xaf,0xcd,0xaa,0x16,0xec,0x4d,0x51,0x21, - 0x7a,0x98,0x93,0xa7,0x27,0xe2,0xf9,0x2e,0x5f,0xce,0xc7,0x30,0x74,0xa2,0x39,0xc8, - 0xe3,0x2f,0x1f,0x35,0x22,0xca,0x12,0x9c,0x45,0x44,0x67,0x95,0xd2,0x6f,0x8a,0x66, - 0xf8,0xc7,0xb1,0x56,0x24,0x65,0x18,0xd9,0xb2,0x68,0xc0,0x52,0x34,0xca,0x19,0x5e, - 0x66,0x9d,0x06,0x07,0x9a,0xe4,0x4b,0x8b,0x94,0x89,0x43,0xdb,0x3d,0x82,0x37,0xc7, - 0x72,0x28,0x51,0xb7,0x8d,0xbc,0x6c,0x91,0xac,0xc8,0xef,0xa2,0x3c,0xa3,0x00,0x6c, - 0xf7,0xe4,0xf8,0x50,0x24,0x07,0xc9,0x0d,0xed,0x89,0xcc,0x28,0xbd,0x6b,0x2a,0x5a, - 0x41,0xc7,0xd4,0x19,0x39,0x06,0x44,0x3c,0xac,0x4a,0xc4,0x38,0xbc,0x6a,0x9c,0x90, - 0x6d,0x0c,0x03,0x7d,0xfe,0xdd,0x69,0xb6,0xa4,0xdb,0x41,0xdc,0x50,0xab,0xec,0xf3, - 0x21,0x00,0x0f,0xee,0x3e,0xeb,0x0b,0xc8,0x41,0x8a,0x49,0xcc,0x51,0xaa,0xf7,0xa2, - 0x2e,0xc1,0xa1,0x28,0x3d,0x2e,0xf5,0x78,0xa5,0xdd,0xc8,0xde,0xb8,0x43,0x8d,0x9a, - 0x0b,0x79,0xfb,0xdc,0xa5,0x10,0x38,0xf8,0xf5,0x70,0xeb,0x47,0xb4,0xa9,0x9c,0x38, - 0xba,0xe2,0x23,0xbe,0x7e,0x5a,0x2a,0xe1,0xab,0xc7,0x57,0x4b,0x2d,0x65,0xfa,0x28, - 0xb3,0xed,0xd3,0x2e,0xaf,0xa6,0x43,0x0a,0xff,0xc6,0xa1,0x49,0xad,0x40,0x0b,0x06, - 0x78,0x0a,0x64,0x6a,0xd4,0xde,0x22,0x8a,0x8f,0x94,0xcc,0xa2,0xf6,0xf5,0x52,0xbe, - 0x6d,0x7b,0xce,0x92,0x11,0x1a,0x98,0x96,0x06,0xab,0xc2,0xb0,0x94,0x72,0x7f,0x93, - 0xcc,0xc3,0x1a,0x15,0xb4,0x6f,0x0f,0x13,0x02,0x7d,0x78,0x83,0x94,0x00,0x13,0x46, - 0x28,0x15,0xd5,0x93,0x37,0xb6,0xa8,0x40,0x61,0x5e,0x4f,0x44,0x79,0xb2,0x79,0x3d, - 0x20,0xee,0x24,0x3f,0x70,0xf5,0x2d,0x7a,0xc3,0xdf,0x8b,0xc2,0xcb,0x0b,0x56,0x3a, - 0x4b,0xda,0x6b,0x0e,0xb5,0xc2,0x46,0x1a,0x77,0x9a,0xa7,0xf6,0x71,0x65,0xd9,0x47, - 0xdd,0x54,0x85,0x68,0x5f,0xf4,0xf3,0x85,0xa6,0x99,0x2e,0xe7,0x0e,0x4c,0x4d,0xc3, - 0x46,0x8c,0x82,0xb5,0x04,0xd2,0x24,0x6b,0x42,0x57,0x99,0x99,0x8b,0x08,0xa1,0x4a, - 0x2a,0x38,0xf1,0x8a,0x60,0x8e,0x64,0x1c,0x87,0xbc,0xa4,0x17,0x97,0xbc,0x3d,0xfa, - 0x29,0xb0,0xe0,0xe1,0xd6,0xb6,0x40,0xbc,0x8c,0x5a,0x1a,0x9a,0x16,0xa8,0x32,0x9a, - 0xdc,0x37,0x9f,0x74,0xba,0x61,0xa7,0x5b,0xd9,0xab,0x8d,0x1f,0x1a,0x55,0x61,0x8a, - 0x91,0xb2,0x9d,0xbb,0x54,0x4a,0xcd,0x48,0x61,0x9a,0x40,0x3d,0x47,0x46,0xe4,0x2c, - 0x1d,0x3f,0xde,0x25,0x92,0xb1,0x8e,0xad,0xac,0x5c,0xcd,0xca,0x1d,0xed,0xd6,0xca, - 0x88,0xf3,0x7e,0x5c,0x81,0x03,0x21,0x98,0x2c,0xde,0xa4,0xd5,0x15,0x8c,0xdf,0x34, - 0x9d,0x7f,0x1e,0xe8,0x1f,0xc1,0x7f,0xdf,0x6c,0xda,0xe1,0xd7,0x15,0xba,0x88,0x1b, - 0xab,0xb2,0xd7,0x25,0x13,0xb2,0x80,0x44,0xed,0xdd,0x81,0xf8,0xdb,0xff,0x3a,0xf3, - 0x30,0x8b,0xd4,0x2f,0x36,0xd4,0xef,0x1e,0xe3,0x46,0x65,0x57,0x56,0x90,0xb0,0xf0, - 0x05,0x20,0x8f,0x69,0xee,0xf4,0x87,0xcb,0xb1,0x4e,0x98,0xb6,0xef,0xdf,0x99,0x30, - 0xb0,0x1d,0x21,0x1b,0x1c,0x60,0x11,0x25,0xc6,0xf2,0x88,0x25,0xd0,0x62,0x42,0x95, - 0xd8,0x1a,0xf1,0xe4,0x32,0x63,0xd9,0xdc,0xb6,0x2f,0x59,0x28,0xe0,0x63,0xc5,0xb3, - 0x29,0x7f,0xe8,0x26,0xef,0x28,0x0d,0x9f,0xc0,0x73,0xe8,0xe0,0x14,0x17,0xb7,0xd4, - 0x76,0x89,0xa0,0x36,0xec,0x2b,0x62,0x8d,0xe2,0x9e,0x88,0x4b,0x79,0x27,0xbe,0x33, - 0x79,0xfd,0xf9,0xc1,0xd8,0x73,0x5c,0xe5,0x9e,0xdc,0x65,0x1a,0x71,0xb3,0x77,0x88, - 0xc1,0xf8,0xf1,0xab,0x95,0x9e,0xde,0x8a,0x30,0x05,0x9f,0x4b,0xd5,0xa5,0x3a,0xf6, - 0xa4,0x05,0xbc,0x25,0xf8,0x87,0xa9,0xba,0x4c,0x40,0x92,0x2c,0x58,0xcc,0x32,0xeb, - 0x79,0x6c,0x31,0x03,0xba,0x6b,0x0e,0x6c,0xb1,0x38,0x76,0xaf,0x46,0x63,0xfc,0x8d, - 0xd1,0xc1,0x23,0x1e,0x3b,0x4e,0x15,0xd8,0xfc,0x2a,0x5a,0xcd,0x31,0x61,0x33,0xea, - 0xf1,0xa6,0x8c,0x2a,0xd1,0x1a,0xac,0x04,0x3d,0x9a,0x8b,0x2e,0xca,0x40,0x7c,0x81, - 0x87,0xfa,0x93,0x53,0x66,0x2a,0xc5,0x04,0xc7,0x0e,0x05,0x4b,0xf6,0x61,0x16,0xb5, - 0x03,0x80,0xb2,0x7b,0x1d,0xef,0x04,0x9c,0xb4,0x0c,0x21,0xf8,0x03,0xe3,0x0b,0x51, - 0x42,0x34,0xe3,0xa1,0x73,0xdf,0xd0,0x8a,0xcb,0xce,0x2c,0x1f,0x29,0xd1,0x34,0xa4, - 0x83,0x4d,0x5a,0x1f,0x3a,0xd2,0x9b,0x44,0xf0,0xb0,0x60,0x3f,0x7a,0x92,0xf9,0xba, - 0x54,0x52,0x44,0xdd,0x22,0xbb,0xd4,0xd1,0x66,0xa4,0xaa,0x45,0xff,0xd6,0x15,0xee, - 0x82,0x74,0x92,0xb9,0x10,0xf1,0x7a,0x9d,0x62,0x6b,0x55,0xd4,0x25,0xde,0x8b,0x83, - 0xa6,0xaa,0x81,0x67,0x59,0x63,0x84,0xd2,0xd4,0x3e,0xd8,0x65,0x80,0xdf,0xb2,0x73, - 0x51,0x30,0x4d,0xcc,0xa3,0xb8,0x43,0x98,0xe9,0xfe,0xc5,0xc6,0xaa,0xfc,0x7e,0xfd, - 0xc9,0x9f,0xbc,0x35,0x50,0x30,0x94,0x74,0x95,0xfb,0xb4,0xe6,0xf6,0xff,0x90,0x52, - 0x9d,0xb8,0xb2,0xe8,0xda,0xe4,0xa1,0x74,0x29,0x72,0xfc,0x77,0xd0,0x73,0xfe,0x71, - 0xaa,0xb9,0x9b,0x74,0x36,0xbb,0x05,0x9a,0x09,0x75,0xd7,0x07,0x13,0x70,0x8d,0xec, - 0xd0,0xe8,0x61,0x47,0xfb,0x3d,0xea,0xcc,0x10,0xe8,0xfd,0xea,0x52,0x71,0x31,0x2c, - 0x94,0x69,0x82,0x6e,0x5b,0x48,0x03,0x98,0x60,0xa7,0x94,0x53,0x99,0x07,0xce,0xcd, - 0xa9,0x5b,0x84,0xef,0x0d,0x36,0x08,0xda,0x96,0x84,0xb4,0xcf,0x2a,0xfb,0xb0,0xb0, - 0x5c,0x8b,0x91,0xa5,0xbe,0x82,0x2d,0x0c,0x1f,0xa7,0xc8,0x52,0xfe,0xa3,0x00,0x6d, - 0x5c,0x14,0x89,0xb5,0x50,0x2a,0xcb,0x47,0x00,0xaa,0x60,0xce,0xe6,0x17,0x1f,0xc1, - 0x2c,0xec,0x59,0x48,0x7c,0xcf,0xad,0x6c,0x32,0xd2,0xf6,0x6a,0xd9,0x7a,0x2e,0x77, - 0xc2,0x5f,0x0c,0x61,0x9a,0x82,0x76,0x9a,0x6d,0xff,0xd6,0x1e,0x0c,0x79,0x01,0x4d, - 0xd6,0x97,0x73,0xaf,0x4d,0x7c,0xec,0xab,0x4b,0xa3,0xf7,0x14,0x5b,0xf6,0xd8,0x21, - 0x54,0x5d,0x74,0x2e,0x99,0x82,0xee,0x3b,0x4a,0xa0,0x00,0xa8,0x80,0x32,0x31,0x86, - 0x5d,0x87,0x9e,0x2f,0xf6,0x60,0xf0,0xca,0x86,0x1d,0x8e,0xc7,0xdb,0x46,0x16,0x3a, - 0x03,0x39,0xce,0x3b,0x14,0x23,0x00,0x0c,0x6f,0x34,0xe4,0x09,0x76,0xa3,0x5f,0x3f, - 0x5c,0x73,0x10,0x74,0xa0,0xcc,0x19,0x41,0x39,0xce,0xfc,0xe7,0xd2,0x57,0xbb,0x38, - 0x01,0x28,0x69,0x4e,0x87,0xae,0xe9,0x08,0xf9,0x81,0x62,0x7d,0xd3,0x12,0xfb,0x10, - 0x4e,0x8f,0xc8,0x24,0x10,0x06,0x29,0x72,0x40,0x34,0xd8,0x04,0x50,0x46,0x54,0xd6, - 0x7b,0x1e,0x80,0x34,0xe0,0xe7,0xa0,0x56,0xc5,0xc1,0x90,0x14,0x51,0x27,0x41,0x81, - 0x04,0xf1,0x50,0x85,0x37,0x59,0xf1,0x7c,0xe1,0x66,0x40,0xa5,0x77,0x19,0x96,0xbb, - 0x9f,0xc5,0xf6,0xff,0x15,0xa3,0xdd,0x11,0x30,0xc1,0x2c,0x50,0x7b,0x1a,0x72,0x0b, - 0xe7,0xab,0xa0,0xec,0x1a,0x10,0x6b,0xb8,0x9d,0x15,0x51,0xd1,0x5a,0x01,0x3c,0x32, - 0x0b,0x31,0xac,0xde,0x01,0x0d,0x52,0x58,0xb2,0xc7,0x04,0x2f,0x7e,0xed,0x06,0xaf, - 0xef,0xfa,0xe2,0x6d,0x11,0x2c,0x18,0x70,0x31,0x76,0x28,0x3e,0xf7,0xee,0x21,0x79, - 0x66,0xfa,0x3e,0x33,0x1d,0x6b,0x03,0xc5,0x71,0xba,0xd6,0x2c,0xce,0xc0,0xe5,0xdb, - 0x8c,0xfb,0x3f,0x31,0xbd,0xa1,0x52,0x6c,0xef,0x73,0x8a,0x7f,0x2a,0x67,0xde,0xde, - 0x73,0x16,0x88,0xc8,0x1e,0x0d,0x04,0xdf,0xcd,0xc9,0xac,0x0c,0x35,0x6e,0x5f,0xcf, - 0xf2,0x67,0x4f,0xdc,0xe2,0xc0,0xc8,0x98,0xe8,0x73,0x77,0x5e,0xb4,0x41,0x94,0xdf, - 0xdb,0x75,0xd5,0x62,0xff,0x69,0x65,0x19,0x24,0x3e,0x85,0xcf,0xf6,0xb7,0x90,0xfd, - 0x87,0xd2,0x08,0x14,0x68,0xba,0xa3,0x51,0xe0,0x7d,0x53,0x66,0x24,0x54,0x98,0xf0, - 0xda,0xd3,0x13,0x12,0x49,0x5d,0x04,0x48,0xc9,0xdc,0xe3,0xb7,0x89,0x4b,0x2a,0x3d, - 0x05,0x4d,0x25,0x86,0xb8,0xf3,0xa6,0x1f,0x0f,0xb6,0x78,0x47,0x15,0x8d,0x22,0x2d, - 0xa3,0xe8,0x6d,0xaa,0xc6,0x4c,0x42,0x37,0xbc,0x04,0x7d,0xcb,0x34,0x53,0xe7,0x1f, - 0xc7,0x65,0x9a,0x67,0xd7,0xbb,0x1c,0x80,0x91,0x96,0x34,0x1e,0xf3,0x09,0x68,0x21, - 0x4c,0xd7,0x97,0x2d,0x08,0xb1,0x62,0x8d,0xc4,0xb0,0xe9,0x14,0x53,0xf3,0x1b,0x37, - 0x53,0x15,0x56,0x63,0x4a,0xd5,0xf6,0x3e,0x64,0xd2,0x8f,0xf7,0x74,0xd2,0xf6,0xd7, - 0xa1,0x66,0x14,0x53,0xf1,0x34,0x45,0xce,0x6a,0x71,0x75,0x8f,0x16,0xf8,0xf8,0xcd, - 0xd9,0x1e,0xff,0x46,0x3a,0x48,0x68,0x48,0x68,0x75,0xea,0xac,0xa5,0x5c,0x7e,0xb4, - 0x07,0xac,0x6e,0x83,0x0c,0xb9,0x05,0x58,0xc1,0x64,0x52,0x2d,0x62,0xf3,0xa7,0x4b, - 0xfa,0xef,0xef,0x0d,0x02,0x97,0x22,0x2f,0xb0,0xec,0x7e,0x4f,0x15,0xf1,0xff,0x1f, - 0xf5,0x13,0xaf,0x9f,0xbd,0xbd,0x47,0x94,0xcf,0x8e,0xaa,0xcc,0xee,0xf2,0x3b,0x35, - 0xac,0xab,0xce,0xac,0xc3,0xb0,0xe1,0x08,0xc2,0x71,0x96,0xaa,0x47,0xbe,0xc2,0x5e, - 0x7b,0xb2,0xba,0x5a,0x75,0x68,0xca,0x18,0xed,0xd9,0x76,0xfd,0xde,0x77,0x6a,0x4f, - 0xd2,0x27,0xdf,0xf1,0x9c,0x4b,0xa3,0x09,0x07,0x9d,0xbf,0xf8,0x5d,0xf8,0x27,0xd7, - 0xa9,0x6e,0x87,0xbd,0x40,0xb1,0xa6,0x7f,0xa9,0x8e,0x80,0x1d,0x7d,0xfc,0xb5,0x62, - 0x43,0xf7,0x37,0x86,0x15,0xe2,0x14,0xc2,0xc2,0x43,0xf6,0x46,0xab,0xff,0x52,0x50, - 0xa2,0x64,0x0a,0x96,0x14,0x11,0x48,0x99,0xe2,0x47,0xb0,0x56,0xac,0x6d,0x79,0x83, - 0x85,0x0b,0xb9,0xfa,0xb2,0x2f,0x17,0x53,0x63,0x44,0x51,0x3c,0x13,0xbf,0x53,0x14, - 0x22,0x05,0x49,0xd5,0x6d,0xde,0x49,0xa8,0x62,0x45,0xa1,0x0b,0xfb,0x96,0x92,0xb3, - 0x64,0xd9,0x55,0xc4,0x14,0x6d,0x0f,0xee,0xab,0x1d,0xe8,0x97,0x6e,0xd1,0x4e,0xf0, - 0xab,0x2f,0x98,0xc1,0x0b,0x3e,0xa4,0xf4,0x34,0x38,0x16,0x98,0xb2,0x9a,0x17,0xf0, - 0x69,0xa5,0xad,0xc1,0x81,0x26,0xbd,0xf3,0xd6,0x4e,0xc4,0x5a,0xe2,0x24,0xa5,0xd5, - 0xb5,0xd2,0xaf,0x23,0xb2,0x67,0x67,0x0c,0xe1,0xca,0x66,0x32,0x19,0x2d,0x8a,0xc4, - 0xe9,0x07,0x2e,0x89,0x3a,0x25,0x42,0x25,0xeb,0x4e,0x42,0x63,0xa5,0x14,0x6a,0x5c, - 0x89,0x04,0x4a,0xdc,0xe5,0x68,0x16,0x56,0xe8,0xc3,0xa2,0xc3,0xda,0x64,0x63,0x4d, - 0xcf,0x05,0x01,0x8f,0x9d,0x9a,0x43,0x1c,0x6b,0x4c,0x53,0x80,0xc0,0x64,0x41,0xe4, - 0x2a,0x6e,0xa4,0x62,0x40,0xa6,0x64,0xdb,0x4b,0x63,0x60,0xb9,0xa0,0x78,0x0a,0x50, - 0x0c,0x5f,0xee,0xa5,0x9a,0x7d,0x57,0xc8,0x4a,0x8c,0x9a,0xc0,0x39,0x9e,0x20,0xa4, - 0xaf,0x4d,0x8b,0x5c,0xe6,0x26,0x47,0x78,0x4d,0xb6,0xe2,0x0d,0x6b,0x66,0x24,0xb1, - 0x22,0xf5,0x03,0xb9,0x1d,0x6c,0x93,0x05,0xec,0x0c,0x44,0xe9,0xaa,0x79,0xd4,0xa3, - 0x7f,0xac,0xc5,0xdf,0x2d,0x56,0x9f,0xfd,0xae,0x53,0xc8,0xf9,0xab,0x63,0x3c,0x50, - 0x9f,0x1f,0x7b,0xf7,0x5e,0x72,0x6c,0x22,0x65,0x70,0xac,0x5a,0xdc,0x7d,0x6c,0xd4, - 0x41,0x9c,0xeb,0x6c,0x95,0x73,0x94,0xa1,0x67,0x5b,0x48,0x08,0x86,0xea,0x3d,0x51, - 0x5b,0x1d,0x54,0x5d,0xb6,0x61,0xd5,0x61,0x6e,0x54,0x83,0x15,0x0f,0xdf,0x75,0xb6, - 0x02,0x15,0x12,0x6f,0x50,0x9c,0xf9,0x33,0xe4,0x63,0x9d,0x4c,0xf5,0x31,0xeb,0x3e, - 0x24,0x67,0xde,0x2c,0x0a,0x79,0xe6,0x64,0x67,0xc9,0x8e,0x02,0x1a,0x65,0x1a,0x54, - 0x56,0x91,0x5b,0x32,0x96,0x5b,0x15,0xf6,0x8a,0xac,0xa4,0xe9,0xf3,0x79,0xc5,0xfa, - 0xc4,0x83,0x3a,0x2d,0xb4,0x7b,0x95,0x28,0xee,0x14,0x15,0xdd,0x34,0xf4,0xdd,0x53, - 0x23,0xb2,0xaf,0xa5,0xb2,0xd7,0x0d,0x93,0xab,0x3d,0x87,0x13,0x9b,0x66,0x0e,0xaf, - 0x68,0x17,0xd6,0xff,0x1a,0x54,0xd6,0x68,0xe6,0x5e,0x95,0x46,0xf5,0x05,0x76,0x1a, - 0x20,0x5d,0xa2,0x84,0x3f,0x6a,0xfa,0x45,0x08,0x1b,0xf6,0xba,0xfa,0x1d,0x67,0xcd, - 0x9d,0x97,0xe1,0x54,0xb9,0x7a,0x9f,0xb0,0xee,0x50,0x70,0x52,0x4d,0xac,0x37,0xc9, - 0xad,0x14,0x3c,0x61,0xb9,0x96,0x44,0xba,0x6b,0x13,0xe7,0x9a,0x04,0x74,0x7e,0x20, - 0x3c,0x53,0x7e,0xfc,0xe8,0x73,0xc9,0x16,0xea,0xee,0x16,0xd4,0xbc,0x12,0x99,0x3e, - 0x0b,0xde,0x57,0xbc,0x3f,0x11,0x9e,0x6c,0xd2,0xf4,0x69,0xd4,0x7d,0x5c,0xff,0x29, - 0xa6,0x95,0x99,0xbd,0xb2,0x93,0x07,0x7c,0xfc,0x32,0xb5,0xec,0xfb,0xde,0xcd,0x31, - 0xbd,0x52,0x92,0x59,0xc0,0x69,0x93,0x73,0xe8,0xcf,0xe5,0x0d,0x5c,0xde,0x18,0xd2, - 0xf3,0x8f,0xde,0xb7,0xff,0x63,0x0d,0xa6,0x47,0xb4,0x13,0x83,0x88,0x63,0x62,0xfd, - 0xa6,0x8c,0x9a,0x05,0xb6,0x42,0x00,0xe2,0xbe,0xce,0x1c,0x74,0xd1,0xec,0x41,0x43, - 0x82,0x8f,0x9e,0x14,0xcf,0xad,0x49,0xa1,0xc1,0x82,0x71,0x8b,0xe8,0xee,0x63,0xe8, - 0x26,0xe6,0xd7,0xbf,0xfe,0xac,0x59,0x77,0x81,0xce,0x40,0x10,0x74,0x9c,0xd7,0xf6, - 0xfe,0x3e,0xd8,0x77,0x77,0xab,0xb0,0xf6,0x0d,0x86,0xc8,0x9c,0xfa,0xe9,0x11,0x4c, - 0x6d,0x71,0x17,0xd4,0xa1,0xdc,0xc0,0xd2,0xae,0xa5,0xee,0x5b,0xe8,0xf7,0x3a,0x43, - 0x80,0x16,0x81,0xec,0x42,0xab,0xec,0xed,0xf5,0x94,0x8e,0x8f,0x8d,0xab,0xbb,0x20, - 0xb5,0x26,0xd1,0x90,0x49,0xaf,0xb9,0xaf,0x4d,0x6a,0x41,0xc6,0xe3,0xb8,0x1a,0xda, - 0xf2,0x87,0x22,0x75,0x1a,0xfb,0x78,0xd1,0xef,0xce,0xec,0xcc,0x58,0x45,0x4a,0x5a, - 0x0b,0x84,0x1e,0x7c,0xf6,0xea,0x45,0xd8,0xcf,0x81,0xc4,0x38,0xb4,0xe6,0x1b,0xdb, - 0x53,0x85,0x3a,0x6d,0x77,0x89,0xbb,0x27,0x6d,0x40,0xe3,0x1d,0xbc,0x64,0x61,0xe5, - 0x2e,0xee,0x95,0xb7,0xf5,0xa6,0xb8,0x59,0x8e,0x74,0xe9,0x1c,0x36,0x8f,0x5a,0xb5, - 0xe7,0x6f,0xe4,0x31,0x3f,0xec,0xed,0x4a,0xef,0xac,0x1e,0x15,0xc0,0x71,0x7b,0xb5, - 0xfa,0x0e,0xec,0xa3,0x17,0xef,0x21,0xad,0x49,0x2f,0x3d,0x43,0x59,0x7c,0xb7,0xb5, - 0x73,0x0f,0x0b,0xda,0xbc,0x4c,0xb3,0x86,0xc3,0x8c,0x12,0x2f,0xd8,0x65,0xd9,0xb5, - 0x52,0xf2,0xf2,0x3b,0x7e,0x00,0x46,0x86,0xff,0x14,0x8a,0x8f,0x20,0xe0,0x44,0xc2, - 0x0a,0x1b,0xf5,0x46,0x64,0xf2,0xf2,0xc0,0x9b,0x5c,0x74,0x0a,0x48,0xfd,0x8c,0xf0, - 0x66,0x2e,0x78,0xb1,0x94,0x1e,0x6c,0xd0,0x21,0xd7,0x50,0x24,0x75,0x2c,0x21,0x61, - 0x26,0xba,0x74,0xba,0x15,0x1d,0xf1,0x26,0xa7,0xb2,0x4e,0x80,0x55,0x0d,0x55,0x11, - 0x87,0xe6,0xff,0x95,0xdf,0xf1,0xb5,0xb2,0xe3,0xd9,0xa7,0xb5,0x37,0xf7,0x2e,0x1d, - 0x81,0xd6,0xc4,0x35,0x12,0x39,0x2d,0xfc,0x83,0xdf,0xe5,0x62,0x06,0x32,0x68,0x32, - 0x23,0xb8,0xfa,0xfe,0x31,0x24,0xfc,0x76,0x56,0x9c,0xed,0x72,0x62,0xc3,0x6d,0x2c, - 0x5b,0x1f,0x9b,0xef,0xd5,0xf9,0xf3,0xa5,0xa8,0x2d,0x87,0xe3,0xbe,0x03,0xf5,0x57, - 0xc0,0x4c,0x0f,0x10,0x75,0x97,0xa2,0xf2,0xe1,0xce,0xfb,0xdf,0x1e,0xe6,0x1e,0xda, - 0x6c,0x97,0x77,0xb3,0x9d,0x67,0x81,0xd5,0xad,0xba,0xbe,0x3a,0x81,0x5e,0x16,0x4a, - 0x92,0x96,0x7b,0x97,0xc9,0x22,0x6e,0xd8,0x29,0xdf,0x05,0xce,0xfd,0xef,0x1f,0xdb, - 0xad,0x95,0x13,0xed,0x03,0xf8,0xf3,0x2e,0xaf,0xfa,0xfb,0x5f,0x7c,0xe5,0x4f,0xdf, - 0x61,0x10,0x18,0x66,0x48,0xd8,0xb7,0xaa,0xeb,0xd1,0xf7,0xb3,0x00,0x5a,0xa6,0xcb, - 0xe1,0xde,0xee,0x22,0xc2,0xad,0xee,0x6e,0x28,0x3a,0x5a,0x7c,0x22,0xf6,0x80,0xa8, - 0xc4,0xc4,0xfb,0x5a,0x4f,0xb1,0xbc,0xa8,0x8e,0x62,0x9e,0xfc,0x3e,0xf0,0xaf,0xef, - 0xa8,0x05,0x27,0xa2,0xe6,0x4a,0xb7,0x96,0xe2,0x9c,0x77,0x8c,0x9b,0xbf,0x7f,0xdb, - 0xbb,0xdd,0xd7,0x2c,0x8b,0xda,0xbf,0x0b,0x2f,0x9d,0xf5,0xef,0x5c,0xbe,0x3a,0xf3, - 0x4f,0x06,0xe1,0x3d,0xfb,0x64,0xf7,0xdf,0xa1,0x96,0xc7,0x57,0x22,0xc6,0x9f,0xf0, - 0x05,0x20,0x2c,0x6b,0xb2,0x91,0x8f,0xc0,0xc1,0x5e,0x4d,0x04,0xc0,0x9e,0x21,0xa7, - 0x21,0xad,0xdb,0x17,0xe2,0x8d,0xea,0x66,0x3d,0xe4,0xc0,0xd6,0xa2,0xcf,0xc9,0xb1, - 0xa5,0x43,0xfe,0x15,0x99,0xb3,0x82,0xbb,0xc2,0xa0,0xa3,0x84,0xe7,0xbc,0x80,0x59, - 0xc1,0xd9,0x2a,0x60,0x79,0xd7,0x45,0xe4,0x1e,0x72,0x75,0x7f,0x39,0x10,0x70,0x6e, - 0x71,0xf0,0x58,0x1a,0xe6,0x79,0x4e,0xd5,0xa8,0x26,0x3b,0x8f,0xb2,0xca,0x69,0x23, - 0x7f,0x0a,0xc1,0x56,0xc9,0x2e,0x69,0x9f,0x6e,0x4b,0x17,0xa3,0x40,0x65,0x1e,0xd5, - 0xc9,0xd2,0x70,0xf0,0x59,0x2a,0xe2,0xc0,0xe5,0xe8,0x3b,0x86,0x1d,0xcc,0x06,0xce, - 0xe9,0xa7,0xa2,0x4b,0x3c,0xb4,0x93,0x2a,0xba,0x38,0x3e,0x53,0x92,0x8b,0x99,0xf2, - 0xac,0x02,0x09,0xf4,0x0e,0x64,0xf6,0xab,0x64,0x41,0x5a,0x4f,0x23,0xe8,0x90,0xf9, - 0x5c,0xab,0x3c,0x57,0x61,0x23,0x33,0x8a,0x21,0xfb,0x28,0xbe,0xbe,0x62,0x8b,0x18, - 0x44,0x86,0xf5,0xa1,0x89,0x66,0x8a,0xc9,0xe2,0xea,0xb2,0xc2,0x38,0xc8,0x2a,0x2a, - 0xf5,0x02,0xbf,0xa6,0x3e,0x21,0x82,0x4c,0x22,0x7d,0xb4,0x64,0xb1,0xea,0x85,0x7c, - 0xe2,0x1c,0x66,0x78,0x94,0x2f,0x6a,0x8b,0xc7,0x40,0x79,0xe2,0x87,0x9b,0x7b,0xb7, - 0x8c,0xde,0x3a,0x6a,0x3b,0x51,0x2d,0x6f,0x2b,0xcd,0x64,0x6b,0x2e,0x0a,0x15,0xbb, - 0x8f,0x8a,0x7c,0x5c,0x16,0x23,0xcb,0x0a,0x90,0x30,0xa5,0xe6,0xb0,0xf9,0x93,0xd7, - 0x26,0xe0,0x46,0x22,0xf8,0x3f,0x83,0x8e,0x89,0xe1,0xea,0x09,0x99,0xe3,0xe0,0x03, - 0x3e,0x1b,0xac,0xcd,0x90,0x53,0x8f,0xc3,0x15,0x3d,0x30,0xc7,0x4f,0xd7,0x4e,0xae, - 0xb7,0x6f,0xd4,0x76,0x8a,0x34,0x6d,0xb0,0xaf,0xf2,0xc7,0x5a,0x1b,0x21,0x00,0xbf, - 0xb2,0x4e,0x49,0x10,0xf2,0x13,0x7f,0xac,0xe2,0x13,0x4b,0xc6,0xc7,0xd5,0x3a,0xc6, - 0x41,0xd1,0x67,0xf2,0xee,0xd1,0x80,0x18,0x62,0x16,0xdc,0xf7,0x80,0x87,0xfb,0xf9, - 0x54,0x15,0xfe,0xd0,0xb6,0x23,0xfb,0x55,0x47,0x58,0x0f,0x63,0x92,0xda,0x96,0x32, - 0x2e,0x57,0x9b,0xf6,0xb6,0x9d,0x56,0x0b,0x36,0x15,0xf3,0x5c,0x34,0xd2,0x73,0x08, - 0x1c,0x4c,0x6c,0xcf,0x2f,0x83,0x26,0xd6,0x42,0x39,0xbb,0x04,0x31,0x37,0xea,0x1b, - 0x33,0x12,0x99,0xec,0x32,0xa5,0x12,0x39,0x89,0xe7,0x44,0x6c,0x3c,0xdc,0xce,0xa5, - 0xfb,0x26,0xf0,0x9a,0xd8,0xba,0x06,0xc2,0xa3,0xa3,0x4b,0xfb,0x90,0x0a,0xd4,0x0d, - 0xd4,0x57,0x91,0xef,0xd8,0x89,0x6c,0xee,0x11,0xfc,0x45,0x01,0x30,0x99,0xe3,0x0a, - 0xd1,0x13,0x7d,0x19,0xf7,0x6c,0x57,0x09,0x8a,0x4a,0xf9,0x08,0x12,0x08,0x46,0x33, - 0x59,0x1c,0x98,0xc3,0x30,0x72,0x34,0xe0,0x9b,0xd5,0x61,0xea,0x8e,0x18,0x58,0xba, - 0xd4,0xc0,0xe8,0x65,0xfd,0x99,0x04,0x2a,0x03,0x6c,0x80,0x67,0x7f,0xd6,0x87,0xd1, - 0x20,0xe3,0xa6,0x6d,0x6c,0x81,0x77,0x7b,0x6a,0x1f,0x74,0x73,0x26,0x88,0x9b,0x27, - 0x56,0x9e,0x1c,0x4a,0x5a,0x90,0x21,0xff,0x0a,0xdc,0xbc,0xf9,0x2f,0xba,0x5e,0x3b, - 0xed,0x51,0xde,0xbb,0x96,0xa4,0xa3,0xc8,0xe1,0x4a,0xe3,0xd8,0xdb,0x4d,0x3a,0xa1, - 0xee,0xc5,0x62,0x70,0xfe,0x72,0x3c,0xb6,0x6e,0xa8,0x5b,0x76,0x11,0x6a,0x37,0x61, - 0xec,0x8f,0x6c,0x05,0xc4,0xb9,0xb6,0xc3,0xe4,0x39,0x64,0xb8,0x3d,0xb1,0x13,0xa3, - 0x63,0x2c,0xa8,0x71,0x7e,0x50,0xf9,0x0e,0x71,0x6e,0x21,0x0f,0x66,0x6e,0x72,0x90, - 0xed,0xc0,0x88,0x58,0x6c,0x50,0xa9,0x62,0x3d,0x4a,0x70,0x78,0xb2,0x10,0x16,0x55, - 0x23,0x5e,0x4c,0x24,0xfc,0x63,0x1e,0x17,0x24,0xc1,0xca,0x72,0xd2,0xf3,0x5f,0xa1, - 0xe4,0x83,0x32,0x5c,0x12,0x32,0xe1,0x10,0x85,0xaa,0x47,0x94,0x3e,0x4d,0x69,0x20, - 0xb5,0x26,0x97,0xc0,0xfc,0x01,0x00,0x57,0x2e,0x84,0x58,0x6d,0x4b,0x53,0x86,0x8e, - 0x70,0x13,0xc2,0x0c,0x4f,0xa5,0x25,0xc8,0x4a,0x39,0x4a,0x69,0xb5,0x9b,0x0d,0xd3, - 0xdd,0x93,0x5a,0x0d,0xbe,0x6a,0x04,0x03,0xc0,0x4f,0xdc,0x86,0x5c,0x79,0x5d,0xc6, - 0x58,0xd0,0xde,0x5d,0x9a,0x68,0x82,0xdb,0x33,0xc5,0xd5,0x96,0x35,0xb9,0xd4,0x68, - 0xc2,0xc9,0xd5,0xaa,0x24,0xe9,0xc4,0xfb,0x89,0x89,0x85,0x86,0xbd,0x14,0x32,0xb5, - 0xfb,0x2f,0xe3,0xbd,0xdc,0x78,0x14,0x93,0xa7,0x57,0xac,0x61,0x52,0xa2,0x52,0xa5, - 0xfa,0xee,0x8d,0xaf,0xcd,0xed,0x2e,0x0a,0xcf,0xdb,0xdc,0xc1,0x5a,0x49,0xb5,0xb5, - 0x73,0x2f,0x00,0x50,0x40,0x01,0x69,0x69,0x7d,0x63,0x92,0xcf,0x08,0x51,0x90,0xab, - 0xbf,0x7e,0x5c,0x59,0x6b,0xcb,0xeb,0x45,0xe9,0x3a,0x08,0x3e,0x17,0x58,0xa4,0x89, - 0x5c,0xd2,0xfd,0x89,0xb4,0x40,0x23,0x51,0xe0,0x5b,0x8a,0x0a,0xbe,0x33,0x76,0x18, - 0x59,0x3e,0x6b,0x65,0xb1,0x3c,0x04,0x52,0x45,0x6c,0xeb,0x25,0x1b,0x5e,0xb2,0xe5, - 0xd2,0x4d,0x9e,0xb6,0x15,0x33,0x00,0x1b,0x0f,0xb6,0xcb,0x0b,0x79,0x5f,0x8d,0x63, - 0x65,0x40,0xff,0x21,0xb3,0x51,0x2b,0xd1,0x1a,0x4e,0xea,0xc4,0x87,0x55,0x75,0x3d, - 0xd3,0x17,0x82,0x37,0xf4,0xf4,0x93,0x11,0xea,0xd9,0x53,0xd1,0x1d,0x51,0x14,0xd6, - 0xc7,0x14,0x4f,0x48,0xeb,0x43,0x1a,0xcf,0x98,0x78,0x54,0x7c,0xe3,0x61,0xd7,0x3d, - 0x82,0x3d,0x52,0xc1,0x42,0xd2,0xe5,0xa4,0x0f,0x67,0x75,0x16,0x16,0xb6,0x07,0x20, - 0x23,0x3a,0xb3,0x4c,0xb3,0x1c,0x6e,0x60,0x93,0x08,0x58,0xec,0x9c,0x83,0x58,0x8d, - 0x8d,0x43,0x57,0x66,0xa4,0xf5,0xe2,0x54,0x0f,0xc9,0x64,0x5d,0x0e,0x2d,0x95,0x00, - 0xda,0x9a,0xd0,0x27,0xb0,0x14,0x8c,0x06,0x86,0xbd,0xf8,0x80,0x89,0x2a,0x27,0xcc, - 0x36,0x65,0xd9,0x37,0xac,0xf7,0xa0,0x58,0x68,0x51,0x66,0x90,0xc2,0xb8,0x91,0x8e, - 0x20,0x16,0xf8,0x0c,0x87,0x14,0x8b,0xd9,0x12,0x50,0x08,0x02,0x0e,0x44,0x1e,0x7a, - 0xf0,0x33,0x85,0xca,0xea,0x79,0xe6,0x88,0x85,0x0d,0x34,0x28,0xec,0xff,0xce,0xc9, - 0x4d,0xf9,0x6e,0x2f,0xdf,0xfd,0xee,0x89,0x5f,0x76,0xe8,0x41,0x94,0xb5,0xc3,0xef, - 0x66,0x3d,0x40,0xf8,0xd5,0x1b,0xc3,0x89,0x05,0x2f,0x14,0x14,0x17,0xb6,0x31,0x39, - 0xab,0x32,0x47,0x55,0x2b,0x2b,0x07,0xff,0x0f,0x5e,0xc1,0xbe,0x95,0x28,0x7e,0x41, - 0xe9,0x08,0x3d,0xe6,0x04,0x7d,0xd0,0x3d,0xda,0x4d,0x10,0x67,0x5e,0xcd,0x36,0xad, - 0x6b,0x96,0xac,0x58,0xa1,0x90,0xff,0xcf,0xb0,0x97,0xa5,0xb0,0x17,0x71,0x57,0xba, - 0x6b,0x0a,0x9b,0x19,0xb1,0x62,0x6a,0x06,0x61,0x2e,0xd8,0xa1,0x9a,0x6f,0x77,0xac, - 0x7d,0x4b,0x3b,0x28,0x81,0xe6,0x36,0x4e,0x18,0xdc,0xd1,0x25,0x29,0x79,0xac,0xd2, - 0x36,0x0c,0x78,0xba,0x02,0x69,0x2b,0x47,0xe3,0xfb,0x56,0xe0,0x0b,0x27,0x12,0xb3, - 0x7f,0x47,0x70,0xcb,0x01,0x68,0x6a,0x40,0xd0,0xea,0xa0,0x67,0x2b,0x21,0xc5,0x33, - 0x69,0x5c,0x3e,0x82,0xa1,0x58,0x0f,0x83,0xc6,0x7b,0x6a,0x87,0x7e,0x9b,0x0f,0x3f, - 0x62,0x08,0x2a,0x15,0x9b,0x66,0xf9,0x02,0x60,0xc4,0xff,0x4d,0x5f,0x25,0xb1,0x49, - 0xf0,0x00,0xd2,0x26,0x6c,0xed,0xd2,0x48,0x2f,0xd5,0xb2,0x35,0x3b,0x51,0xbd,0x3c, - 0xd5,0xb8,0x1a,0x63,0x94,0x8f,0xf6,0xab,0x6b,0xe4,0xc8,0x8b,0xb2,0x0d,0x78,0xcb, - 0x0b,0x4c,0xd7,0x05,0x7c,0x69,0x6b,0x0e,0x31,0x45,0x00,0xde,0x5c,0xe7,0x2c,0x25, - 0x68,0xa4,0x45,0x5d,0x9d,0x07,0x8c,0x49,0x49,0x54,0xa3,0xad,0x22,0xdf,0xbd,0x6b, - 0x10,0xfc,0x2e,0x68,0x97,0x6d,0xb5,0x9b,0xc6,0x41,0xdd,0xc4,0xb3,0x3d,0x1b,0xb0, - 0xd3,0x40,0xdb,0xd8,0x42,0x2a,0x3d,0x83,0xfe,0xdb,0xa2,0x0f,0x63,0x66,0x77,0xc0, - 0xae,0x42,0xf9,0xbe,0xaa,0x83,0xaa,0x4e,0x6b,0x22,0xab,0x4a,0x33,0x1f,0x35,0xf9, - 0xe8,0xf0,0xb0,0x2e,0xab,0x6d,0x74,0x3e,0x15,0xe0,0xe1,0x8d,0xfe,0xce,0x20,0x3c, - 0xdc,0x54,0xba,0x4c,0x36,0x92,0xc4,0x48,0xd2,0x6d,0xd9,0xd7,0x67,0x32,0x36,0x7e, - 0xfc,0x4c,0x48,0xe7,0x2a,0x73,0x46,0x1a,0x59,0xfe,0x0f,0x47,0xf5,0xfc,0x7b,0x30, - 0x7c,0xd1,0xf4,0xc5,0xb4,0x1e,0xed,0x81,0x82,0x53,0xd3,0xc7,0x93,0x0b,0xa2,0x15, - 0x9c,0x99,0xcb,0xf7,0xd2,0x0a,0xbd,0xc3,0x83,0x04,0xcf,0x02,0xf7,0xb1,0x3c,0x70, - 0xb8,0xe1,0x38,0x35,0x0a,0xd4,0x74,0x66,0x8b,0x57,0x14,0xbd,0x21,0xd9,0x9e,0x2c, - 0xfd,0xee,0x33,0x36,0x9f,0x3a,0x27,0xd7,0xc2,0xea,0x49,0x16,0x10,0xbf,0xe5,0x32, - 0xc8,0xe2,0x05,0x9c,0x94,0xbd,0x95,0xa5,0x64,0x5b,0x44,0x07,0x5e,0xdb,0x27,0xea, - 0x81,0x55,0xf3,0xfc,0x90,0xb8,0x66,0xb6,0xed,0x88,0xcb,0xdd,0xf5,0xcf,0x2b,0xf7, - 0xb1,0x25,0x15,0x7f,0xbc,0xb5,0x68,0xaf,0xc9,0xa7,0x94,0x6c,0x38,0xcd,0x8b,0xea, - 0x96,0x5b,0x8c,0x5c,0x3d,0x15,0x7a,0xc7,0x5a,0xd9,0xdc,0x47,0xa1,0x23,0xeb,0x1b, - 0xa4,0x12,0xd5,0x3a,0xbe,0xf8,0xcc,0xa9,0xee,0xca,0x5e,0xaf,0xf4,0x47,0x17,0x6d, - 0x48,0x14,0x4b,0x19,0xf7,0x4a,0xb4,0x9f,0x04,0x39,0x5f,0x28,0xc5,0x44,0x9e,0xbe, - 0xcb,0x23,0x9c,0xfa,0x52,0x2d,0x69,0x6d,0x95,0x30,0x95,0x1c,0x72,0x73,0xb1,0xb3, - 0xa6,0xeb,0x32,0xaf,0x0b,0x7f,0x0a,0x66,0x68,0x1d,0x5a,0x1e,0xfb,0x9f,0x79,0x10, - 0xca,0xc1,0xbe,0xbf,0x1d,0x13,0x69,0x4d,0x34,0xf3,0x17,0xb4,0xfb,0xf5,0x07,0xa9, - 0x63,0xdc,0xc0,0xb1,0x1a,0xe0,0xb7,0x51,0x66,0xe2,0x1f,0xa4,0xfa,0x72,0xb7,0xf1, - 0x26,0x2f,0x62,0xf6,0xbf,0x51,0x0b,0x52,0xc4,0xd6,0xf9,0xd6,0x61,0x31,0x30,0x23, - 0xa4,0x7e,0xf0,0x13,0x49,0xa5,0x1f,0x92,0x76,0x96,0x4e,0xc5,0xd9,0xec,0x75,0xf0, - 0xa2,0x2f,0x61,0x96,0x21,0xaf,0x39,0x2b,0x14,0x33,0xcf,0x21,0x35,0x61,0x17,0xce, - 0xab,0x5c,0x92,0x68,0xfd,0xae,0x04,0xd5,0x48,0x7e,0xc4,0xb3,0x9f,0xee,0x98,0x31, - 0x24,0xe8,0xef,0x72,0xea,0xe0,0x22,0x19,0x90,0x6b,0xe1,0x8c,0xf3,0x5b,0xf8,0x20, - 0xec,0xa6,0xb2,0x32,0x7f,0xb4,0xd4,0x00,0x8d,0x46,0x81,0x0d,0xf0,0x6e,0x07,0x9b, - 0x87,0xa6,0x9f,0x7f,0x4a,0x17,0xa5,0xc3,0x2b,0xb6,0xab,0x51,0xbe,0xf7,0x17,0xf7, - 0x6e,0x3d,0x90,0x31,0xb4,0x96,0x07,0xc3,0x26,0x61,0x82,0x46,0xe7,0xa5,0x9d,0x3a, - 0x8d,0x27,0xb4,0x6c,0xeb,0x29,0x54,0x8e,0xa5,0xeb,0x5e,0x5d,0x47,0xaa,0x54,0xbf, - 0x6e,0x85,0xf8,0xa9,0xf6,0xcd,0x20,0x38,0xdf,0xc3,0x8d,0xf7,0xdd,0x89,0x71,0x75, - 0xee,0x6e,0x3a,0xfc,0x18,0x27,0x29,0x29,0x7f,0x57,0xf5,0x84,0xdd,0x6a,0xbc,0xe8, - 0x09,0x00,0x93,0x9b,0xd7,0xa6,0x3a,0x21,0xe7,0x7f,0x86,0x2f,0x26,0x5f,0x70,0xb4, - 0xb5,0x28,0xc5,0x48,0xce,0xc8,0xa6,0x99,0x60,0x61,0xfd,0x44,0xbf,0xe3,0x12,0x5e, - 0xef,0x0c,0x90,0xbe,0x1b,0x70,0xaa,0x09,0x61,0x6e,0x71,0x00,0xfc,0x88,0x33,0xa9, - 0x6e,0x25,0xdb,0xb1,0x32,0xa3,0x21,0x5a,0xe8,0x61,0xcd,0x47,0xd8,0x56,0x03,0xa8, - 0x0b,0x22,0x91,0xbf,0x9b,0x82,0x2f,0x88,0xe5,0xff,0x44,0x9d,0x36,0xfe,0x90,0x60, - 0xac,0xcf,0x64,0x17,0x95,0x1d,0x9f,0x27,0xf7,0xcf,0x74,0x37,0xd5,0x9e,0xf8,0x95, - 0x4e,0x9e,0xa4,0x92,0xbc,0xd3,0x07,0x12,0x88,0x51,0xc9,0xf6,0x35,0x24,0x03,0x33, - 0x20,0x36,0x6c,0x03,0xfe,0xa5,0x4a,0xf9,0x11,0x4e,0x8b,0x6a,0xf2,0x50,0xad,0xfd, - 0xa3,0x63,0x93,0x5a,0xb3,0x11,0x07,0x5c,0x65,0x83,0x70,0xb5,0xf9,0xce,0xc4,0xd1, - 0x4c,0xf0,0x50,0xa4,0xc9,0x19,0x12,0x46,0x8d,0x57,0x8a,0xcf,0xc9,0xb6,0xac,0xcf, - 0xbd,0x98,0xd4,0x25,0x03,0xd0,0xa8,0x35,0x8e,0x56,0xcb,0xcf,0x87,0x64,0x3b,0x21, - 0xa2,0xab,0xf4,0x43,0xef,0xad,0x4e,0x70,0xcc,0x79,0x39,0x03,0x4a,0xc7,0x96,0xf4, - 0x06,0x68,0xd5,0x24,0x8b,0x03,0x1b,0x96,0x84,0xd3,0x4a,0xda,0x03,0xa6,0x43,0xe8, - 0xdb,0xfd,0x9e,0x7e,0x01,0x69,0x0d,0xca,0x2c,0xa3,0xb4,0x50,0xa8,0x82,0x8e,0x89, - 0x47,0xfd,0x58,0x6d,0xb1,0xb4,0x01,0xf5,0x84,0xa2,0x7d,0xfe,0x71,0x74,0x1f,0x74, - 0x64,0x59,0xd9,0x89,0x5d,0x39,0xc8,0xa9,0xe0,0xa6,0x89,0x67,0x73,0x7c,0x71,0x79, - 0xa9,0xc6,0x6f,0x0b,0xad,0xb1,0xae,0x3f,0xcc,0x02,0xc1,0x77,0x14,0xa1,0x38,0x28, - 0x2a,0xa1,0x46,0xd4,0xb2,0xb1,0x0f,0x9b,0x40,0xca,0x36,0x2b,0x59,0x5c,0xce,0xa9, - 0x8c,0x1e,0xb6,0xda,0x8a,0x32,0x2e,0x52,0x21,0xdc,0x9c,0xe3,0x7c,0xbd,0x55,0xfb, - 0x6d,0x31,0x1e,0xe8,0x1f,0x31,0x7f,0xef,0x69,0xcd,0xe6,0x9c,0xce,0x92,0x88,0x28, - 0x23,0x92,0xb7,0x03,0xd4,0x8e,0xec,0x7f,0xdc,0xc1,0xc3,0x6a,0xdb,0xff,0xa7,0x38, - 0x85,0xe3,0xfe,0x28,0xfb,0x51,0x83,0x34,0xa1,0xef,0x56,0xd5,0x76,0x71,0x5b,0xf8, - 0xff,0x4c,0xf6,0x69,0x33,0xc3,0x0f,0xb4,0x60,0x26,0x39,0xd8,0xff,0xda,0x58,0xae, - 0x25,0x09,0x41,0xcc,0x6f,0xaf,0x06,0xd1,0x73,0xe3,0xcf,0x80,0xe4,0x19,0xf6,0x99, - 0x24,0xbc,0x59,0x97,0x2b,0x97,0x21,0xce,0xe0,0xe1,0x51,0xcd,0x7f,0x98,0x60,0xb3, - 0xa1,0x16,0xc0,0xa9,0x70,0x8f,0x8f,0x93,0x3d,0xcf,0x89,0x05,0xd2,0x36,0x30,0x74, - 0x30,0x01,0x48,0x6b,0x39,0xf0,0x83,0x54,0xc1,0x41,0x27,0x06,0x91,0x65,0xf9,0x31, - 0x02,0xa0,0x92,0xe1,0xf9,0x95,0x55,0xd0,0xb5,0xe9,0x7d,0x17,0x18,0x0f,0xf1,0xaf, - 0x93,0x4a,0x99,0xd1,0xba,0x74,0x53,0x13,0x82,0x46,0x22,0x32,0x3a,0x04,0x9d,0xe8, - 0x2e,0x0e,0xba,0x1c,0xbb,0x23,0x25,0x10,0x4e,0x93,0x40,0xd0,0xf6,0x2a,0x8d,0xe9, - 0xaa,0x49,0xb2,0x0c,0xba,0x32,0xe1,0x47,0xc6,0x9f,0xfa,0x3e,0x83,0x64,0x23,0xcd, - 0x29,0x80,0x01,0x8f,0x22,0xbe,0x5d,0xc1,0x26,0x07,0xdd,0x4b,0x5d,0x5a,0x39,0xe6, - 0x70,0x49,0xed,0x6b,0x62,0xb0,0x53,0x2c,0x20,0xfa,0xe4,0xc5,0xd9,0x07,0xbd,0x0f, - 0xe3,0x86,0xfc,0xe8,0x38,0xc1,0x2a,0x4c,0x22,0x41,0x35,0x12,0x3b,0x68,0xa9,0xa6, - 0x2f,0x6e,0x1e,0xaf,0x35,0xa0,0x60,0xc8,0xd1,0xe2,0xfa,0xf6,0x58,0xcd,0xa4,0xb6, - 0x63,0x64,0x53,0x0a,0x7b,0x88,0x41,0xeb,0x21,0x0a,0xaa,0x1e,0xfc,0xe7,0xb0,0xa9, - 0x08,0xfe,0xad,0xf9,0x70,0x6c,0xff,0x5d,0x36,0x2d,0x82,0xb5,0x7e,0xef,0xc4,0x69, - 0xe8,0x5e,0x1c,0xfd,0xd1,0x9f,0x4d,0xeb,0xc5,0xaf,0x80,0x19,0x43,0xa2,0x54,0x95, - 0x03,0xf2,0x4c,0x6d,0xa7,0x37,0x1e,0xc2,0x73,0x1e,0x94,0xac,0x90,0x3e,0xd3,0x69, - 0x1e,0x5f,0x1c,0x01,0xcb,0xcf,0xf9,0x33,0xa0,0x5a,0x2d,0x62,0x32,0x0a,0x8f,0xb1, - 0xcf,0x73,0x7a,0x77,0x10,0xb4,0x8d,0xce,0xc2,0xf3,0x40,0x1d,0x0a,0x88,0xff,0xb0, - 0xa2,0x02,0x96,0x4e,0x31,0x8e,0x6e,0x08,0xcf,0x1b,0x05,0x91,0x9b,0xf7,0x80,0x36, - 0x33,0xb8,0x33,0xa6,0x51,0xca,0xe3,0xbf,0xf6,0x88,0xa4,0x87,0x28,0xde,0xd5,0x29, - 0x03,0xbb,0xfb,0x1c,0xd2,0xc9,0x54,0x07,0xc6,0x2a,0xad,0xc2,0x1b,0xd5,0x07,0x37, - 0x87,0xcc,0x36,0xaa,0xdb,0x3a,0xf4,0xd5,0x6e,0xfa,0xa5,0xf1,0x13,0xa2,0xc6,0x61, - 0xe0,0xb5,0x02,0x89,0xb7,0x3c,0x4f,0xe3,0x81,0x89,0x0d,0x50,0xd6,0x3a,0x34,0x6b, - 0x5d,0x02,0x4e,0x60,0x84,0x94,0x00,0x84,0x48,0x49,0xeb,0x5e,0xd8,0xff,0x14,0x3b, - 0x57,0x0a,0x83,0xca,0xb9,0x6a,0xef,0x41,0x71,0x17,0x4c,0xc8,0x77,0x7c,0xa1,0x7f, - 0x29,0xc3,0x16,0x5a,0x7b,0x6b,0x25,0x31,0x4e,0x4b,0x41,0x3f,0x43,0x86,0x23,0x35, - 0xa9,0x07,0x39,0xb2,0x14,0xe3,0x89,0x7a,0x22,0xf1,0xae,0xdd,0x50,0xd3,0x31,0x50, - 0x8e,0x9e,0x6e,0xaf,0x19,0xee,0x9a,0x03,0xe6,0x46,0xa0,0x5c,0x33,0xbe,0xc3,0xaf, - 0xca,0x5e,0xf9,0x6c,0xc6,0x91,0x8c,0x7b,0xea,0x1f,0x83,0x93,0x90,0x7d,0x4f,0x23, - 0x8f,0xb2,0xb1,0xda,0x1a,0xe0,0xe6,0x9f,0x31,0xd4,0xd3,0x1a,0xdf,0xf2,0x38,0xad, - 0xa5,0x1f,0xa0,0xfa,0x10,0x5b,0x32,0xd1,0x30,0xc4,0x8e,0x0f,0x8e,0x6b,0xd7,0x68, - 0xcf,0x8e,0x44,0x94,0xaf,0x15,0x2f,0x75,0x87,0x41,0xd9,0xf6,0x10,0x8d,0x95,0x61, - 0x09,0x74,0x1a,0x83,0xc4,0xc7,0x34,0x32,0xbc,0x6f,0x91,0xcd,0xbd,0xf3,0xd2,0x97, - 0xfe,0x97,0x91,0x88,0x17,0x94,0x31,0xe4,0x2c,0x12,0x83,0xa4,0xe9,0x9c,0x1e,0x44, - 0x65,0xb2,0x0c,0x35,0x38,0x02,0xb4,0xb2,0x38,0x3b,0x08,0xa1,0xbf,0x47,0xc4,0x21, - 0x44,0x23,0xc8,0xbc,0xfe,0xe6,0x9f,0x56,0x30,0x00,0xe2,0x74,0xe4,0x48,0xb2,0xb0, - 0x0a,0xc7,0xb7,0x34,0xf4,0x2f,0xdd,0x8b,0x23,0x8b,0x97,0xb7,0x3f,0x8c,0x25,0xa3, - 0x07,0x98,0xf3,0x55,0x05,0xaf,0xa6,0x5b,0xf8,0xc7,0xab,0x07,0x57,0xf1,0x7b,0xb5, - 0xa9,0xca,0x81,0x6c,0xca,0xa0,0x2a,0x3b,0xc3,0x4e,0x88,0xbd,0x68,0xb7,0x9e,0x78, - 0x80,0x7f,0xd2,0x5b,0x60,0xab,0x63,0x70,0xea,0xd9,0x9a,0x52,0xcf,0xe3,0x3b,0x0c, - 0x2d,0x15,0x25,0x7d,0x3f,0xcf,0x31,0x6b,0xd4,0x47,0x1f,0x40,0x06,0x61,0x10,0x85, - 0x8e,0x2b,0x74,0x1f,0xb9,0xe9,0x05,0x07,0x6a,0x8a,0xe9,0x9f,0xc5,0xab,0x7c,0x8f, - 0x9c,0xcd,0x60,0x5d,0x38,0x2f,0xab,0x7e,0xaf,0x73,0xfa,0x63,0x96,0x6f,0x11,0x1d, - 0xf2,0x3b,0xd4,0xef,0xd5,0x87,0x68,0xa8,0xb0,0x10,0xa3,0x65,0xb6,0x2e,0x1c,0x39, - 0x4c,0x8e,0xc5,0xea,0xf4,0xc2,0xe3,0xce,0x39,0x33,0x3f,0x7c,0xb4,0x64,0x50,0x2b, - 0x0f,0x90,0xb1,0x5d,0x2c,0x06,0x29,0xe4,0x38,0x8e,0x03,0x0c,0xb9,0xad,0x1a,0xba, - 0xc6,0x4f,0xac,0xed,0x32,0x79,0x6e,0xb6,0xc3,0x91,0x8c,0x34,0x7c,0xf8,0x75,0x3d, - 0x80,0x9a,0xf2,0x32,0x05,0x1a,0x82,0xb7,0xc0,0x51,0x9c,0xa3,0x0a,0xf1,0xe4,0x72, - 0xd0,0x32,0x8c,0xa7,0xac,0x80,0x6c,0xe9,0x41,0xd3,0xb3,0xe2,0x89,0xf0,0x21,0x7b, - 0x68,0xde,0x79,0xbb,0x8a,0x6a,0xc5,0x5b,0x74,0x9e,0x66,0x33,0xf3,0xda,0x2b,0x33, - 0x85,0xd4,0x50,0xa4,0xc9,0x10,0x54,0xc6,0x8f,0xa7,0xad,0xcb,0xd1,0xf7,0x84,0xfa, - 0xa0,0x44,0x48,0xb4,0xc4,0xd0,0x2f,0x77,0xd8,0x94,0x66,0x94,0xfa,0x73,0x57,0xfd, - 0x05,0xd7,0xb1,0xc1,0x7e,0xb5,0xd9,0x66,0x51,0x7b,0xb1,0xff,0x74,0x81,0x57,0x3b, - 0x71,0x58,0xd5,0xea,0x5c,0xd4,0xde,0x53,0x3b,0xf4,0xbb,0xb7,0xfb,0x7c,0x30,0xfa, - 0x8b,0xd5,0x7f,0x29,0x47,0xea,0xc9,0x6d,0xae,0x98,0x82,0x53,0x7c,0xb9,0x78,0xdc, - 0x47,0x14,0x75,0x38,0x3b,0x13,0x1e,0x5c,0x49,0x54,0x45,0x56,0xf5,0x95,0x8b,0x19, - 0xee,0x92,0xfc,0x28,0xc3,0x65,0x3f,0xbb,0x11,0x52,0x48,0xdd,0x3e,0xfa,0xd7,0x99, - 0xd1,0x30,0x17,0x59,0xa5,0xbf,0x41,0x93,0x06,0xea,0x07,0x20,0x08,0x72,0xf6,0xb4, - 0x89,0x8c,0xdd,0x72,0xd5,0xff,0x4c,0x19,0x08,0x71,0xf2,0x08,0x5c,0xae,0xd5,0x3c, - 0x3f,0x60,0x72,0x2e,0xbf,0x14,0x76,0xfe,0x46,0x03,0x9c,0xee,0x7c,0x3d,0xd8,0x2d, - 0x9d,0x80,0x0b,0xbc,0x90,0x18,0xa5,0xac,0x24,0x44,0x68,0x9c,0xcf,0x90,0x97,0xff, - 0x4e,0x3e,0x3f,0x55,0xbe,0x3f,0x41,0x22,0x14,0x44,0xc1,0x97,0x9f,0x40,0x20,0x08, - 0xe9,0x19,0xf8,0xec,0x78,0x6d,0xa8,0xde,0xa9,0x03,0xa8,0xde,0xfc,0x6d,0xcc,0x00, - 0x69,0x0c,0x60,0x14,0x94,0x61,0x42,0x44,0x29,0x02,0x63,0x4b,0x62,0x21,0x13,0xfa, - 0x7f,0x6e,0xe1,0xa5,0xcc,0x2d,0xbd,0xbf,0xc3,0xea,0x76,0xda,0x21,0xb4,0x1f,0x73, - 0xe1,0xff,0xb3,0xfd,0xcb,0x6c,0x67,0x37,0x20,0xc0,0x32,0x72,0xdf,0xbf,0x78,0x10, - 0x12,0x0b,0xc6,0xac,0x2a,0x69,0x90,0x98,0xca,0x06,0x73,0xc1,0x8e,0xe7,0x28,0xf0, - 0x1f,0x08,0xee,0x7c,0xb0,0xa0,0x26,0xf2,0x61,0x04,0x65,0x33,0x5d,0xe7,0xf5,0xb1, - 0xde,0x09,0xbf,0x6d,0x7b,0x7f,0x8a,0x92,0xc4,0xa7,0xf2,0xd4,0x0a,0xa5,0x03,0xb3, - 0x20,0x01,0x36,0xbd,0xdf,0x68,0x63,0x93,0x41,0x4f,0xa7,0xc0,0x32,0xc8,0x7c,0x0e, - 0xe9,0x8b,0xe2,0x48,0x5f,0xa3,0xe7,0xdb,0xc4,0x45,0x56,0xe6,0xe3,0x97,0x8d,0x58, - 0xd5,0x2a,0x43,0xfe,0x9b,0x61,0x52,0xbd,0xa0,0xea,0xe2,0x1b,0xa4,0x66,0x1e,0xfa, - 0x04,0x48,0x07,0xef,0x1a,0x62,0x6d,0x98,0x45,0xbc,0xf3,0x6d,0x3a,0xb7,0xa8,0xb9, - 0x51,0xfa,0x93,0xed,0xe6,0x24,0x01,0x3c,0x3e,0xfe,0xfb,0x7d,0x37,0xe0,0x12,0xc9, - 0x69,0xbe,0x9b,0xc8,0xbf,0xdd,0x5b,0x78,0xe9,0xc1,0x07,0x9f,0x6c,0xc3,0x72,0x88, - 0xfc,0x02,0xb4,0x2c,0xbe,0x43,0x60,0x87,0x4f,0x96,0x0c,0x12,0xd6,0x1b,0x3b,0xcb, - 0x8f,0x64,0x3b,0x3f,0x71,0x77,0xac,0xed,0xbd,0xcb,0x86,0x9e,0xe8,0x3b,0x73,0x89, - 0x70,0x00,0xa9,0x2d,0x9a,0x3d,0x2b,0x3f,0xa5,0xe2,0x93,0x54,0x13,0xac,0xd4,0xb1, - 0x11,0x91,0xfc,0xe6,0x71,0x38,0x6a,0xa6,0x81,0xd3,0xde,0x4b,0xd3,0x76,0x32,0x21, - 0x82,0xe4,0xb4,0xc4,0x39,0x3e,0x64,0xa1,0x47,0x55,0x9e,0x56,0xd0,0xfb,0xd3,0x05, - 0x97,0xab,0xfd,0x07,0xb5,0x16,0xe4,0x52,0x6c,0x8f,0xc5,0x8a,0x51,0xfa,0x59,0xaf, - 0x83,0xa6,0xed,0xd1,0x31,0x3e,0x69,0x95,0xc1,0x13,0x60,0x57,0x73,0x70,0x0e,0x1f, - 0x81,0x12,0xbc,0x40,0x09,0x7b,0x72,0x80,0x23,0xef,0x82,0x4c,0x99,0x67,0xf8,0x32, - 0xa1,0x5d,0x88,0xa6,0x00,0x95,0xc1,0x7e,0x14,0x90,0x0e,0xc4,0x77,0x8a,0xcd,0xa1, - 0x43,0x19,0x8d,0xc0,0x90,0xb7,0x7d,0x19,0x2e,0x14,0x54,0xe7,0x75,0xdb,0x86,0xc1, - 0x00,0x72,0x35,0x3d,0x69,0xfa,0x82,0xd9,0xe5,0x1f,0xe7,0x44,0x99,0xa8,0x91,0xb2, - 0x5c,0x03,0x8c,0x8e,0x9b,0x23,0x96,0x8b,0x86,0xf5,0xd6,0x5c,0x24,0x77,0xa9,0x39, - 0xfd,0x1a,0xd6,0xc0,0xbb,0x31,0xe8,0x18,0x2f,0x7b,0xd4,0x5e,0x38,0x99,0x03,0x0d, - 0xf4,0x5a,0x40,0xeb,0xd9,0x1a,0x8c,0xc9,0xec,0x7f,0xf7,0x0d,0x4c,0x77,0x28,0xa4, - 0x79,0xca,0xa7,0xff,0x4e,0x5e,0x7f,0x06,0x4a,0x56,0xe7,0x3f,0xdb,0xd9,0x7e,0x98, - 0x2e,0x13,0xb9,0x31,0x32,0x7e,0x6d,0x6c,0x51,0x13,0xe5,0x5d,0x82,0xbf,0x4a,0x3a, - 0xa9,0x55,0xee,0x51,0xb9,0x39,0x9b,0x05,0x53,0xe6,0x70,0xef,0x1d,0x39,0x27,0x8d, - 0x9d,0x95,0x9b,0x57,0x5b,0xc1,0x1f,0xcc,0xc8,0x9d,0x0a,0xf5,0xfc,0x95,0x12,0x3b, - 0x29,0x57,0x81,0xbf,0xf8,0xcf,0xca,0x7d,0x99,0x0d,0xf9,0x4c,0x77,0xd2,0x03,0x3e, - 0xe5,0x2f,0x14,0xf6,0xeb,0xaf,0xe4,0x33,0x6a,0x4b,0xb4,0xc4,0xb5,0x5f,0x4e,0x7a, - 0x06,0x92,0xa2,0x17,0xb6,0xa7,0x02,0x82,0xff,0xc5,0x10,0xbb,0x71,0x4c,0xf1,0x70, - 0xa2,0xee,0xc1,0x43,0x9b,0xaf,0x4d,0x1a,0x2f,0x86,0x4e,0xa3,0xff,0x74,0x17,0xb2, - 0xc6,0xa3,0xa5,0x10,0x34,0x2b,0x78,0x40,0xaf,0xaf,0x27,0xd7,0xd9,0xa1,0x00,0x06, - 0x41,0x09,0x58,0x76,0xc4,0xeb,0xe9,0x82,0x01,0xdf,0x50,0x75,0x3c,0x80,0x10,0xd0, - 0x02,0x6e,0xee,0x30,0x57,0xea,0x28,0x72,0x5e,0xc4,0xc0,0x88,0xfb,0xe8,0x19,0xc1, - 0x83,0xdc,0xbf,0x37,0x9e,0xbd,0xb6,0x05,0xe7,0x5e,0x48,0xe3,0x8f,0xb5,0x33,0x7e, - 0x24,0x81,0xf9,0xd2,0x8f,0x2a,0xaf,0x27,0x40,0x24,0x06,0x05,0x24,0x58,0xdd,0x75, - 0x4c,0x27,0xe2,0xec,0x9e,0xa0,0x50,0x07,0x4f,0x6a,0x6e,0x51,0x5a,0x93,0xfa,0x9e, - 0x3a,0x30,0xd2,0x7c,0x5c,0x29,0xc1,0x01,0x2f,0x69,0xda,0x7e,0x53,0xe4,0x75,0xfb, - 0xe2,0x2b,0x67,0x6d,0xdd,0xea,0x0d,0x9a,0xad,0xaa,0xdc,0x69,0xd8,0xab,0x15,0xaa, - 0x2e,0x26,0xd3,0x7d,0xdc,0xaa,0x69,0xcb,0x81,0x7a,0xf1,0xc4,0x7e,0xe6,0x7a,0x77, - 0xaf,0x06,0x1d,0xca,0x6b,0x24,0xb2,0x1e,0xdf,0x82,0xcc,0xc3,0x22,0x43,0x52,0x8a, - 0xbc,0x82,0x2a,0xb7,0xfa,0xa7,0x52,0x96,0xab,0xb6,0x84,0xd2,0xa6,0x4e,0xcd,0x1b, - 0x9e,0x81,0xeb,0x4b,0x19,0xbc,0x77,0x97,0x46,0x35,0x26,0x1c,0xe8,0x3d,0x0b,0xee, - 0xa1,0x82,0xe9,0x3d,0xf7,0x26,0x6a,0x68,0x90,0xa7,0xae,0x8c,0xe5,0x72,0x22,0x26, - 0xa4,0xbc,0x9c,0x79,0xb6,0xb8,0x46,0xa7,0x68,0xbe,0xee,0xa7,0xd7,0xf6,0x7e,0x6e, - 0x9f,0x6a,0x94,0xd1,0xeb,0x0e,0xbc,0x91,0x8b,0x9d,0xc4,0x34,0x57,0x61,0x1f,0x70, - 0x8a,0x3d,0xd7,0xe5,0x47,0xd7,0x15,0xa2,0x69,0xda,0xe5,0x22,0x97,0x12,0x51,0x7e, - 0xd5,0x28,0x96,0x09,0x46,0xdd,0xff,0x5b,0x37,0x1e,0xe7,0xb2,0x56,0xf5,0xbb,0xb0, - 0x85,0x92,0xba,0x24,0x22,0x31,0x2d,0x54,0xc3,0x2b,0x20,0x04,0xda,0x59,0x0c,0x96, - 0xa7,0x98,0x54,0x36,0x6f,0xae,0x26,0xf0,0xd4,0x7c,0xee,0xf3,0x88,0x78,0xed,0x3f, - 0xe6,0x99,0x9b,0xef,0x85,0x44,0x99,0x90,0xd2,0x20,0xa7,0x05,0x1f,0x15,0x27,0x0c, - 0x04,0x91,0xeb,0xb1,0x38,0x11,0x68,0x79,0xe6,0x57,0x29,0xb8,0x0a,0x8b,0xd9,0x0e, - 0x5b,0xf1,0x99,0x1c,0x2c,0x25,0x6e,0xae,0xc4,0xad,0x3e,0x73,0xdd,0x70,0xae,0x67, - 0x67,0x14,0xce,0xde,0xd3,0x34,0x3e,0x2e,0x5e,0x58,0x0b,0xdc,0x3c,0xf1,0xf8,0xa6, - 0x8e,0xb8,0xc5,0x8f,0xbd,0xb9,0x67,0xa6,0xe6,0x98,0xb3,0x4d,0x7e,0xf9,0x51,0x3f, - 0x9e,0xda,0xd7,0x1d,0xbc,0x3c,0x87,0x39,0xcf,0xeb,0xc7,0x3d,0xdf,0x5b,0xb0,0x6f, - 0x8f,0x16,0xf7,0x8e,0x76,0x47,0x9e,0xda,0xee,0x7c,0x0f,0x9c,0xc5,0xe3,0x6a,0x38, - 0x8e,0x15,0xfe,0x4e,0x7f,0x30,0xcc,0x0b,0x5f,0xcc,0xc9,0x57,0x8f,0xee,0x9a,0x29, - 0x0f,0x16,0xe3,0x4b,0xdd,0xff,0xb7,0x12,0x78,0xda,0x40,0x42,0x0a,0xad,0xef,0x39, - 0xd0,0xc0,0xb6,0xce,0x18,0xfe,0x26,0x66,0x4a,0xd4,0x3f,0xe3,0xa0,0xbe,0x3a,0xf3, - 0x34,0xaf,0x2c,0x96,0x1c,0x2a,0xcf,0xdf,0xa9,0x11,0x10,0x26,0x60,0x7b,0x1f,0x92, - 0x04,0x69,0x98,0x28,0x55,0x20,0x1c,0x2d,0xa8,0xd0,0x58,0x70,0xc2,0x23,0x94,0xf2, - 0xf0,0xad,0x82,0xa5,0xe0,0x12,0xbd,0xb3,0xd0,0x4a,0xa5,0x53,0x2f,0x0e,0x31,0xc1, - 0x76,0x0c,0x8f,0x10,0x97,0x89,0xb5,0xa3,0xd1,0x4b,0x11,0x34,0xd2,0x11,0x7e,0xe0, - 0x23,0x17,0xfe,0xe5,0xf1,0x2d,0x86,0x93,0x2c,0x28,0x28,0xe0,0x29,0xed,0x37,0x22, - 0x69,0xa6,0xaa,0x74,0xfa,0x06,0x66,0xc5,0x89,0x76,0x1c,0xf2,0x35,0x64,0x7f,0xf5, - 0xe2,0x46,0x5b,0x82,0x7b,0x65,0x6f,0xc9,0x08,0x15,0xb1,0x67,0x87,0x6b,0x32,0xa0, - 0x8e,0x07,0xab,0x54,0x90,0x5d,0x11,0x65,0xa0,0xb8,0x0b,0x71,0x5b,0xa4,0x62,0x49, - 0xbf,0x05,0x4c,0xcb,0xf1,0xd3,0x92,0x35,0x14,0xe5,0x52,0x68,0x8e,0x2a,0x06,0xf3, - 0xa8,0x81,0xe8,0x1c,0x1a,0x69,0x12,0xb8,0xa0,0xf8,0x36,0x4f,0x2e,0xef,0x49,0xf2, - 0x2b,0x0c,0xe1,0x0c,0x71,0xf1,0x86,0x6e,0x0a,0x5a,0x1b,0x28,0xdb,0x08,0x8b,0xfb, - 0x0b,0x23,0x9f,0x32,0x1e,0x3a,0x79,0x31,0xc8,0xeb,0x9f,0x7d,0x89,0x29,0x64,0xe9, - 0x4b,0x79,0xfc,0xfc,0xd8,0x2d,0x2c,0xdd,0xa1,0x5f,0xb2,0x6e,0xc8,0x61,0x98,0x66, - 0x61,0x4f,0x82,0x9d,0x70,0x22,0xca,0x67,0x3b,0x0f,0xe2,0x94,0xbd,0x22,0x11,0x67, - 0xa4,0xfb,0xfd,0xe8,0x58,0x0e,0xe0,0xdc,0x36,0x5d,0x8a,0xc6,0x7d,0x0b,0xd6,0xd7, - 0x62,0x2c,0x4b,0x2e,0xef,0x29,0xc6,0x60,0x49,0xb9,0xbb,0x7f,0x15,0x62,0x91,0x53, - 0x10,0x6d,0xe5,0xc4,0x70,0x7e,0x6e,0xc0,0x2c,0x56,0x54,0xe0,0xbd,0xdd,0x46,0x6b, - 0x82,0x1c,0xac,0xc4,0x90,0xb9,0x9c,0x52,0x9f,0xae,0xa2,0x6c,0x33,0xde,0x65,0xc0, - 0x1b,0x1f,0xd5,0x87,0xfc,0x34,0x19,0x5a,0x41,0xda,0xda,0x35,0x1b,0x51,0x07,0x90, - 0x02,0x15,0x85,0x77,0x34,0x42,0x99,0x4c,0x1e,0x12,0x4d,0xc6,0xaa,0xd8,0x3c,0xf2, - 0xea,0x1b,0xfb,0x5b,0xc3,0xe2,0x86,0x10,0xc5,0x65,0xb4,0xe6,0xe4,0x79,0x7b,0x29, - 0x76,0x57,0x99,0xfb,0x4f,0x80,0xcf,0xab,0xda,0xe9,0xbc,0x5a,0xc1,0x7a,0x90,0x32, - 0xd0,0x8d,0xcd,0xdc,0x7a,0xe7,0x95,0xd9,0x24,0x5d,0xff,0x35,0xae,0xf6,0xc5,0xb7, - 0xdc,0x99,0x1d,0xef,0x99,0xc2,0xea,0xc8,0xe5,0x8d,0xbd,0xf7,0x65,0x7a,0x0a,0x73, - 0x89,0x92,0x46,0xc8,0xed,0x30,0x28,0x81,0x14,0xa7,0xee,0xa8,0x98,0x09,0x0a,0x7a, - 0x42,0x08,0xde,0xa5,0x09,0x22,0x45,0xbb,0xeb,0x11,0xe5,0xcf,0x5f,0xdd,0x78,0x6b, - 0x09,0x92,0x4f,0xad,0xcc,0x50,0x87,0x54,0x89,0x18,0xe8,0xde,0x5b,0x29,0x8e,0x1d, - 0xb8,0xb5,0xbb,0xeb,0xd2,0x34,0xd9,0xdb,0x16,0xd7,0xd0,0x5f,0x19,0xdf,0x9d,0x57, - 0x2c,0x6f,0xd1,0xce,0x26,0x98,0xc6,0xaf,0x97,0xfa,0x9c,0xf1,0x3a,0x7a,0x1f,0xcb, - 0x45,0x2e,0xf9,0x6c,0xcb,0x5e,0x16,0xec,0xbf,0x7e,0xfe,0x73,0xda,0xf1,0x86,0xd7, - 0xc4,0xea,0xd0,0x64,0x06,0x3d,0x87,0x97,0x20,0x7d,0x26,0x46,0x59,0x78,0x69,0x71, - 0x9d,0x5d,0x78,0xe1,0xbd,0x76,0xf8,0x5d,0x73,0xae,0x95,0xe0,0xbb,0x79,0xdb,0x60, - 0x47,0x3f,0xf9,0x25,0xf1,0x5f,0x6e,0x0b,0x48,0xc4,0x38,0x4e,0x52,0xa8,0x10,0x42, - 0x01,0x8e,0x51,0x1e,0xb0,0xde,0x18,0x23,0x3a,0x3e,0x5b,0xc2,0x5d,0x8d,0x59,0x81, - 0x8d,0x3d,0xde,0xef,0x2d,0xef,0xb0,0x51,0x2f,0xf3,0x10,0x25,0x94,0xf9,0x77,0x3b, - 0x91,0xc1,0xce,0xe7,0x15,0xbc,0x67,0x1a,0x3a,0x3e,0x87,0xcb,0x17,0xc3,0xa0,0x06, - 0x2f,0x25,0xd0,0x47,0x10,0x35,0x1a,0x00,0xad,0x75,0xba,0x7b,0x46,0xab,0x3e,0xf7, - 0xec,0xe6,0xd6,0xf7,0x61,0x7a,0x22,0x8d,0xac,0xe6,0xa6,0x94,0x43,0x60,0x33,0xb0, - 0xe4,0x5b,0xd2,0x76,0xb0,0x59,0xc5,0x01,0x2d,0x17,0xc9,0x35,0x95,0x16,0xa9,0x17, - 0xd8,0x26,0xb7,0xb5,0x93,0x0a,0x07,0xd7,0x2c,0xa4,0xa0,0xd8,0x70,0xe1,0x2b,0xd9, - 0x2c,0x85,0x1b,0x7e,0x9c,0xbe,0x28,0x2e,0x6d,0xa8,0xba,0x3f,0x6f,0x3e,0x00,0x9f, - 0x4e,0x69,0x6e,0xe1,0x92,0xd4,0x36,0xd1,0xec,0x41,0x2b,0xba,0x58,0xbc,0xa3,0x1a, - 0xb8,0x77,0xeb,0x83,0x61,0xc6,0x8c,0xcb,0x80,0xcc,0x09,0x4f,0xd8,0xa4,0x3b,0x79, - 0x89,0x2b,0x4c,0x71,0xfc,0xaf,0xbb,0xd9,0x24,0xfa,0x7b,0xcf,0x1d,0xaa,0xb0,0xb9, - 0x68,0x51,0xf5,0xca,0x6e,0x20,0x0c,0xda,0xaf,0xf3,0xd2,0xf4,0xff,0xf7,0x2c,0xfa, - 0x8f,0x01,0xfc,0xee,0xe4,0x00,0xc2,0x1a,0x3d,0x8f,0xb0,0x9c,0x7c,0x6d,0x35,0xfa, - 0x65,0x2d,0xdb,0xb5,0x32,0xa3,0x29,0x75,0xf6,0xd1,0x84,0x89,0x7b,0x11,0x55,0xfa, - 0x47,0xcc,0x3f,0xe7,0x6c,0xc1,0x6c,0xdb,0x6e,0xc4,0x44,0x2f,0xfe,0xa0,0x74,0xe0, - 0x20,0x30,0x20,0xb4,0xcb,0x1d,0x7e,0xbf,0x40,0x9c,0xcc,0xe3,0x9f,0x78,0x66,0x87, - 0x07,0x9c,0x13,0x13,0xca,0xdf,0x6c,0x74,0x59,0xd7,0x05,0xe8,0x4a,0x7f,0x36,0xfc, - 0x65,0xf0,0xdd,0xc0,0xba,0x6d,0x24,0xe5,0xd0,0x9e,0x1a,0xc8,0x29,0x2e,0xad,0x82, - 0xdd,0x3d,0xf4,0xf9,0x10,0x45,0x1d,0xe3,0x44,0x59,0x64,0x28,0xf3,0x8a,0xec,0xa4, - 0x4e,0x99,0x62,0x36,0x91,0x15,0x5b,0x89,0xbf,0x21,0x05,0x48,0xd5,0xf2,0x1a,0x2a, - 0xdf,0x2e,0xb6,0xd7,0x94,0xf4,0xd0,0x8d,0xad,0x56,0x7b,0xe6,0xf5,0xa2,0x9a,0xad, - 0xa0,0xde,0xf6,0x43,0xce,0xd4,0xe6,0x67,0xb1,0x97,0xd5,0x68,0x57,0x7c,0xe6,0x94, - 0x4e,0x04,0x36,0x69,0xc8,0xbb,0xc6,0x60,0xc9,0xdd,0x08,0x15,0x16,0x08,0x37,0xe5, - 0xae,0xb0,0xe7,0xe8,0xea,0xb0,0xc1,0x48,0x4c,0xba,0x57,0x5f,0x52,0x0e,0x56,0x18, - 0x24,0x26,0x4d,0xe8,0xb0,0x3f,0xa4,0x27,0x6b,0x61,0xe8,0x21,0x16,0x3a,0x5a,0xe9, - 0xef,0x45,0x27,0x8d,0x9e,0xa1,0xb7,0x8a,0x12,0x98,0xe9,0x1f,0x3f,0x51,0x17,0x4b, - 0x5a,0x94,0x2f,0x5f,0xcd,0x70,0x11,0x53,0x4d,0x16,0xd5,0xac,0xdb,0xf8,0x83,0x25, - 0xc7,0xef,0x3b,0xd6,0xdf,0x03,0xf4,0xf4,0x40,0x28,0x49,0x16,0x7e,0x87,0xaf,0xa5, - 0x47,0x8e,0xb8,0x98,0x5d,0xf1,0x0b,0xe7,0xd5,0x70,0xc5,0x4e,0xff,0xa2,0x86,0x25, - 0xa8,0xed,0x27,0x33,0x93,0xf2,0x25,0xe0,0xcc,0xee,0xf3,0xdf,0x70,0xc1,0x11,0x73, - 0x5a,0x3c,0x3b,0xad,0x8c,0x28,0xaf,0x09,0xcc,0xbf,0x3f,0xe7,0xcc,0x50,0x93,0xd0, - 0x4c,0x09,0x10,0x77,0x28,0x8b,0x68,0xa2,0xc0,0x91,0x62,0xd7,0xdc,0x21,0x10,0x14, - 0x86,0x82,0xbe,0xe7,0x95,0xac,0x20,0x60,0x45,0x45,0xe1,0x4b,0xf6,0xea,0x87,0x72, - 0xf4,0x8d,0xf9,0x19,0x70,0xa3,0x29,0x71,0xc8,0x4d,0xcb,0x41,0xb8,0x53,0x53,0xfb, - 0xfd,0x41,0xdb,0xa2,0x7a,0x47,0xdd,0x77,0xdb,0x45,0x01,0x04,0xe9,0x7c,0x08,0x90, - 0xeb,0x27,0x25,0xcc,0xb7,0x72,0xa8,0x44,0x35,0xb2,0xf0,0x34,0xf3,0xec,0x18,0xd4, - 0x06,0xa2,0x70,0xab,0x03,0x68,0x3c,0x8c,0x9d,0xbe,0x70,0x74,0x55,0x7d,0x57,0x23, - 0x7d,0xab,0xc9,0x5c,0xa1,0xb8,0x8e,0xb3,0xc4,0x3d,0x51,0x87,0x57,0xd6,0x77,0x6c, - 0x3c,0x5c,0x90,0x22,0x4e,0x68,0x33,0xf5,0xda,0x4b,0xd9,0x0a,0x30,0x6e,0x1a,0xaf, - 0xe1,0xd9,0xbc,0xa8,0x73,0x27,0x32,0x79,0xe9,0xc2,0x2a,0x08,0xa5,0xc9,0xe4,0x38, - 0x6b,0x89,0xd0,0xc8,0x71,0x38,0x89,0x5a,0x0a,0x96,0x22,0xc6,0x49,0x24,0x7b,0x14, - 0x76,0x8a,0x03,0x09,0xc4,0x1c,0x6c,0xcb,0x4a,0x4e,0xab,0x1d,0x21,0x75,0x31,0xf1, - 0x67,0x44,0xf5,0x1b,0x78,0xa8,0x63,0x5b,0x8a,0xf4,0xe4,0x43,0xb1,0x66,0x42,0xb1, - 0xfa,0x97,0xc3,0x33,0xbd,0x6e,0x0b,0xa6,0xbf,0x03,0xaf,0xee,0xd2,0x34,0x74,0x64, - 0x0d,0x45,0x93,0x8b,0xbe,0xac,0xaf,0x13,0xea,0x21,0xd0,0x1e,0x1a,0x4d,0x76,0xcd, - 0xb4,0x5c,0xda,0xee,0x99,0xfc,0x52,0x16,0x6d,0x48,0x6c,0x8f,0x58,0x6a,0xab,0x27, - 0x28,0x6a,0xcf,0xbb,0x89,0x62,0x39,0xf9,0xc8,0x6c,0xa3,0x7f,0x83,0x69,0x30,0x80, - 0xa2,0x88,0xde,0x89,0x58,0x21,0x74,0x0b,0x35,0x8d,0x34,0xb7,0x04,0x14,0x28,0x5c, - 0xa9,0xab,0x79,0x67,0xbd,0x70,0x7c,0xb2,0x3f,0xda,0xe2,0x15,0x42,0x4c,0x0c,0xb0, - 0x01,0x79,0xfb,0x83,0x51,0xb1,0x6d,0x86,0x1d,0x5d,0x05,0xd7,0x1b,0x71,0x29,0x48, - 0x29,0x1a,0xb3,0xbc,0xd9,0x3e,0x17,0x53,0xd2,0x32,0x65,0xbd,0x56,0xa8,0x7a,0x64, - 0x85,0x04,0xc6,0x40,0x0d,0x84,0xc3,0x1f,0xd7,0x87,0x14,0x1d,0xe4,0xd9,0xdb,0xe1, - 0x09,0xba,0xc8,0x36,0xb1,0x31,0x67,0x58,0x90,0x53,0xd4,0x13,0x75,0xae,0x7b,0x64, - 0x05,0xbb,0xa5,0x85,0x1c,0xbd,0xae,0x9a,0xd8,0xe9,0x4c,0xa2,0x30,0x26,0x19,0xa3, - 0xc9,0x14,0x0a,0xb7,0x51,0xbf,0xa8,0x9f,0xe7,0xa7,0x60,0x55,0xf3,0x95,0x22,0xe4, - 0xa0,0xa1,0x94,0x00,0xd3,0x7c,0x4c,0x79,0xcf,0x14,0xf3,0x51,0xfa,0x03,0x2a,0xb2, - 0xae,0x9b,0x2a,0xb8,0xd0,0x08,0x6e,0xfe,0x71,0x42,0xc4,0xae,0x0a,0x4f,0x23,0x7d, - 0x20,0xae,0xbd,0x3d,0x06,0x95,0xd7,0xdb,0xee,0xb8,0x9f,0x43,0x03,0x38,0x9f,0xdf, - 0xeb,0x5a,0x99,0xff,0xd9,0x28,0x0b,0x5f,0x6b,0x6c,0xc0,0x7f,0xca,0x3b,0x38,0x68, - 0x62,0xcd,0x40,0x24,0x16,0x71,0x1d,0x6a,0xd4,0x01,0xc6,0xf9,0x3a,0xd1,0x91,0x5a, - 0xd3,0x87,0xae,0x9d,0xce,0x30,0x21,0xdf,0xca,0x82,0x83,0x8a,0x7a,0x0d,0x67,0xfa, - 0xdd,0x28,0xdd,0x1c,0x9b,0xd6,0x6f,0x13,0x46,0x53,0x99,0x0d,0xf8,0x3c,0x14,0xd9, - 0xad,0x74,0x85,0x26,0x18,0x39,0xeb,0x9b,0x14,0x44,0x1f,0x91,0xdd,0x3d,0x66,0xda, - 0xed,0x1a,0x55,0xf5,0x98,0xe1,0x48,0x40,0xa7,0xc6,0xa2,0x5d,0xe7,0xa1,0x3a,0x3a, - 0xee,0xc5,0x2b,0x24,0x75,0x4a,0x58,0x30,0x00,0xcc,0xc6,0x30,0xb4,0x62,0x07,0xda, - 0x27,0x07,0x9f,0x2e,0xff,0xad,0x11,0x1e,0x67,0x83,0xeb,0xdd,0xbc,0xd3,0x73,0x38, - 0xef,0x8c,0xd7,0x11,0x74,0x20,0x23,0x3b,0xe6,0xc9,0x48,0xc4,0x59,0xa2,0xdf,0xa0, - 0xef,0x75,0xb2,0x46,0xb1,0xc8,0x48,0x72,0xe5,0xa1,0xd0,0xfb,0xf7,0x63,0xb8,0xa3, - 0x79,0x96,0xa9,0x30,0xd5,0xa5,0x05,0x55,0xe6,0x9a,0xf7,0xf2,0x34,0x8f,0x1e,0xbb, - 0x86,0xfd,0xe0,0x21,0x54,0xc6,0x49,0x89,0x6a,0xcb,0xfb,0x73,0xd0,0x25,0xb6,0x69, - 0xf0,0xb2,0xe1,0x4b,0xa4,0xa2,0xcd,0x11,0x78,0xda,0x39,0x86,0x5c,0xa5,0x95,0x0c, - 0xe7,0xd3,0xd3,0x2a,0x56,0x99,0x52,0x28,0x4d,0x43,0xec,0xcc,0x08,0x6d,0x0a,0x5a, - 0xac,0x0e,0x94,0x37,0x76,0xa6,0x1a,0x6e,0x4b,0x0b,0x80,0x8e,0xb3,0x5c,0x84,0xe6, - 0xa8,0x8c,0x84,0x09,0x4c,0xce,0xcc,0xc9,0x2d,0xcc,0xa1,0x1c,0x37,0xae,0x2e,0x1b, - 0x8c,0xcb,0x2b,0x1b,0xc1,0x9d,0x1c,0xbf,0xe2,0x59,0x1b,0x1b,0x15,0x1a,0xa2,0x37, - 0xf8,0xe0,0x38,0x5a,0x9b,0x0f,0x5a,0x08,0x7d,0x92,0xe9,0x5a,0x21,0xcc,0xbe,0x29, - 0x29,0xcf,0x00,0xb8,0x0f,0xe2,0x85,0x08,0xbc,0x72,0xa1,0xa9,0xbe,0x42,0x3a,0x25, - 0x2b,0x28,0xc3,0x4f,0x7f,0xb5,0xcb,0x95,0xde,0x83,0x33,0x13,0x9f,0xac,0x67,0xa4, - 0x8c,0x6f,0x7b,0xa2,0x9f,0x74,0x13,0x19,0x7c,0xb2,0x62,0x5f,0xdf,0xbf,0x1e,0x7d, - 0x22,0x6b,0xda,0x80,0xd5,0x33,0x17,0x40,0xc8,0xdf,0x0c,0x55,0x79,0xe0,0xf3,0x9b, - 0x21,0x8a,0x92,0xbe,0x5d,0xbc,0xa1,0x50,0xe7,0x86,0xd6,0x5a,0xab,0x0a,0xb1,0xf1, - 0x5b,0xd2,0x50,0x74,0x38,0xf3,0x9d,0x36,0x66,0x85,0x0d,0x54,0xb5,0x89,0xbf,0x6a, - 0xa5,0x08,0xbf,0x0a,0x5e,0xf7,0x21,0x43,0xe1,0xdc,0xd7,0x4b,0x2b,0xb1,0x27,0xdd, - 0x48,0x40,0xe8,0xbd,0x97,0x3c,0x76,0x66,0x3a,0x94,0xe9,0xe6,0x97,0xf2,0x3e,0xec, - 0x78,0x60,0x2c,0x2e,0xbf,0xf7,0x85,0xfa,0x9a,0x9a,0x27,0xdb,0x71,0x0e,0xb7,0xd8, - 0xcc,0x02,0x65,0x25,0xc9,0xf5,0x2c,0x39,0x13,0x99,0x04,0xc6,0x55,0xb4,0x75,0x57, - 0xa2,0x7b,0x36,0xb8,0x35,0xff,0x80,0x71,0x59,0x8a,0x39,0x73,0xf7,0x37,0x3e,0x77, - 0x24,0xd8,0x9c,0x3e,0xda,0x17,0xf6,0x3f,0x0b,0xde,0x2b,0x20,0x95,0x42,0xc6,0x8b, - 0xaf,0x9d,0xb8,0xfc,0x5d,0x0a,0x46,0x47,0x6d,0x02,0x84,0x4d,0x09,0x54,0xbb,0x7c, - 0x2b,0xa8,0x03,0xab,0x55,0xab,0x13,0xe6,0x8f,0x70,0xa5,0x51,0x17,0x0b,0x21,0xf9, - 0xec,0xdb,0xd1,0x99,0x5c,0x38,0xff,0x3f,0xc4,0xfe,0x2c,0xf8,0x37,0x61,0x5c,0x21, - 0x9d,0x69,0x20,0xac,0xc1,0xd0,0xb6,0xf7,0x5f,0xdc,0x36,0xba,0xa4,0xf8,0xed,0x07, - 0x1c,0x30,0x8e,0x9f,0xc6,0xb0,0x1e,0x55,0xd6,0xd2,0x06,0x16,0x3b,0xb2,0xb1,0xf5, - 0xc8,0xdc,0x23,0xef,0x1f,0xb3,0x77,0xeb,0xee,0x53,0xde,0x9d,0xcd,0x6c,0xd4,0x3d, - 0xbf,0x62,0xa5,0x24,0x1c,0xb9,0x93,0x13,0x5e,0x92,0xa6,0xca,0x58,0xbe,0x60,0x40, - 0x4e,0x0f,0xe2,0x00,0x13,0x02,0x18,0xc2,0xc2,0x48,0xf9,0xcf,0xeb,0xeb,0x02,0x11, - 0xa2,0x07,0xea,0x14,0x93,0x16,0x78,0x74,0x4e,0x4c,0xa7,0x56,0xa2,0xea,0x61,0x45, - 0x08,0x0f,0xe1,0xae,0x0f,0x2f,0xd1,0x43,0xe4,0x4d,0x5c,0x1c,0xd6,0xf3,0x81,0x13, - 0x20,0x8b,0x60,0x77,0x53,0x63,0x53,0xcf,0x62,0x4e,0xb8,0x0c,0x3a,0x27,0x42,0x1f, - 0x82,0x84,0x82,0xa6,0x06,0x20,0x6a,0x88,0xd4,0x8b,0x23,0x99,0xaf,0xc9,0xe3,0x3f, - 0xd6,0xf8,0x64,0xc7,0x27,0x2f,0x06,0x92,0xc3,0xc0,0x25,0xf0,0x3c,0x89,0xee,0x91, - 0x7c,0xfa,0x2c,0x37,0x25,0x7b,0x31,0x63,0x66,0x4b,0x81,0xf5,0xba,0x6b,0x60,0x2f, - 0x12,0x17,0xd3,0xa5,0x50,0x76,0xa6,0xf3,0x79,0xc9,0xe3,0x8a,0x2e,0x0b,0x22,0xea, - 0x8a,0x40,0xca,0x09,0x67,0x88,0x58,0xd3,0x6c,0x45,0xa8,0x9c,0xbe,0x6c,0x6a,0x5c, - 0x1e,0x06,0x92,0x88,0x5b,0x20,0x10,0x3c,0xea,0x08,0x8d,0xe3,0x5f,0xf8,0xc9,0xf9, - 0x84,0x05,0x13,0x62,0xf8,0xf5,0x59,0xd7,0x6b,0x47,0x03,0x5e,0xac,0x28,0x6b,0x5d, - 0xa8,0x80,0x0d,0x8d,0xb8,0x29,0x63,0x5b,0x88,0xcb,0xa8,0xd5,0x95,0xb7,0x62,0x4c, - 0x87,0x6f,0x02,0x74,0xdc,0x87,0x6c,0x8a,0xe9,0x29,0xb4,0xcc,0x59,0x6f,0xf8,0x61, - 0x0d,0x9c,0xce,0xd8,0x6b,0xb8,0xee,0x1a,0x20,0x42,0x76,0xef,0x79,0x67,0x2a,0xb3, - 0x75,0x85,0xbb,0x49,0x18,0x2b,0xec,0x8b,0x48,0x4a,0x6c,0x7d,0x2d,0xb3,0xf3,0x26, - 0x28,0x4a,0x34,0xac,0x38,0x6f,0x4b,0x4b,0x34,0x49,0xc9,0xf9,0x82,0x29,0x1f,0x62, - 0xa2,0x38,0x23,0x25,0xd9,0x13,0xd4,0x34,0xa0,0x12,0x6b,0xcf,0xff,0x86,0x84,0xbd, - 0x63,0x1e,0x08,0x69,0x31,0x70,0xf6,0xce,0xc2,0x34,0x18,0x4a,0x80,0x1f,0xe3,0x91, - 0x03,0x14,0xdc,0x0a,0xd5,0x3b,0xcc,0x93,0x62,0x65,0x9d,0xac,0x45,0xf3,0x9d,0x73, - 0x23,0x3b,0xed,0x23,0xef,0x3e,0xa2,0x53,0x63,0x04,0x7e,0x75,0xa5,0x4e,0x7c,0x20, - 0x26,0x71,0x7c,0xf4,0x91,0xcd,0xd0,0xfc,0x36,0x84,0x3e,0xf9,0xf2,0x28,0x39,0x1a, - 0x40,0x55,0xfa,0x2b,0xda,0x04,0x24,0x18,0xa9,0x88,0x9e,0x07,0x51,0x7e,0x7d,0x21, - 0xba,0x10,0x9d,0xed,0xb4,0xa7,0x35,0x4a,0x36,0xab,0xeb,0x45,0x7f,0x14,0x35,0xf6, - 0x42,0x18,0x0d,0xec,0xb3,0x75,0xa7,0xd5,0x3f,0x66,0xd8,0x1d,0x0e,0x3a,0xa6,0xea, - 0x69,0x58,0x79,0xab,0x99,0x3e,0xd1,0xca,0x9f,0x3d,0x84,0xa9,0x8f,0xe5,0x34,0x7a, - 0xab,0x31,0x3a,0xe3,0x9a,0x3f,0x8e,0x3c,0x5e,0xdc,0x27,0x7b,0xa7,0x71,0x7f,0x0b, - 0xa9,0x79,0x76,0x14,0x65,0x35,0x2f,0x56,0xee,0xb8,0x7b,0x33,0xf9,0x9a,0xaf,0xfb, - 0xea,0xa4,0x7d,0x24,0x18,0xc4,0x7f,0x12,0x7e,0x86,0x1f,0x7b,0x97,0xf0,0x26,0x63, - 0xf9,0x11,0xd5,0x1a,0x3c,0xad,0x0c,0x0e,0x16,0x1e,0x2d,0xe4,0xdf,0x83,0x16,0xd1, - 0xa9,0x2a,0x0e,0xe5,0x5b,0x7f,0x9e,0x95,0x33,0x21,0xc8,0x9e,0x1b,0x80,0x1f,0xcd, - 0x06,0x13,0xf4,0x32,0x53,0x0f,0x44,0x7f,0x01,0x0f,0xf7,0xd0,0x13,0x7d,0x24,0x29, - 0xaf,0x10,0xd8,0xd0,0xd8,0x04,0xe0,0xb6,0x0a,0x00,0xa6,0x9b,0x0c,0x6f,0xff,0xe0, - 0xa8,0x0b,0xb2,0x03,0x37,0x72,0x48,0xa0,0x41,0x41,0x1c,0xa3,0x81,0x82,0x9d,0x70, - 0x46,0x76,0x6a,0x7e,0x6e,0xa1,0x30,0x55,0xe6,0xc7,0x21,0x0f,0x53,0x70,0xde,0xe1, - 0x06,0x81,0xc1,0xac,0x03,0xe0,0x6b,0x22,0x67,0xc4,0xd8,0xcc,0x6f,0x69,0x51,0x91, - 0x80,0xe9,0xf2,0x13,0x15,0x13,0x31,0x14,0xe1,0xce,0xc0,0x55,0x26,0x68,0xb6,0x66, - 0x84,0x80,0x5d,0xc2,0x66,0x28,0x81,0x06,0xaf,0xcb,0x48,0x88,0x46,0xa9,0xef,0xd0, - 0xbd,0x9b,0x97,0xd2,0x20,0x20,0x42,0x8d,0xb0,0xc4,0x9b,0xb6,0x59,0xa7,0x86,0x21, - 0x47,0x0c,0xd9,0xbd,0x3a,0xab,0x09,0x44,0x3b,0xc9,0x0c,0x20,0x0c,0xbb,0x11,0x74, - 0x66,0x88,0x45,0x28,0x55,0xb6,0x3c,0xe7,0x45,0xc3,0xf6,0xf1,0x26,0xa8,0x1a,0x5a, - 0x08,0x87,0xc2,0xa5,0xdb,0xea,0x78,0xd1,0xef,0xc5,0x54,0x17,0xb7,0xac,0x4a,0x5e, - 0x34,0x02,0x9f,0xe3,0x1d,0x72,0x5a,0x94,0x17,0xc4,0x1e,0x5c,0xea,0xa5,0x1b,0x5b, - 0x84,0x85,0x61,0x67,0x9a,0x48,0x39,0x2a,0x6f,0x8b,0x89,0x9f,0x3a,0x45,0x2f,0xf9, - 0x0f,0xc3,0x2b,0x9b,0xa4,0x46,0xc0,0x1c,0x6c,0x34,0x6d,0x45,0xbd,0x8b,0x02,0x48, - 0xd0,0x81,0x59,0xdc,0x1e,0xa6,0x46,0x08,0x40,0xae,0xf3,0x15,0xf9,0x11,0x01,0xb8, - 0xa3,0x00,0xff,0xb4,0xba,0x27,0x42,0x85,0xcd,0xc9,0x83,0x10,0xf8,0xfd,0x29,0x56, - 0x0c,0xb9,0xb6,0xbf,0xb5,0x0f,0xb7,0xbb,0x90,0x6f,0xe5,0x0d,0xbe,0x53,0x13,0xd9, - 0x35,0x91,0x93,0xa0,0xac,0x75,0xc9,0x19,0x38,0xc6,0x46,0x99,0x8b,0xeb,0x5c,0x00, - 0x21,0xc9,0x10,0xe4,0xb6,0xe7,0x4c,0x85,0x99,0xdf,0x06,0x9f,0x72,0x61,0x24,0x17, - 0x84,0x19,0x13,0x74,0x4a,0x11,0x4e,0xa3,0x71,0x93,0x01,0xfc,0x65,0xf5,0x7f,0x82, - 0x07,0x94,0x62,0xd8,0x17,0xd7,0x6c,0x2c,0x01,0xad,0x0d,0xc5,0x0b,0xee,0xad,0x71, - 0x04,0x1b,0x3d,0x88,0xc1,0xce,0x62,0x9f,0xd6,0xa5,0x3d,0xf0,0xfb,0xed,0xd0,0xb0, - 0x85,0x92,0x71,0x42,0x46,0xa3,0xcd,0xa5,0xac,0x85,0x4c,0x19,0x9f,0xf7,0x9d,0xfe, - 0x84,0x93,0xfa,0xff,0x84,0x48,0xed,0x76,0x17,0x13,0x85,0x90,0x0b,0x0a,0x45,0x5d, - 0x07,0x90,0xdd,0x38,0xd5,0x73,0x3d,0x7e,0x85,0x58,0xe3,0x85,0x96,0x2b,0x4d,0xf1, - 0x06,0x1b,0x15,0xf3,0xa3,0x9e,0x82,0x9e,0xc6,0x95,0xbc,0x91,0x81,0x28,0x24,0x68, - 0xae,0x90,0xfe,0xab,0x57,0xb7,0x8c,0x4a,0x03,0x27,0xcd,0x51,0x5e,0x1b,0x56,0xbd, - 0x8c,0x11,0x9b,0x76,0x71,0x65,0xd0,0xd8,0xaf,0xd9,0x11,0xee,0x7c,0x05,0xe7,0xe9, - 0xed,0xba,0x27,0xf0,0xba,0x2b,0xa7,0x6c,0x6e,0xed,0x30,0x8f,0x19,0x3a,0x3f,0x79, - 0x0c,0x13,0x03,0x1a,0x68,0xd9,0x5f,0x10,0x2a,0xd6,0x9f,0xb3,0x20,0x73,0x2c,0xd7, - 0x1d,0x1a,0x60,0xea,0xee,0x6d,0x2c,0x77,0x12,0x9e,0xc8,0x4e,0x16,0xf1,0x91,0x9d, - 0xc6,0x27,0xb7,0xa5,0xca,0xf2,0x06,0x0a,0xc8,0x7c,0x69,0x01,0x6d,0xb0,0x9d,0xa9, - 0xed,0x6e,0xc0,0xf2,0x22,0xbd,0x64,0x41,0x8d,0x21,0xe5,0x09,0x4d,0xb3,0x88,0x33, - 0x29,0x50,0xee,0xa0,0x18,0x64,0x6a,0x7f,0x9f,0x19,0x2c,0x01,0x8c,0xff,0x5f,0x05, - 0x06,0x90,0x96,0x2d,0xfb,0x11,0xa3,0x91,0x08,0xe3,0xab,0x81,0xa7,0xcd,0x2e,0x2c, - 0x8d,0xac,0x48,0x2c,0xf9,0xde,0x60,0xc0,0x01,0xe0,0xa6,0x08,0x27,0xce,0xb5,0x12, - 0xfc,0x46,0xcb,0xe7,0xb3,0x51,0xd1,0xb0,0x1e,0xbf,0x06,0x18,0x3b,0x26,0x59,0x95, - 0xd8,0x41,0xb7,0x3d,0xfa,0x2c,0x4f,0xc2,0xab,0xe3,0x3d,0x57,0x75,0x8e,0xe6,0xc4, - 0x3f,0x52,0xbe,0x0c,0xfb,0x3c,0xb1,0xc0,0x00,0x24,0x43,0x17,0x55,0xe6,0x2e,0x89, - 0x00,0x14,0xb6,0x52,0xf2,0xa6,0x93,0xf3,0x3c,0x05,0x3f,0xb4,0x7c,0xee,0x7b,0xbe, - 0x7f,0x6a,0xd7,0x27,0xf2,0x24,0x91,0x99,0x0d,0x04,0x2e,0x16,0xa6,0x0a,0x6f,0x6c, - 0x07,0xa3,0xa8,0xd1,0xba,0x66,0x99,0x85,0x30,0x05,0x1e,0x44,0xa7,0x25,0xb9,0xea, - 0xa4,0xf5,0x01,0x3e,0x78,0xcd,0xc2,0x39,0x6e,0x6c,0x56,0xc2,0xf4,0x65,0x6a,0x1a, - 0x57,0x82,0x7c,0x98,0x61,0x13,0x24,0x99,0xea,0x4f,0xa2,0xc3,0xa8,0x2b,0x7b,0x2d, - 0x54,0x29,0xfd,0x0b,0x79,0xa9,0x02,0xab,0x40,0x32,0x57,0xc2,0x21,0xcb,0x90,0xfb, - 0xe2,0xa8,0xc3,0x9c,0x9f,0xba,0x3f,0x74,0x68,0x42,0x13,0xb0,0x6c,0x1f,0xd1,0x4f, - 0x61,0x03,0xd0,0xec,0xf1,0x68,0x42,0x68,0x4c,0xd7,0xc1,0xc6,0xfb,0xc5,0x2f,0x3a, - 0xf8,0x68,0x04,0x21,0x1d,0x24,0x81,0x4e,0x34,0x5c,0x49,0x6c,0xb0,0x9c,0xc3,0x36, - 0x8c,0xfe,0xf9,0xfd,0x08,0x6c,0xb5,0xed,0xb1,0x04,0xc0,0x8d,0xf7,0xc3,0x73,0xa2, - 0x43,0x2c,0xf0,0x3f,0x68,0x4a,0x00,0x42,0xb0,0x97,0xe5,0x40,0x56,0xc9,0x81,0x02, - 0xc6,0xa3,0xba,0xac,0x93,0xbb,0x6a,0x89,0x23,0xa0,0x51,0x4c,0xa6,0xbd,0x73,0x6f, - 0x27,0x22,0xb2,0xbd,0x96,0x91,0x22,0x99,0x22,0xa1,0x18,0xa0,0xf1,0x73,0xc5,0x14, - 0x9d,0x9f,0xd9,0xb4,0x80,0x2d,0x0d,0x80,0xaa,0x63,0x39,0x37,0xfc,0x78,0xc9,0x8f, - 0x8f,0xe7,0x9c,0xe6,0x81,0x5f,0x05,0xa4,0xc1,0x12,0x5d,0xf1,0xc0,0x1f,0x94,0xff, - 0x08,0xc1,0x64,0xb6,0x50,0x22,0xdf,0x82,0x9d,0x36,0x13,0xd5,0x0e,0x36,0x6c,0x51, - 0x1c,0x06,0xc8,0x38,0x89,0x0e,0x4c,0x92,0x3f,0x17,0xa4,0xcb,0x07,0x37,0x15,0x45, - 0x8b,0x45,0x05,0x10,0xcf,0x4d,0x91,0x64,0xa1,0xa4,0xc6,0x4f,0x91,0x89,0x77,0x2a, - 0x5f,0x34,0xb9,0x51,0x9a,0xe6,0x5c,0xf1,0xd0,0x73,0x83,0x0b,0x1a,0xa6,0x54,0x71, - 0x20,0x95,0xe4,0x91,0x3b,0x78,0xce,0xda,0x93,0x7d,0xa8,0x50,0xba,0x58,0xce,0x0d, - 0x91,0xcc,0x1d,0x03,0x52,0xc8,0x0f,0x52,0x88,0x16,0x45,0x38,0x7c,0x2d,0xf8,0x0d, - 0x92,0x78,0xa3,0x23,0x9c,0x91,0x43,0x59,0x3c,0xfb,0xdf,0xa8,0xfe,0x32,0x59,0x88, - 0xc3,0x59,0xe5,0xdb,0xc9,0x96,0x45,0x8f,0x81,0x4a,0x5f,0xa0,0x11,0x35,0xf5,0x68, - 0x2c,0xc7,0x06,0xd5,0x47,0x83,0xec,0x88,0x66,0x5d,0xc8,0xd5,0x5b,0xbc,0x76,0x48, - 0x88,0xb0,0xa8,0x3e,0x3a,0x0d,0xec,0x2d,0x6d,0x14,0x86,0x79,0x18,0x5d,0xdb,0x4b, - 0x1c,0x37,0x2b,0xb2,0x60,0xe3,0x15,0x71,0xd9,0xfa,0xe9,0xd0,0x93,0xcf,0x00,0x36, - 0x9c,0x1f,0x0f,0xbc,0xcf,0xe2,0x33,0x7d,0xf8,0x5f,0x04,0xfd,0x4b,0xee,0x60,0xea, - 0x92,0x4d,0x4a,0x82,0x64,0x35,0x76,0xa6,0x33,0xbd,0xc8,0xa2,0x0c,0x31,0x16,0xb6, - 0x88,0x07,0xbf,0x26,0x13,0x10,0xc1,0xb6,0x36,0xe5,0x78,0x72,0x80,0xe9,0x79,0x7e, - 0x6f,0xc1,0x5e,0x74,0xa4,0xe0,0xf1,0xdf,0x9c,0x39,0x8e,0x7f,0xf7,0x1e,0xad,0xd3, - 0xe0,0x2e,0xe4,0x57,0x89,0x18,0xf9,0xde,0x2e,0x38,0x2e,0xdf,0x7d,0x2e,0xc0,0x51, - 0x24,0xe0,0xd8,0x01,0xc8,0x39,0xc5,0x02,0xf2,0x3e,0x38,0xa6,0x19,0x6f,0xa8,0x4f, - 0x9d,0x18,0xf0,0x2c,0xe2,0xaa,0xba,0xe5,0x41,0x3c,0xeb,0xdc,0xf6,0x4c,0x3f,0xa1, - 0x82,0x7b,0x02,0x87,0x86,0xe4,0xb1,0x1e,0x35,0x84,0x36,0x56,0xaa,0xa4,0x4e,0xb1, - 0x81,0x37,0x5d,0x28,0x34,0x0a,0xfd,0x53,0x85,0xa7,0xea,0x97,0x9a,0x52,0xf2,0x3b, - 0xad,0x09,0xa6,0x31,0x2c,0xea,0xcb,0xae,0x3f,0xec,0x4d,0xaa,0x59,0xf6,0xea,0x8f, - 0x30,0x24,0x8a,0x17,0x7e,0x5b,0x44,0x12,0x2e,0xe2,0x2e,0xba,0x58,0x3f,0x26,0x89, - 0x6a,0x78,0xfb,0xa3,0xd4,0x00,0x13,0x58,0xe8,0x47,0x73,0x6b,0xd4,0xe0,0xfb,0x2a, - 0x2c,0x0a,0x3e,0x9b,0xed,0xbc,0x2d,0x13,0x7e,0x86,0x7b,0x7b,0xd1,0xe1,0xf1,0x57, - 0x8e,0xc2,0xeb,0x7f,0xbf,0x2d,0xb2,0x87,0x15,0x8e,0x65,0x51,0x2a,0xae,0x6a,0x49, - 0x21,0x1e,0xb8,0xd4,0x19,0x84,0xba,0x8a,0x8f,0x8f,0xcd,0x43,0xa3,0x3c,0x5d,0x92, - 0x75,0x15,0xab,0xbc,0x1a,0x23,0xb1,0x39,0x2f,0x71,0xe4,0x35,0xdf,0x3d,0x35,0xe2, - 0x87,0xfa,0x7b,0x6f,0xbc,0x00,0xee,0xfb,0x4d,0xcb,0x3b,0x1a,0x11,0x64,0x62,0x1d, - 0xcd,0x13,0x7b,0xd7,0x43,0xbb,0xf4,0x9a,0xc1,0x5d,0x36,0x82,0xa0,0x61,0x9f,0x23, - 0x6d,0x32,0x6c,0x6f,0x52,0x94,0x29,0x62,0xc6,0xd8,0x9b,0x8b,0xe1,0xf2,0x5d,0xf0, - 0x8a,0x6d,0xa4,0x03,0xd1,0x40,0x4d,0x80,0xe9,0x7f,0x12,0x9e,0x24,0x23,0xed,0x02, - 0x7b,0x6e,0xc6,0x7f,0xb1,0xfe,0xf7,0x8c,0xd5,0x91,0x18,0x16,0x77,0xa4,0x53,0xfb, - 0xd6,0x05,0x43,0x24,0x30,0x04,0xb4,0x5f,0x24,0x96,0xf5,0xe4,0x3e,0x98,0xec,0xaf, - 0xd4,0x94,0x62,0x91,0xf5,0x45,0x7c,0x76,0x00,0x9b,0x95,0x1d,0x71,0x44,0xba,0x81, - 0xd1,0x72,0x53,0xd6,0xfb,0x1b,0x63,0xfa,0xe0,0xd5,0x21,0xb9,0xd8,0x2a,0x69,0xd6, - 0xa1,0x5e,0xe5,0xdd,0x93,0x18,0xbd,0x0f,0x18,0x95,0x76,0x07,0x50,0x56,0x5e,0xd5, - 0xd5,0x64,0x5d,0x86,0x99,0x07,0xab,0xb3,0xf1,0x25,0xaa,0xcc,0x5f,0x32,0xee,0x0b, - 0xf3,0x64,0xe9,0x7e,0x35,0x2b,0xfe,0x82,0xdf,0x52,0xb4,0x91,0x01,0xac,0x94,0x3a, - 0xe4,0x39,0x8c,0xf1,0x6d,0x07,0x9a,0x5b,0xb2,0xab,0xc9,0xea,0x34,0x40,0x57,0xc4, - 0x5c,0x67,0x90,0xae,0x1c,0x44,0xc0,0x59,0x8e,0xd4,0x2c,0x46,0x7c,0x60,0x4f,0x8c, - 0x26,0x67,0x42,0xac,0xcd,0xd9,0x2f,0x14,0x4a,0x51,0xe5,0x6a,0x0e,0x3a,0xae,0xa7, - 0xaf,0xdf,0xc2,0xfa,0xe3,0x2c,0x77,0x5a,0x7f,0x1d,0xde,0xd8,0x37,0x2c,0x63,0x4f, - 0xc9,0x01,0xdf,0x34,0xb8,0x57,0x09,0xbe,0x26,0x36,0xb5,0x0d,0xb6,0x0f,0xad,0x0a, - 0xa9,0xe6,0xc8,0xe6,0x5e,0x10,0x25,0xbb,0x87,0xc7,0xc3,0xfc,0xdb,0xff,0x26,0xd5, - 0x07,0x1b,0x95,0xe2,0x34,0xfb,0xe8,0x04,0x2b,0x2a,0x54,0x00,0x63,0xc7,0xd3,0xae, - 0x7e,0x48,0xc3,0xfb,0x26,0x21,0x22,0xc3,0x35,0xee,0xc6,0xc7,0x61,0xcc,0x77,0x72, - 0xcf,0x4d,0xe4,0xf8,0xb3,0x8f,0x31,0xd0,0x83,0x42,0x29,0x55,0xd8,0x69,0xd4,0x0c, - 0x60,0xbc,0xb3,0xee,0x97,0xa8,0x8e,0xc2,0xf1,0xee,0x88,0x72,0x1b,0x29,0x27,0x36, - 0xf9,0xff,0x57,0xc0,0x33,0xfd,0x1e,0x80,0x3f,0x45,0xcc,0x94,0xff,0xc5,0x88,0x89, - 0x0a,0xfe,0x0c,0x84,0x4d,0x8a,0xe0,0x9b,0x3b,0xc8,0xc0,0xa4,0x30,0x9a,0x45,0xc5, - 0xa9,0x90,0xf9,0xae,0x9c,0x44,0x96,0x19,0xf1,0x81,0xc0,0xe1,0xa2,0xa0,0x93,0xad, - 0x87,0x45,0x1d,0x12,0x2a,0x81,0x0a,0xd1,0x2e,0xf5,0xa7,0x59,0x38,0x16,0xc2,0xf4, - 0x25,0xa5,0xa0,0x7e,0xe7,0xd5,0x03,0x6f,0x82,0xd2,0xda,0x54,0xb1,0x79,0x44,0xf8, - 0x59,0x12,0x93,0x63,0x1f,0x7a,0x0c,0x5a,0xb6,0xe4,0xe4,0x15,0x3a,0x04,0xcb,0xe9, - 0x8a,0xa7,0x2f,0x9e,0xcb,0x20,0x5b,0xf4,0x21,0xbb,0x85,0x4f,0xb0,0x67,0x3d,0x7f, - 0xaa,0xeb,0x15,0x7f,0x6a,0x4e,0x88,0xbd,0xff,0xd1,0x8d,0x15,0xdf,0xfa,0x9f,0x60, - 0x88,0x04,0x16,0xbf,0x34,0x4e,0x0b,0x26,0xef,0xed,0xac,0x45,0xbb,0x53,0x13,0x75, - 0xae,0x81,0x98,0xd8,0x3a,0x1b,0x38,0x69,0x4a,0x87,0x62,0x1c,0x01,0x2f,0xb5,0xb9, - 0x82,0x01,0x07,0x9d,0xe4,0x81,0x49,0x8f,0x6f,0x20,0x89,0x73,0xe2,0x71,0x9f,0xfc, - 0xc8,0x03,0x0b,0x3d,0x56,0x10,0xf3,0xc8,0xf8,0x58,0xcc,0xdd,0x7a,0x64,0x83,0x7d, - 0x8d,0xcb,0x41,0x75,0x93,0x70,0x6d,0xd3,0x54,0xd9,0x6b,0x20,0x08,0x44,0xcc,0x70, - 0x4e,0x53,0x5d,0xed,0x37,0x62,0x3a,0x9c,0x6e,0xf5,0x5c,0x8d,0xe9,0xf1,0xe2,0x05, - 0xcf,0xfe,0xb7,0xb5,0x37,0x70,0x35,0x2b,0xe1,0x22,0x39,0x3a,0xf3,0xd2,0xc0,0xe9, - 0xa7,0xf0,0x20,0xd5,0xe9,0xb8,0x88,0x61,0xd2,0xe7,0xe5,0x31,0x89,0xb5,0x64,0xe3, - 0x83,0x9e,0x79,0x37,0xb6,0x57,0x43,0x8e,0x10,0x57,0xc0,0x14,0x2c,0xd5,0x34,0x38, - 0x43,0x58,0xf3,0xe5,0xb7,0x8a,0xe4,0xc1,0x02,0x1a,0xe2,0xdd,0xd0,0xf4,0xc3,0x43, - 0xa7,0x5f,0xa3,0xa7,0x59,0x52,0xeb,0xfc,0xd1,0x2a,0xc4,0x61,0x82,0x61,0x2d,0x71, - 0xbb,0x18,0xf6,0x64,0x3f,0xa8,0xe5,0x36,0x21,0x85,0x25,0x71,0x83,0xb1,0x9a,0x0c, - 0x33,0x5c,0x19,0xb1,0xd3,0x7c,0x28,0x80,0xcf,0x36,0x8e,0xbd,0x7e,0xc9,0xd7,0x65, - 0x2f,0x83,0x2a,0x6c,0x31,0x36,0x09,0xcb,0x19,0xd0,0xd5,0x2c,0x86,0x3b,0xc7,0xbd, - 0x32,0x58,0xbd,0x3d,0x22,0x95,0x4e,0xaa,0x4d,0xfc,0x75,0x3d,0x5b,0xd7,0x20,0xeb, - 0x56,0x90,0xb1,0x45,0xfb,0xe4,0x3f,0x4a,0x4a,0x49,0x88,0x9a,0x74,0x8d,0x1f,0x40, - 0x8f,0xc3,0x06,0xac,0xf7,0xe3,0x5e,0xc8,0xef,0xff,0xd4,0x0e,0x93,0x6d,0x13,0xee, - 0xae,0x48,0x0e,0xde,0x7f,0x00,0xa1,0x86,0xb9,0x82,0x4f,0x1e,0xd7,0xd0,0x46,0xaf, - 0x55,0x5c,0xfa,0x0a,0x6c,0x36,0xc7,0xae,0x17,0xe8,0x17,0xd5,0x73,0xd3,0x2f,0x79, - 0xf3,0x94,0x23,0x4e,0xd9,0x37,0x06,0x4f,0x4e,0x33,0x4a,0x1f,0xb3,0x6e,0x79,0x20, - 0xa3,0x90,0x98,0xfd,0xfd,0xc9,0x07,0xfb,0x37,0xc0,0x52,0x46,0x1b,0xa2,0x56,0xc3, - 0x3a,0x71,0xf2,0x14,0xa6,0x3c,0x2b,0xb6,0x38,0x16,0xea,0x29,0x2d,0x35,0xd9,0x45, - 0xa8,0x0f,0x5c,0xc0,0x6d,0xd4,0xec,0x0f,0xaf,0x31,0xa2,0x69,0xd2,0x12,0x56,0xee, - 0x22,0x58,0xb3,0x15,0x07,0xab,0x07,0xea,0xad,0x32,0xaa,0x2c,0xe9,0x77,0x6e,0x33, - 0x47,0x85,0x4c,0xd5,0x38,0xae,0xc8,0x8a,0xb0,0x8b,0x36,0x3d,0xef,0x58,0x6c,0xd6, - 0x70,0x12,0x57,0x11,0xd5,0xe5,0x00,0x55,0xbe,0xca,0x68,0x31,0xaa,0x43,0x9c,0x78, - 0xdd,0x7d,0xed,0xe7,0xf8,0x66,0xb1,0x03,0x78,0x5b,0x46,0x4f,0xd0,0x3c,0x53,0xa0, - 0x92,0xf2,0xa1,0x5e,0xb7,0x44,0xe9,0x18,0xc9,0xa5,0x6c,0x09,0x1d,0xb6,0xc5,0x8e, - 0x7b,0xe1,0xad,0xfe,0x3f,0x59,0x4c,0x17,0xad,0x6b,0x23,0xaa,0x2c,0xb4,0xf1,0xac, - 0x72,0xa6,0xcf,0xed,0x91,0x22,0x04,0x17,0x87,0x43,0xa9,0x70,0xfc,0x6b,0x1d,0xcf, - 0xad,0x2b,0xdd,0x09,0x7d,0x29,0xa0,0xd8,0xb8,0xa4,0x8b,0x4f,0x98,0xa8,0xeb,0x22, - 0x1e,0xf0,0xaf,0xfd,0x60,0xa2,0x05,0xfe,0xac,0xcf,0xc3,0x4c,0x86,0x69,0x2d,0xb1, - 0x71,0xac,0x73,0x31,0x91,0x2a,0x38,0xd7,0xf1,0x97,0xba,0x7a,0x8a,0xbd,0x4a,0x23, - 0xae,0x01,0x06,0xcd,0x7d,0xa5,0x20,0x78,0xfc,0x14,0xff,0xd5,0x03,0xf3,0xa3,0xb2, - 0x79,0x88,0x66,0x8f,0xfe,0x93,0x73,0xac,0x33,0xb8,0x54,0x42,0x46,0xdf,0xab,0xcf, - 0x75,0x89,0x78,0xdb,0xbe,0x99,0x1a,0xbb,0x83,0xb2,0xc5,0x56,0x3c,0xe6,0x87,0xbf, - 0x97,0xdd,0x1b,0xc1,0xe2,0xba,0x8c,0xd2,0xe4,0x76,0xfc,0xb7,0x72,0x41,0xbb,0x16, - 0x5d,0xf2,0x51,0x12,0x03,0x08,0x2f,0x54,0x75,0x7c,0xad,0x32,0x1e,0x2e,0x7d,0x8b, - 0xc7,0x4e,0xe0,0xf8,0xb2,0xe1,0x4d,0xe3,0xf0,0x7f,0x01,0xb7,0x57,0x07,0x17,0x71, - 0xf9,0x64,0x6d,0x3b,0x28,0xbb,0x2a,0x55,0x2d,0xc2,0x0a,0x8e,0x01,0x62,0x60,0x20, - 0x20,0x4f,0x65,0xa9,0x4a,0x4b,0xb0,0x19,0xeb,0x29,0xe8,0x0a,0x52,0x00,0x36,0x58, - 0x84,0xf0,0x13,0x97,0x8c,0xf4,0xe7,0x78,0x64,0x15,0x9c,0x5d,0xa0,0x08,0xeb,0x41, - 0x84,0x84,0xc5,0xd6,0x0b,0x47,0x12,0x13,0x66,0xc9,0xe6,0x63,0xc5,0xfd,0x37,0x53, - 0x04,0x91,0x30,0xca,0xcc,0x48,0x47,0x1b,0x72,0x98,0x85,0xe4,0x87,0x46,0xa1,0xf1, - 0x2a,0xf9,0xa1,0x7e,0x17,0x49,0x23,0xbb,0x5c,0xdc,0x81,0x83,0x8c,0xa9,0xee,0x76, - 0x4d,0x82,0xcb,0x6d,0xb1,0x32,0x20,0x7f,0xff,0xd3,0x39,0x66,0x35,0xe8,0xfa,0x0f, - 0xef,0x7d,0xd9,0x89,0x5d,0x39,0xd6,0x2f,0xda,0x7f,0x77,0x97,0x69,0xba,0x59,0xfd, - 0x9e,0x3e,0xab,0x7d,0xe1,0x9a,0x39,0x53,0x35,0x76,0xab,0xb0,0xd9,0xe0,0x36,0xcf, - 0x4d,0xbc,0x39,0x53,0x49,0xb9,0x77,0x0c,0x4a,0x68,0xa6,0x6f,0x7c,0xe7,0xd9,0xfe, - 0x1c,0xa1,0x90,0xf6,0xd6,0xac,0xa8,0x85,0x06,0x9e,0x80,0xc7,0x5d,0x9d,0x1f,0x0d, - 0xac,0xd0,0x27,0x33,0x93,0x33,0xa7,0x84,0xc0,0x98,0xa3,0x89,0x96,0x6f,0xd7,0x3b, - 0x80,0x32,0x43,0x4c,0xb8,0xb5,0x67,0x82,0x06,0xa4,0x7d,0xc0,0x8f,0x50,0x13,0x1f, - 0x78,0x1b,0x62,0x64,0x7a,0x95,0x46,0x04,0xa9,0x83,0xaa,0xc6,0xfc,0x6f,0x68,0xb0, - 0x19,0x0e,0x9f,0x4e,0x10,0xb0,0x26,0x81,0x23,0xbe,0xf8,0x70,0x16,0x6e,0x13,0x72, - 0xf0,0x4d,0x94,0x3a,0xa0,0x60,0x03,0xde,0x2b,0x51,0xf1,0x61,0xc7,0x6d,0x50,0x20, - 0x68,0xb2,0xbe,0x3d,0x6d,0x12,0x67,0x84,0xe5,0xc8,0xf9,0x71,0x51,0x6e,0x3e,0x47, - 0xf3,0x0b,0x00,0x24,0x9d,0x29,0x06,0x5b,0x24,0x91,0xb0,0x66,0x5b,0x6b,0xb7,0x22, - 0x75,0xda,0xa8,0xff,0xea,0x28,0x5b,0xf3,0xbe,0x34,0x4f,0x96,0x2c,0x78,0x46,0xb1, - 0x8e,0xf7,0xa1,0xe5,0x8a,0x29,0x07,0x5e,0xa4,0x04,0xb1,0x67,0xdf,0xcb,0x69,0xe6, - 0xb0,0x31,0x09,0x35,0x54,0x2a,0xa6,0x0f,0xf5,0x98,0x02,0x70,0xd5,0x8c,0xfa,0x8a, - 0x2a,0xf8,0x42,0x69,0xd6,0xdd,0x03,0x19,0x2e,0xe7,0xd8,0xd1,0xfb,0x0d,0xf1,0x10, - 0xac,0xf6,0xd0,0x81,0x71,0x18,0x4c,0xcb,0xc5,0x44,0xfa,0x7c,0x57,0x64,0x7b,0xe1, - 0x9a,0x47,0x96,0x89,0xf3,0xf5,0xb3,0xd9,0x2c,0xe9,0xab,0xfd,0x2f,0x65,0xcb,0xf0, - 0x6d,0x49,0x4b,0x25,0x2b,0x26,0x65,0x98,0x46,0xed,0xd1,0x82,0x7a,0x66,0xf8,0xca, - 0xbc,0x3d,0xa2,0xec,0x46,0x23,0xc2,0xc8,0x2c,0x35,0xe2,0xe8,0x65,0xc3,0xb5,0xdc, - 0x38,0x06,0xd8,0x58,0x99,0x2e,0x9a,0xc0,0x5d,0x56,0x1a,0x89,0xfb,0x2f,0x3b,0xa1, - 0x44,0xc3,0xa3,0x4f,0xe3,0x23,0x8c,0x41,0xb1,0x1f,0x0c,0x07,0xad,0x0e,0x2b,0xf2, - 0x5c,0xf2,0x0e,0xbf,0x19,0x78,0xae,0x1f,0xe8,0xee,0x00,0x64,0xdd,0xb4,0x4c,0x84, - 0xa5,0xc1,0x14,0xa4,0x2e,0xe9,0xcf,0xa0,0x64,0xc0,0xaa,0xcd,0xd3,0xcb,0x1c,0xe3, - 0x35,0xea,0x34,0xe4,0x39,0x3a,0x18,0x43,0x53,0xdc,0x1a,0x74,0x7c,0x85,0x65,0x83, - 0xdb,0x1f,0x6d,0x08,0x83,0xc0,0x71,0xd2,0x86,0xd3,0x91,0xde,0x7d,0xf4,0x8d,0x15, - 0xde,0x72,0x98,0x7d,0x6b,0xfe,0x8d,0xc3,0x0a,0x42,0x3d,0xab,0x7d,0x16,0xbb,0xba, - 0x54,0xcb,0x7b,0xdf,0x91,0xb0,0x9e,0x92,0x51,0xc3,0x50,0x60,0x1d,0x71,0x95,0x4b, - 0xf7,0xb6,0x95,0xec,0x96,0xca,0xcd,0xcf,0x5b,0x80,0xbc,0xf6,0x7e,0xfe,0x85,0xf9, - 0x17,0x54,0xa5,0x6b,0xc2,0x39,0xad,0xda,0xde,0xc3,0xd3,0x45,0x72,0x1b,0xea,0x65, - 0x16,0x55,0xad,0x7b,0xc3,0x3a,0x4c,0x75,0xf4,0x0c,0x22,0x17,0x71,0x73,0xd9,0x8c, - 0x2e,0xe3,0xf9,0x71,0x30,0x7a,0x28,0x80,0xe5,0xfe,0xae,0x56,0x1b,0xf1,0x54,0xb0, - 0x41,0xda,0x49,0xfe,0xdb,0xc0,0xa2,0x89,0x59,0x1b,0xcc,0x12,0x92,0x1d,0x02,0x8d, - 0xf5,0xb5,0xdb,0x17,0x3a,0x3e,0xdf,0x69,0xd1,0xd1,0x80,0x5e,0x7c,0xf7,0x71,0x9f, - 0xca,0x2e,0x8c,0x75,0x81,0x76,0x0c,0x2f,0xc8,0xc1,0xa4,0x5f,0x25,0x3f,0x55,0x1f, - 0x2c,0x8d,0x61,0x2e,0xfa,0x91,0x96,0x9d,0x74,0x1e,0xd8,0x8e,0x39,0x81,0xe2,0x5d, - 0xfe,0x7f,0xf6,0x26,0x97,0x30,0x5e,0x8a,0x58,0x89,0xe6,0xbe,0xf7,0x71,0x74,0x21, - 0xe6,0xc2,0xbf,0x49,0x93,0xfe,0x94,0x5f,0xec,0x56,0xaf,0x2a,0xde,0x72,0x26,0x32, - 0x54,0x94,0xb0,0xfa,0x1a,0xe0,0xa5,0x11,0x7a,0x12,0x7f,0xbf,0x78,0xd4,0x63,0xc0, - 0x37,0x92,0x5f,0xf4,0x35,0x22,0x27,0x06,0x27,0xd1,0xfa,0xf9,0xf7,0xed,0x48,0x10, - 0x27,0x7d,0x81,0x69,0x84,0xb1,0x62,0x04,0x2f,0x22,0xf2,0xcd,0xf6,0xe7,0x99,0xfc, - 0x94,0xcf,0xfb,0x06,0xe3,0xa2,0x27,0x8b,0x2f,0x86,0xfb,0xc8,0x77,0xef,0x51,0x34, - 0x78,0x8c,0x89,0x06,0x18,0xc0,0x47,0x34,0x64,0x3c,0xb5,0x30,0x74,0x69,0x18,0x66, - 0x9b,0x39,0xf3,0x24,0x56,0xab,0x60,0xc7,0x40,0x1f,0x4d,0x15,0x2a,0x63,0xd1,0xd6, - 0x77,0x40,0x17,0xa4,0x36,0x37,0x89,0x8b,0x34,0xbe,0xc2,0x85,0x75,0x48,0xcc,0x0d, - 0x7b,0xda,0x81,0xec,0x67,0xab,0x80,0x9e,0x34,0x5d,0x71,0x63,0x5b,0xa7,0x30,0x46, - 0x52,0xeb,0xb0,0x6f,0x32,0x78,0x3a,0xf7,0xa8,0x2b,0xa9,0x30,0x15,0x65,0x96,0x79, - 0x7c,0x87,0x09,0xab,0xc9,0xb6,0xa2,0x59,0x17,0x4a,0x0d,0xcc,0x78,0x33,0xea,0xee, - 0x35,0xc7,0xac,0x37,0x9d,0x8e,0xdd,0x1e,0xa4,0x4a,0x4b,0x4e,0x3e,0xed,0x97,0x78, - 0xf4,0x85,0xde,0x8b,0xe4,0x72,0xcc,0x58,0xea,0xa6,0x93,0xd2,0x58,0xec,0xa8,0x9f, - 0xfe,0x16,0xad,0x37,0x15,0xa5,0xc6,0xc3,0xcd,0x34,0xc3,0xbd,0x6b,0x8a,0xa6,0x14, - 0x00,0x92,0xdc,0x97,0xca,0xa3,0x9a,0xcf,0x48,0x77,0xba,0xa8,0xdc,0xe8,0xff,0xde, - 0x77,0x8a,0x49,0xbc,0xdf,0x00,0x78,0x9c,0xea,0x4a,0xc4,0x43,0xbd,0x8d,0x1e,0xb4, - 0xed,0x9a,0xc1,0xb4,0x77,0x14,0x69,0x83,0x3c,0x83,0x7f,0x0d,0xfd,0x4e,0x53,0xa3, - 0x8f,0x7e,0x93,0x3f,0x97,0x1f,0x79,0x6e,0xc9,0x46,0x7e,0x82,0x6e,0x34,0x72,0x33, - 0xcf,0xf4,0xfa,0x64,0x4a,0x35,0x6e,0x3f,0x0c,0xc1,0x17,0xa1,0xd8,0x95,0x12,0x26, - 0xfb,0x3e,0xae,0x6b,0xa6,0x6a,0x46,0x52,0x6e,0x7e,0xe6,0x92,0x0d,0x5e,0xb5,0x26, - 0x53,0xfe,0x5a,0xb9,0x17,0xb6,0xf5,0x9b,0x56,0xdf,0x8d,0x96,0x55,0x6d,0xff,0xe0, - 0xcf,0x45,0xa8,0x13,0x8a,0xa2,0x28,0xc0,0xdd,0xbf,0x1d,0xc5,0x97,0xa4,0x82,0xef, - 0x20,0x25,0x50,0xa4,0xc9,0xb2,0x8b,0xd2,0x99,0x92,0x9c,0xee,0x3e,0xad,0xfb,0x2d, - 0xd6,0x46,0xa7,0xd2,0x4c,0x48,0xbe,0xd2,0x39,0xb7,0x04,0x74,0xcd,0xfa,0x14,0xa1, - 0xd5,0x96,0x35,0x97,0xb0,0x46,0x67,0x9c,0xc4,0x3b,0xac,0x7b,0x53,0x76,0x96,0x57, - 0xd7,0x38,0x4a,0xea,0x35,0xb3,0x7c,0x95,0xa5,0x28,0xc5,0xe7,0x54,0xfc,0x58,0x3b, - 0x08,0x6d,0xc6,0xce,0xd2,0x33,0x50,0x6e,0x6f,0xc0,0xc8,0xa9,0xdd,0x87,0x38,0x2e, - 0xc6,0x5a,0x62,0xfc,0x7e,0x66,0x26,0x06,0x0e,0xb4,0xe4,0x9b,0x05,0x56,0x68,0x77, - 0xac,0x67,0xa3,0x6d,0x3e,0xf2,0x09,0x83,0x85,0xeb,0x1b,0xd5,0x62,0x65,0x94,0x2a, - 0xc7,0x34,0xd7,0x1d,0xb8,0xb2,0x29,0x92,0xeb,0x4a,0x1f,0xcd,0x9f,0xac,0xa6,0x26, - 0xf4,0xde,0xe8,0xac,0x7f,0xbe,0x2c,0xeb,0xff,0x21,0x74,0x6c,0xc4,0x01,0x0a,0x94, - 0xda,0xc1,0x65,0x3c,0xd6,0x4c,0xd2,0x5f,0xfc,0x42,0x96,0x3c,0xfb,0xf3,0x70,0x01, - 0xa8,0x0e,0x9f,0xbd,0x3c,0x9a,0x5e,0xe3,0x6e,0x9e,0xcf,0xff,0x5d,0xf0,0xc2,0xa4, - 0x32,0x0a,0x9d,0xda,0xf7,0x32,0x26,0xe5,0x08,0x9e,0x5b,0x3d,0x5e,0xbc,0xa3,0xb0, - 0xdc,0xa3,0xba,0xb4,0xe0,0x8f,0x6e,0x27,0x64,0xe1,0x90,0xd7,0x80,0xcb,0x32,0x21, - 0x6f,0xae,0x9e,0x76,0x71,0x2b,0xb8,0x42,0x23,0x16,0xc8,0xaa,0xaa,0x7d,0x22,0xb5, - 0x58,0xe1,0x25,0x21,0xf8,0x2f,0x29,0x11,0xa3,0xed,0x34,0x20,0x57,0x74,0x5c,0x62, - 0xe7,0x80,0xf7,0x13,0x70,0xa0,0x67,0x36,0xe5,0x4e,0x24,0x7f,0x35,0xe4,0x7a,0xa2, - 0x42,0x46,0x89,0x54,0xed,0x48,0xc0,0x06,0xb5,0xb9,0xb8,0x02,0xad,0xbf,0x30,0x54, - 0xea,0x36,0xca,0xaa,0xee,0x49,0x13,0x02,0xbc,0xb8,0x83,0x74,0x55,0xf5,0x09,0x41, - 0xa6,0xad,0xff,0x88,0x58,0x7c,0x41,0x12,0xc6,0x93,0xd1,0xe1,0xae,0x38,0x89,0x69, - 0x42,0x0a,0xab,0x5d,0x90,0x75,0xf5,0xef,0xc0,0x4f,0x6d,0x0a,0xef,0x18,0x79,0xfb, - 0x3a,0x64,0xf7,0xff,0x94,0x69,0xed,0xc0,0xf2,0x05,0x93,0x1a,0xb2,0x7d,0x42,0x81, - 0x84,0x84,0x97,0xe3,0x2a,0x2a,0x8a,0x57,0xb2,0x2a,0x28,0x07,0x26,0x69,0x3d,0xb9, - 0x4a,0x8a,0xda,0x86,0x7d,0x8c,0xe8,0x56,0x45,0x9c,0xc0,0x1b,0x28,0x7a,0x6d,0xa8, - 0x76,0x80,0x33,0xe3,0x14,0xd6,0x7d,0x5b,0x3a,0xb6,0xf3,0xff,0x5f,0x9e,0x3b,0x6f, - 0xab,0xa3,0x79,0x0b,0xd8,0x3c,0x42,0x61,0x1e,0x91,0x69,0xc0,0xad,0x90,0x28,0xda, - 0xe2,0x69,0xb2,0x6e,0xe4,0x36,0x1c,0x1a,0xb6,0x21,0xac,0x1a,0x19,0x22,0xe3,0x43, - 0x06,0x62,0x8b,0xdd,0x67,0xfa,0x51,0x2e,0xc4,0x0c,0x6e,0x32,0xfe,0x75,0x29,0x59, - 0x8a,0x8c,0xe9,0x3b,0x60,0x43,0x9b,0xe8,0x71,0x47,0x81,0x1a,0xa3,0x2d,0x0c,0xa8, - 0xc9,0xb3,0xec,0x9a,0x5e,0xc4,0xb4,0xd2,0x02,0x07,0x14,0x46,0xd1,0xf8,0x5e,0x03, - 0x13,0xce,0x5d,0xe7,0x4b,0x9a,0xc1,0x89,0x8a,0x15,0x5e,0xc6,0xd2,0x77,0x63,0x28, - 0x5f,0xbf,0xd4,0x9f,0x8a,0x86,0x6b,0xa6,0xc4,0xff,0x91,0x47,0x72,0x7a,0xcd,0xf4, - 0xc3,0xbe,0xf5,0x91,0x51,0x92,0x23,0x5d,0x93,0xfc,0x95,0x07,0x04,0x7c,0x84,0xf8, - 0x90,0x9f,0xc4,0xbe,0xf0,0x74,0x12,0xa6,0x01,0x14,0xc2,0x86,0x8d,0xc9,0xcc,0xa3, - 0x19,0x57,0x33,0xae,0x51,0xea,0x1a,0xb6,0x00,0x75,0xa3,0x08,0x33,0xfe,0xba,0x23, - 0xc9,0x19,0xcd,0x4d,0x53,0x87,0x2d,0xe3,0xa6,0x14,0xc3,0x87,0x9a,0x7b,0x5e,0x83, - 0xc0,0xe8,0x94,0x13,0xb5,0xc6,0x25,0xec,0xea,0x23,0xc0,0xcc,0xf5,0xe6,0x53,0xb5, - 0xd7,0xb5,0xd7,0x73,0xd1,0x37,0xb2,0xca,0x4c,0x43,0x22,0xd3,0x7e,0x72,0xb1,0x0b, - 0x47,0xc4,0x29,0x0b,0xd8,0x96,0x60,0xbe,0x88,0xda,0xd6,0x26,0xda,0x7f,0x56,0x35, - 0x5f,0x76,0xd1,0x38,0x53,0xfc,0x76,0xdf,0x88,0xa4,0x98,0x7d,0x03,0x38,0x69,0x2d, - 0xa8,0x4b,0xe9,0x6c,0x7b,0x7b,0x6a,0x4a,0x65,0x1a,0x97,0x1a,0x18,0x74,0x3e,0xef, - 0x89,0x5d,0xa8,0x48,0x6a,0x59,0xc6,0x00,0xc6,0x11,0x7d,0x8e,0x89,0xf7,0x5d,0x72, - 0x96,0x12,0x1d,0x32,0x48,0x7d,0x5f,0x9e,0x29,0x12,0x75,0x9e,0xf4,0xeb,0x1d,0x54, - 0xd6,0x5c,0x7a,0xf0,0x05,0x63,0xbb,0x7b,0xea,0x56,0xca,0xd0,0xfc,0xef,0x5d,0x3f, - 0xad,0xae,0x90,0xdd,0x34,0x82,0x61,0x2c,0xc8,0x7f,0xd7,0xed,0xc4,0x5f,0x22,0x91, - 0x66,0x5f,0x43,0x22,0xff,0xc4,0x27,0xd9,0xa5,0x53,0x20,0xa4,0x51,0x04,0x12,0x8d, - 0xfa,0x0a,0x57,0x65,0x04,0x00,0x00,0x02,0xb7,0x6e,0x6d,0xd4,0xd7,0xc9,0xe1,0x66, - 0xe6,0xee,0x99,0xf9,0x38,0xaf,0x4a,0x07,0x39,0x63,0x8b,0xc5,0x56,0xaa,0x2b,0x8d, - 0x72,0x80,0x91,0x33,0xfe,0xac,0x99,0x41,0xa7,0x94,0x3b,0xc7,0xd1,0xec,0x5f,0xd0, - 0x84,0x19,0x5f,0xdd,0x75,0xa0,0xb3,0xc2,0x5e,0xa5,0xe3,0xf0,0xa1,0x6f,0xa8,0x6a, - 0x86,0x88,0xe0,0x42,0xca,0xf8,0x13,0x0d,0xf8,0x87,0x1a,0x31,0x81,0xef,0x03,0x43, - 0x87,0x17,0x98,0x36,0x35,0xb0,0xca,0x73,0xc0,0x64,0x4d,0x5a,0xd0,0x77,0x10,0x74, - 0x26,0x28,0x46,0xd3,0xed,0x95,0x3f,0xd9,0xc6,0x37,0xf8,0x87,0x7a,0x16,0x9c,0xa2, - 0xed,0x57,0x22,0x7d,0x51,0x2d,0x4c,0x2d,0x68,0x67,0xd2,0x6f,0x1c,0x68,0x14,0xab, - 0xc7,0xba,0x0e,0x3a,0x92,0xab,0x44,0x3d,0x69,0x68,0xe0,0x2f,0xfe,0xef,0xdc,0x09, - 0xa2,0xe4,0xdd,0x09,0x54,0xa5,0x93,0x59,0xae,0x9d,0xcb,0xad,0xd5,0x17,0x15,0xab, - 0x47,0x98,0x1c,0x1e,0x10,0xa7,0x03,0x0b,0xbc,0x64,0xb7,0x41,0x7c,0x63,0xc2,0x40, - 0x82,0xe2,0x63,0x4c,0xb0,0xed,0xc9,0x9b,0xed,0xac,0x32,0x57,0x50,0x31,0x08,0x5a, - 0x0c,0x9f,0x51,0x04,0xfe,0xd2,0xd6,0x15,0x49,0x6f,0x3a,0x47,0x51,0x60,0x01,0x09, - 0x67,0xea,0xcc,0x30,0x47,0x32,0x41,0xef,0x84,0x50,0x8b,0x9f,0x73,0x5f,0x31,0xc6, - 0xe7,0xbc,0x12,0x98,0x66,0x29,0x0e,0x3b,0xdf,0x8d,0x83,0x00,0xb7,0xe2,0x1a,0x37, - 0x44,0x6f,0x82,0x33,0xe2,0x14,0x6e,0x9b,0x0c,0x41,0xd4,0xe6,0x9b,0xfd,0xd3,0x6c, - 0x01,0x3c,0xf2,0x0c,0x31,0x1e,0xcd,0x41,0xe9,0x90,0xb4,0x00,0xd4,0x7b,0xda,0xf0, - 0xc2,0x11,0xf4,0x18,0x5f,0x04,0x4b,0xa5,0x05,0x51,0xbf,0xa6,0x57,0xf4,0xf0,0xab, - 0x4e,0xd7,0x1f,0x64,0x59,0x18,0x03,0xe6,0x8d,0xde,0x3a,0xe7,0xd4,0xfc,0xa0,0x32, - 0x2e,0x9b,0x86,0xc6,0xc7,0x32,0x8c,0x42,0x38,0x2c,0xd4,0xe2,0x49,0xf4,0x14,0xf5, - 0xde,0x9a,0xfb,0x29,0xc6,0x36,0x1a,0x27,0x64,0x3d,0xe4,0xfe,0x14,0xcc,0xa5,0xfb, - 0x27,0x0b,0xe1,0x87,0xa4,0x3b,0x4f,0x0d,0x53,0xba,0x4e,0x37,0xfe,0x8f,0xfd,0x3b, - 0xb1,0xda,0x12,0x3f,0x3c,0xf5,0x27,0x10,0xd3,0x95,0x6a,0x73,0x87,0x2b,0x1c,0x3b, - 0x1b,0x37,0x90,0x86,0xd7,0x3d,0x24,0xb5,0x87,0x9c,0xd6,0xee,0xda,0xf5,0x16,0xaa, - 0x5e,0x36,0x7f,0x0d,0x47,0x16,0x9a,0x9e,0x0e,0x12,0xc6,0x3c,0x7c,0xfe,0x83,0xaf, - 0x19,0x3b,0x0f,0x05,0x31,0x17,0x0d,0x1b,0x56,0x75,0xfd,0xb2,0xbd,0xf8,0x8f,0xe9, - 0xcf,0xcc,0x88,0xec,0x87,0x3d,0x29,0x1b,0x06,0x9f,0xe5,0xa2,0x5e,0x9e,0x99,0x78, - 0x0e,0xec,0x71,0x1d,0x38,0x2c,0x30,0x84,0xcf,0xd5,0xcd,0x0c,0x22,0x4c,0xae,0x4b, - 0xe6,0x16,0x55,0x72,0x88,0x26,0xa8,0x7e,0x25,0x92,0x76,0xe9,0x9e,0xf2,0x3d,0xbf, - 0xc6,0x04,0x53,0xb0,0x82,0xc1,0xa2,0x85,0xe8,0x3c,0x1c,0x3c,0xda,0xf8,0x6b,0x39, - 0x8b,0x84,0xeb,0x26,0xbf,0xa4,0xd3,0x88,0xf4,0x79,0x9f,0xbe,0x0a,0xf2,0x4a,0xfb, - 0xa3,0x06,0xf9,0x7e,0xb7,0x30,0x71,0x60,0x06,0x9d,0xee,0xba,0xbb,0x96,0x77,0xf2, - 0x83,0x29,0xb0,0x24,0x0d,0x3e,0x7e,0x36,0x22,0x45,0xfb,0xc7,0xb5,0xce,0x0d,0xe7, - 0x21,0x88,0xbe,0xe3,0x65,0x83,0x6f,0x27,0x4f,0xff,0xcf,0xbe,0xc0,0xcd,0xf3,0x73, - 0xc2,0xbc,0x30,0xf3,0x81,0x5e,0x60,0x4b,0xa0,0x47,0x2f,0xc4,0x39,0x33,0x80,0x9d, - 0x73,0x46,0x1f,0x96,0xae,0xf5,0xa9,0x91,0xe1,0x04,0xea,0x97,0x3c,0x60,0x1f,0xf0, - 0x33,0x07,0x08,0xa4,0xf9,0xfe,0x01,0x65,0x96,0x29,0xe0,0xa4,0x0f,0x9a,0x48,0x26, - 0x84,0x9d,0x70,0x7c,0xe9,0xc6,0x6a,0xe5,0xb2,0x73,0xd6,0xe7,0x52,0x2c,0x59,0x7c, - 0xdb,0x04,0x2e,0xa8,0x50,0x52,0x9d,0x2f,0xcd,0x59,0x75,0x06,0xbd,0x91,0x7a,0x8a, - 0x01,0xd7,0x7a,0x28,0xa6,0x48,0x73,0x68,0x56,0x04,0xec,0x1e,0xdd,0x7e,0x6a,0x59, - 0xf0,0x4b,0xda,0x62,0xdb,0x29,0x5c,0x7f,0xf4,0xff,0xc3,0x28,0xd4,0x0a,0x3b,0xd9, - 0x73,0x05,0x41,0x4a,0x65,0xac,0x45,0x6f,0xe6,0x4e,0xac,0x73,0x29,0xb6,0x43,0x9e, - 0x0b,0x23,0xc3,0x45,0x14,0x96,0x20,0x49,0x49,0x54,0x30,0x98,0x0c,0x75,0xd2,0x5d, - 0x39,0xe8,0x51,0x62,0x62,0x97,0x2f,0x93,0x97,0x11,0xac,0xd9,0xd8,0x1b,0x4e,0x1e, - 0x67,0x4c,0xd1,0x31,0x3f,0xa0,0x77,0x07,0xd2,0x0f,0xfc,0x9d,0xf8,0x2f,0x99,0x49, - 0x9a,0xc5,0xeb,0xb5,0x56,0x6c,0xfc,0xed,0xbd,0xe4,0xef,0xe9,0xa6,0xd7,0xa3,0x6c, - 0xaf,0xa4,0x92,0x1f,0x3c,0x3f,0x48,0xaf,0xcd,0xde,0x4c,0x6a,0x59,0x18,0x64,0xc0, - 0x86,0x1d,0x59,0x91,0xbf,0xcd,0x2c,0x4f,0x9d,0x53,0x3f,0xca,0xa5,0x7e,0x74,0x12, - 0x20,0x16,0x8c,0x54,0x21,0x8c,0x7c,0x1e,0x3b,0x5c,0xc5,0x96,0x94,0x78,0x4f,0x9c, - 0xe1,0x13,0xe7,0x45,0x45,0xb4,0x2d,0x31,0x01,0xad,0xfd,0x23,0x0c,0x33,0x36,0x73, - 0x0d,0xae,0xef,0x55,0x40,0xb5,0x66,0x96,0x40,0xec,0xd1,0x72,0x33,0x93,0x7e,0x71, - 0x00,0xcb,0xbc,0x04,0x38,0x24,0x43,0x14,0x99,0x69,0x9f,0x23,0x70,0x81,0x1a,0x80, - 0x9f,0x76,0x8d,0xb2,0x00,0xb9,0x0c,0xfd,0x3e,0x53,0x7f,0x0a,0xaf,0x8a,0x1b,0x84, - 0xa2,0xb2,0x7d,0x2d,0x3f,0x79,0x95,0xd8,0x63,0x17,0xd1,0xa2,0x73,0x78,0xfc,0x75, - 0x5b,0x34,0x35,0x3d,0x32,0xaa,0x28,0x2f,0x42,0xe8,0x83,0x1a,0xc9,0x74,0x7e,0xf7, - 0x2e,0x12,0x86,0xcc,0x76,0x43,0x76,0x06,0x36,0x55,0x9e,0xa0,0x7e,0x30,0xb1,0x1c, - 0x08,0xf2,0x31,0x0e,0x1b,0xe4,0x3e,0x31,0x49,0xc9,0xc7,0x9e,0x3f,0x38,0x07,0xad, - 0x49,0xe5,0x03,0x8f,0xb6,0x54,0xee,0x8e,0x49,0x25,0x26,0x29,0x9b,0xfe,0x37,0x63, - 0x05,0x16,0xed,0x9d,0xba,0x2b,0xdd,0x7f,0xb9,0x40,0x44,0xbe,0x86,0x77,0x75,0x68, - 0x2c,0x65,0x3e,0xc4,0xba,0x3e,0x4e,0xa0,0x59,0x1d,0x2d,0xe9,0x11,0x03,0xc6,0xb9, - 0x43,0x7e,0x22,0xa7,0xa5,0xb6,0xf9,0x1a,0x8b,0xf9,0x80,0x13,0x31,0xd6,0xa6,0xba, - 0xc0,0x5c,0x9e,0x8a,0x1f,0x41,0xef,0x16,0x03,0xe4,0xd5,0x1c,0x45,0x3c,0x31,0x7c, - 0x5e,0xbc,0xef,0x37,0xca,0x29,0x27,0xc0,0x00,0x8e,0x22,0xe5,0xd9,0x60,0x5c,0x86, - 0x07,0xf4,0xc2,0xa6,0xe5,0x26,0x89,0x52,0xc4,0xd6,0xcd,0xd5,0x8c,0x34,0xe8,0xd2, - 0x99,0x8e,0xae,0x14,0x6b,0xd6,0x8a,0x48,0xe6,0xa4,0x50,0xbc,0x77,0x37,0x59,0x81, - 0x8d,0x2d,0xa1,0xc7,0x99,0xd9,0x79,0x2b,0xc2,0xcb,0x92,0xd6,0x48,0xa2,0x49,0x52, - 0x7e,0xc1,0xaf,0x3e,0x18,0x5e,0x06,0xd1,0x99,0x3e,0xc6,0x44,0x3f,0x4b,0x30,0x41, - 0x6d,0xa7,0x18,0x4e,0xb1,0xb4,0x43,0x8a,0x0a,0x18,0xcc,0xe2,0x0a,0x7e,0x36,0xf7, - 0xc4,0x28,0xd6,0xbb,0x6b,0xe7,0x11,0x99,0xf8,0x58,0x6f,0x0f,0x9f,0xee,0x49,0xb2, - 0xa0,0x70,0x19,0x4f,0x31,0x59,0xdd,0xe6,0x13,0xa4,0x91,0xc8,0x3f,0xa4,0x26,0x63, - 0x70,0x28,0xf1,0x2b,0x36,0x18,0xb9,0x4a,0x9d,0x85,0x81,0xf3,0xab,0x03,0x6a,0x05, - 0x0a,0x82,0xc0,0x86,0xe9,0x2e,0x28,0x36,0x6f,0x4d,0xc0,0xce,0x18,0x63,0x62,0x80, - 0xec,0x86,0x95,0x8c,0x0f,0x34,0xf8,0x28,0xcf,0x0e,0xb8,0x10,0xab,0x9c,0x2c,0x5b, - 0x88,0xc8,0xa3,0xcf,0x80,0xc6,0xa3,0x59,0x3b,0x88,0x98,0xc1,0x63,0xee,0x4b,0x5b, - 0x23,0x84,0xc9,0x1f,0x9e,0xeb,0x6c,0x59,0x7a,0xae,0x4c,0x60,0x60,0x17,0x34,0x38, - 0xe5,0x0f,0xb9,0x4e,0x93,0xb7,0x61,0x50,0x7d,0x2c,0x32,0x53,0x3f,0x41,0x21,0x9a, - 0x3d,0x20,0xca,0xad,0xbc,0xbf,0xbe,0xb0,0xf4,0x72,0x3a,0x43,0xc7,0xeb,0x5d,0xfb, - 0x03,0x28,0xcf,0x29,0x44,0x25,0xd8,0x2c,0xc0,0x12,0x25,0x7c,0xec,0xe1,0x3f,0x6b, - 0xcf,0x70,0x53,0x2f,0x1f,0x09,0xd4,0x14,0x12,0x8d,0x0e,0xa4,0xdb,0x1f,0x5b,0x06, - 0x05,0x55,0x9b,0x14,0x16,0x2d,0x54,0x56,0x6c,0xd6,0x74,0x4b,0xfe,0x2b,0xd1,0x7a, - 0x9f,0xdc,0x71,0x87,0xe8,0xcc,0x88,0xc9,0xc6,0xd7,0xb1,0xf4,0x46,0xaf,0x1d,0x6d, - 0x08,0x9f,0xc7,0x87,0xb5,0xf2,0xc4,0x3a,0x15,0xdd,0x91,0x5a,0x75,0xb0,0xd6,0xaa, - 0x4e,0xd7,0x02,0xb3,0x3a,0xb1,0xcc,0x2e,0x50,0xdc,0x7d,0xf3,0xde,0xf0,0xb4,0x31, - 0x00,0xd6,0xec,0xd3,0x05,0xd8,0x14,0xe0,0x38,0xd9,0x8b,0x17,0xc9,0xa6,0x12,0x73, - 0xd2,0x36,0x14,0xcb,0xc9,0x65,0x6b,0xf2,0xaf,0x6f,0xa2,0x19,0x4d,0xf6,0xed,0x1e, - 0xce,0xb5,0xda,0x21,0xa6,0x4b,0x07,0xb3,0xa2,0x7d,0xd6,0x19,0x2e,0x09,0x3d,0x20, - 0x85,0x37,0x18,0xf3,0x6b,0x54,0xee,0x1f,0x39,0xac,0x06,0xf2,0x9c,0x88,0x1c,0x32, - 0xc7,0xfc,0x11,0x8f,0xb1,0xb4,0x82,0xc5,0xcf,0x25,0x72,0x2f,0x7a,0xb0,0x10,0x9d, - 0x4c,0x9d,0x48,0x6f,0xf7,0xf9,0xbe,0x46,0x69,0x04,0x01,0xce,0x75,0x21,0xcb,0xe4, - 0x66,0xde,0xcf,0x91,0x7a,0x4e,0xdb,0x39,0xec,0xd2,0x38,0x2b,0xd3,0x68,0x56,0xf5, - 0xcc,0x9f,0xf1,0x0d,0xb9,0x36,0x29,0xd9,0x8d,0xeb,0xa7,0xae,0x82,0x9b,0x34,0xc8, - 0xa7,0xdd,0xb8,0x66,0x36,0xba,0x1c,0xf9,0x16,0x5f,0xf4,0x1f,0xc1,0xbe,0xe8,0x84, - 0xa2,0xff,0x69,0x21,0xd6,0x5e,0x56,0x06,0xa3,0x9f,0x03,0xe2,0x5d,0xe2,0xa7,0xf3, - 0x70,0x85,0xc7,0x0b,0x1f,0x34,0x51,0xd7,0x84,0x25,0xa9,0x00,0xb4,0x55,0xc4,0x5e, - 0x3c,0xa0,0x43,0x40,0xbc,0x1f,0xe2,0x99,0x98,0x29,0x80,0x0e,0x40,0x6d,0x5e,0xef, - 0x0c,0xab,0x5f,0xa0,0x67,0x20,0xc0,0x22,0x58,0xb7,0xa8,0x15,0xf1,0xe1,0x77,0x2e, - 0xf6,0xf4,0x4b,0x6b,0x44,0x2a,0x98,0xc1,0x67,0x49,0x58,0x29,0x33,0x1c,0xfc,0xa1, - 0xa2,0x1d,0x3e,0x98,0xb3,0x02,0x91,0x35,0xab,0x61,0x8c,0xa1,0xa0,0xbe,0xf6,0xd3, - 0x02,0x45,0x77,0xe5,0x32,0x61,0xd9,0xa4,0xa6,0x45,0x8f,0x57,0xb9,0x6e,0x78,0xdb, - 0x80,0x53,0xb8,0x5f,0x96,0xb0,0x52,0x13,0x73,0x4e,0xd4,0xfd,0xaf,0x08,0xcc,0xad, - 0x0b,0x44,0xa8,0x10,0x36,0x2a,0x78,0x64,0x23,0xfa,0x34,0xee,0x50,0xa5,0x86,0x23, - 0x50,0x0e,0x65,0x27,0xd1,0xc6,0x57,0x51,0x39,0xb9,0xb6,0x25,0xce,0x9b,0x96,0x54, - 0xa7,0x45,0x59,0x1e,0x6e,0x1b,0xf5,0xf4,0x83,0xb8,0xf9,0x7d,0x2e,0xde,0xb5,0x2c, - 0x63,0xb9,0xdf,0xf2,0x9a,0x20,0xe3,0x45,0xeb,0x53,0x80,0x9f,0xb3,0x2c,0x99,0xeb, - 0x75,0x12,0xea,0x5c,0x0c,0xab,0x6a,0xd5,0x7b,0xf6,0x3e,0x38,0x05,0xf3,0x07,0xf9, - 0x77,0xa5,0x0e,0xfd,0x9c,0x25,0x07,0xcf,0xce,0xa8,0xa9,0x9d,0x3e,0xc5,0x9a,0x7f, - 0xe2,0x04,0xf3,0xe4,0xb9,0xb0,0xc4,0x45,0xbe,0x2c,0x9f,0x3d,0xd1,0x4b,0x84,0x44, - 0x0b,0x7e,0x98,0xb3,0xe5,0xf3,0xed,0x59,0xeb,0xcd,0xca,0x7c,0x0e,0xbb,0xb1,0x7f, - 0xaa,0xf2,0xb4,0xed,0xea,0x41,0x08,0x11,0xa0,0x29,0x75,0x58,0xd4,0x6f,0x23,0xff, - 0xd4,0x03,0xf4,0x89,0x7b,0xb1,0xff,0x9a,0x4e,0xc3,0xd1,0x2f,0x07,0xb3,0xa7,0xdb, - 0x3d,0xdd,0xad,0x99,0x98,0x2c,0x61,0xfe,0x3c,0xc4,0x6c,0x7c,0x56,0x63,0x45,0xdf, - 0x99,0xec,0xcc,0x13,0x53,0x65,0x73,0xde,0xb2,0x5a,0x6b,0xa4,0x70,0x49,0xb3,0x03, - 0x5d,0xcc,0xd6,0xa7,0x92,0x54,0xf0,0xcf,0xa3,0x4b,0x28,0xdd,0xc1,0x48,0xc5,0x70, - 0xe6,0x7e,0xfd,0x07,0x4e,0xef,0x57,0x25,0xd7,0xd7,0xf6,0xcc,0x2e,0x4b,0x6b,0xad, - 0xa2,0xd3,0xf5,0xb1,0x2c,0x8e,0xa6,0x23,0xe5,0x5b,0x2a,0xdc,0x43,0x73,0x4c,0x6f, - 0x81,0x12,0x7d,0x5a,0x31,0x04,0x8d,0x11,0x3e,0x50,0x77,0xd2,0xae,0x91,0xa3,0x32, - 0x82,0x9f,0x71,0x8b,0xea,0xa8,0x83,0x9d,0x10,0x51,0x5c,0xb2,0xe1,0xd1,0x4d,0x44, - 0x03,0x9c,0x6e,0xab,0x67,0xca,0xe9,0xc5,0x95,0x52,0xab,0xd6,0x99,0xf3,0xba,0x33, - 0xa5,0x0c,0xe2,0xcd,0x33,0x6b,0x02,0x89,0x3f,0x13,0x51,0xef,0x3b,0xff,0xa5,0xb4, - 0xf4,0xe9,0x2b,0xd7,0xc5,0x84,0x17,0x08,0x4c,0x38,0x96,0xac,0x30,0x78,0xb6,0xeb, - 0x51,0x86,0x4e,0xa4,0x81,0x22,0x8e,0x50,0x84,0x14,0x9e,0xbc,0x33,0x79,0x22,0xb0, - 0xb0,0x1e,0xd9,0x6f,0xbc,0x87,0x07,0x81,0xec,0x34,0x97,0xad,0xb4,0x7a,0x31,0xa5, - 0x56,0x86,0x09,0xc3,0x34,0x59,0xe4,0xb1,0x4c,0xa4,0x9f,0xbd,0x89,0x7b,0xab,0x4c, - 0x51,0x4a,0x69,0xb7,0xe7,0x7d,0xf5,0xef,0xcb,0x23,0xf1,0x1d,0xe6,0x1c,0x44,0xf8, - 0x88,0x10,0x5d,0x58,0x1a,0x5a,0xda,0x7a,0x6e,0x27,0xa1,0x01,0x7b,0x73,0x27,0x89, - 0xa4,0x13,0xfd,0x33,0xd9,0x21,0x93,0x6c,0xe4,0xd4,0x3f,0x67,0xd8,0xa8,0x45,0x99, - 0x08,0x19,0xf7,0x26,0x9a,0x7c,0x27,0x96,0xa8,0xbf,0xb7,0x7b,0x07,0x3e,0xa7,0x30, - 0xfb,0x86,0xa0,0xfb,0x14,0x7b,0xf0,0xde,0x69,0xc6,0xb4,0x27,0xab,0xc0,0x3a,0xf0, - 0xee,0x10,0x17,0x4a,0x34,0xa3,0x40,0x0d,0x63,0x14,0x47,0xc9,0x55,0xe1,0x54,0x5a, - 0x25,0x73,0x89,0x83,0xfd,0x7b,0x11,0xbe,0xa7,0x4a,0xb1,0x27,0xd4,0xc2,0x79,0x92, - 0x91,0x98,0xc9,0x56,0x78,0x28,0x6d,0xb7,0xec,0xe6,0x46,0x37,0x2a,0x1c,0x58,0xdd, - 0x84,0xd3,0xba,0xdb,0x66,0xe6,0x74,0xe5,0xbd,0x58,0x98,0x78,0x90,0x10,0xec,0xaf, - 0x47,0xc4,0xb0,0x73,0xab,0x06,0xc7,0x35,0x8d,0xdc,0xa6,0xe4,0x53,0x39,0x26,0x21, - 0x50,0x8e,0xf2,0xed,0x37,0x9f,0xca,0x39,0x27,0x39,0x17,0x15,0x3d,0x40,0xb6,0x57, - 0xa3,0x7c,0xef,0xe6,0xf4,0x29,0x31,0xe6,0xc1,0x9c,0xc2,0x29,0x0a,0x5a,0x72,0x6c, - 0xf3,0xe4,0xd9,0xec,0x7f,0x6e,0xa2,0xc2,0xdf,0x85,0x49,0xd1,0x54,0xe8,0x39,0xf3, - 0x05,0xb4,0x2e,0x9a,0x42,0x30,0x63,0xe0,0xe8,0x16,0xba,0xc1,0xa2,0x16,0x1d,0x33, - 0x52,0x25,0x63,0xe6,0x6b,0x51,0x48,0x23,0x69,0x75,0x4c,0xd0,0xdc,0xca,0x87,0x88, - 0xfd,0x81,0x6b,0xe3,0x0f,0xad,0x3a,0x5d,0x32,0xa7,0xbb,0xc0,0x22,0xeb,0x64,0x6e, - 0x8c,0x7b,0x77,0xca,0x66,0xce,0x6e,0x9a,0x4c,0x3d,0x5d,0x70,0x88,0x18,0xde,0xb8, - 0x8d,0x85,0xc6,0x3c,0xa8,0xc8,0xa3,0x1b,0xa6,0xd4,0x99,0x7a,0x8a,0xb0,0x58,0xbb, - 0x2d,0x81,0xd8,0xad,0x98,0x3f,0xb3,0x87,0xa5,0x8c,0x14,0x9c,0x04,0x45,0x9d,0x29, - 0x2c,0x89,0xd3,0xb0,0x12,0x59,0xec,0x4b,0xcd,0x8d,0x50,0x20,0x62,0x13,0xdf,0xa6, - 0x4f,0xb3,0x0f,0x03,0xa7,0x8f,0x6d,0x78,0xc1,0x4f,0xb4,0xa7,0x45,0xf0,0xdb,0x93, - 0x37,0x8a,0x13,0x12,0x4d,0xc3,0xe5,0x80,0xe8,0x2c,0x7a,0xba,0x74,0xe1,0xe5,0x72, - 0x82,0x92,0x5a,0x03,0xc4,0xef,0x34,0xc5,0x1f,0x90,0xb5,0xb3,0x7e,0xb0,0x4b,0xe5, - 0x52,0x9a,0x6d,0xaf,0x45,0xa8,0x5f,0x8b,0x10,0x55,0x7d,0x22,0xb3,0xfb,0x93,0xb8, - 0x87,0x4b,0x48,0x54,0x76,0xbe,0x14,0x42,0x34,0xdb,0x18,0x66,0x8a,0xd4,0x34,0xd7, - 0xd2,0x1c,0xee,0xad,0x57,0x2a,0xf8,0x10,0xbf,0x91,0x1e,0xe9,0xb9,0x5e,0xd1,0xa1, - 0xc7,0x33,0xe7,0x3f,0xb6,0xb2,0x15,0xa7,0xed,0x5d,0x59,0xa5,0x75,0x22,0x5b,0xb3, - 0xf7,0x6c,0x96,0xad,0xb9,0xd5,0x5e,0xf4,0x46,0x28,0x9b,0xf3,0x9c,0x71,0xf1,0xd5, - 0xd9,0x64,0x20,0xd0,0xb1,0xda,0x32,0x6a,0x70,0x75,0x32,0x53,0x7c,0xb9,0x71,0x98, - 0x2b,0x09,0x51,0x1a,0x4d,0x16,0xba,0x1a,0x33,0x99,0x7c,0x3a,0x33,0xb8,0xfc,0x8b, - 0xdf,0x1a,0x0c,0x0a,0x2f,0x85,0x79,0x39,0xe4,0xd0,0x77,0x3a,0xba,0xf2,0x4b,0x85, - 0x87,0x6f,0x10,0x7d,0x44,0x1a,0xd3,0x9f,0x60,0x9a,0x53,0x3d,0x4b,0xfa,0xe2,0x4e, - 0x71,0x05,0x22,0x1e,0x60,0x03,0x5c,0x6f,0x60,0xbe,0x76,0xb1,0x87,0x00,0x64,0xdb, - 0x8c,0xdc,0x42,0x4c,0x67,0xb7,0x35,0x18,0x92,0x51,0x19,0x0f,0xa5,0x8d,0x07,0x8a, - 0x22,0x93,0xb7,0x7f,0xf0,0x21,0x3d,0xea,0x6c,0x96,0xa9,0x71,0xfe,0x0a,0x51,0xb3, - 0x20,0x19,0xeb,0xc7,0x46,0xb6,0xbb,0x2b,0xe3,0xba,0xc5,0x0c,0x2d,0x23,0xb9,0x5e, - 0xdd,0x7d,0x60,0xa8,0x16,0x99,0x12,0x52,0xab,0x96,0x80,0x88,0x18,0x7b,0xbe,0xe1, - 0xe9,0x05,0x53,0xba,0x6e,0xc1,0x19,0xc3,0x93,0x9d,0x34,0xdd,0xdf,0x8c,0xae,0x1f, - 0x64,0xf6,0xda,0xa5,0x9a,0xd3,0x6f,0xbe,0xab,0xf4,0xf5,0x53,0x50,0x72,0x57,0x23, - 0xc1,0x4f,0xd0,0x38,0x34,0xaa,0x22,0x6f,0x1c,0xfe,0xc0,0xb6,0x17,0xe1,0x09,0x64, - 0x80,0x00,0x40,0x31,0x67,0x4a,0xef,0x82,0xcd,0x05,0x80,0xd0,0x64,0x65,0xcc,0x97, - 0xc1,0x45,0xe0,0x96,0xc7,0xe3,0xf4,0x32,0xc0,0x91,0xce,0x16,0xa8,0xc8,0x4e,0x23, - 0x43,0x8c,0x81,0x7a,0x9a,0x4a,0xbd,0xe1,0x3e,0x66,0x87,0xd0,0x3b,0x6f,0x01,0xd0, - 0xb0,0x09,0x6e,0xc2,0x72,0x88,0xbb,0x6e,0x0d,0xca,0x16,0xd0,0x20,0xec,0x63,0x1b, - 0x6a,0x9c,0x86,0x3c,0xe7,0x6e,0xbd,0x36,0xac,0xbc,0xb4,0x44,0xfb,0xed,0xaf,0x0c, - 0x8e,0x1f,0xb4,0x69,0x94,0x8f,0x44,0x0a,0x4d,0x05,0x83,0x57,0x78,0x28,0x25,0xb8, - 0x50,0xa1,0x52,0x09,0xe1,0xb1,0xa5,0xd8,0x20,0x0a,0xe8,0x13,0xb5,0x5f,0x5b,0x87, - 0x72,0xf0,0x90,0xdd,0xd5,0xf0,0x7a,0x37,0x19,0x3f,0xa5,0x75,0xa9,0xc4,0x18,0xdd, - 0xad,0x1c,0xa4,0xbd,0xd8,0x6c,0x2c,0xfb,0x21,0xca,0xfa,0x55,0xb1,0x28,0x10,0xc0, - 0xac,0x1d,0x94,0xc7,0x0b,0x82,0xbd,0x89,0x91,0x5d,0x7a,0x82,0xa2,0xec,0x19,0xc0, - 0x2d,0x1e,0xbd,0xd3,0x71,0xd8,0xd3,0x73,0x1c,0xfa,0x89,0x6e,0xa8,0x9b,0x11,0xc9, - 0x2c,0x14,0xa8,0x03,0x6a,0xf3,0x25,0xe3,0x1e,0x12,0xf3,0x86,0x2a,0xec,0xbb,0xbc, - 0xd7,0xa0,0xbe,0xc3,0xae,0x4f,0xa0,0xc2,0x23,0xac,0x2b,0xeb,0xe5,0xad,0x2c,0xa1, - 0x80,0xc0,0xe9,0x7f,0xd0,0x27,0xe7,0xdf,0x3c,0xae,0xc7,0xb4,0x77,0xe1,0x72,0x90, - 0x1d,0x14,0xbf,0x0b,0x07,0xbf,0xe8,0xcf,0xa9,0x5d,0x3c,0xd6,0xab,0xcd,0x55,0x05, - 0x5c,0x7f,0xf4,0xef,0x93,0xde,0x7d,0xf5,0x61,0x8e,0x29,0xca,0x7e,0xd5,0x1a,0xdf, - 0x45,0x55,0x73,0xe0,0xb0,0x30,0x3c,0x66,0x9e,0x15,0x63,0xe5,0xff,0x78,0x0f,0xaf, - 0x42,0x35,0xd4,0xd0,0xbe,0x74,0xf9,0x44,0x9b,0x7e,0x3a,0x86,0x98,0xd3,0xe2,0xfd, - 0xa4,0xed,0x97,0xa7,0xd3,0x63,0xf2,0x51,0x3a,0xf5,0xbd,0xfb,0x34,0x82,0xc6,0xb1, - 0xa5,0xba,0x12,0xdd,0xed,0xbc,0xea,0x11,0xe5,0x8c,0x83,0x67,0xf7,0xd8,0x64,0x2c, - 0x29,0x1a,0x40,0x2a,0xf3,0x7a,0x6e,0x8f,0x95,0x57,0x5b,0xec,0x38,0x8c,0x46,0x94, - 0x1a,0xaf,0x41,0xee,0xb4,0x4f,0xc9,0x3a,0x6c,0x20,0x32,0x2f,0x6e,0x73,0xb8,0x4e, - 0x6a,0x01,0x98,0xf1,0xbe,0xea,0x28,0x2c,0xe6,0xd0,0x5a,0xaf,0xe8,0x87,0xb0,0x6f, - 0x52,0xe0,0x72,0xef,0x2f,0x64,0x67,0x3b,0x69,0xff,0x1f,0xa2,0xee,0xd6,0xd5,0xa8, - 0x62,0xe7,0x97,0xf1,0xd1,0x78,0x7f,0x6c,0x16,0x8a,0x64,0x1f,0x96,0xd7,0xe6,0x5d, - 0xca,0xb2,0x6a,0xbe,0xcc,0xb6,0x0c,0x17,0x45,0xfb,0x76,0x76,0xab,0xe9,0xc7,0x4d, - 0xf5,0x87,0xfd,0x7d,0x3a,0x91,0xfb,0x6c,0x11,0xf3,0xe1,0xe5,0x11,0xfb,0x94,0x2a, - 0xd4,0x73,0x9f,0xe0,0x50,0x7b,0x67,0x17,0x56,0xae,0xf8,0xe6,0x90,0x0b,0x20,0xc0, - 0x87,0xc6,0xd5,0xfb,0xbf,0xe2,0x17,0xd3,0xd8,0x80,0x10,0x54,0x3e,0x08,0xf2,0x5a, - 0x87,0x85,0x2b,0x65,0x78,0xcd,0x47,0xcf,0x45,0xcf,0xc2,0x56,0x5b,0x1d,0x96,0x27, - 0xb7,0x34,0xfb,0x71,0xb6,0x80,0xd9,0xa9,0xe6,0x14,0xcf,0x20,0x75,0x9d,0x39,0x71, - 0x7a,0x5c,0xcf,0x6e,0x96,0x43,0x51,0xb5,0x39,0x82,0x04,0x68,0xb6,0x00,0x45,0x24, - 0xf5,0x94,0x4f,0x3d,0xcb,0x70,0xdb,0x3d,0xfb,0x38,0x56,0x9c,0x69,0x76,0xdb,0xb7, - 0x01,0x8c,0xde,0x53,0x7c,0x20,0x06,0x41,0x2c,0x40,0xed,0x67,0x64,0x29,0xd9,0xb8, - 0x7a,0x0d,0x53,0x58,0x7a,0x0d,0xd2,0x55,0x1a,0x23,0x31,0x92,0x1b,0xe5,0x69,0x4d, - 0xa8,0x73,0xed,0x11,0x05,0xf3,0xf9,0x35,0x55,0x63,0xa3,0x7f,0x70,0xfc,0x7d,0x0b, - 0x6f,0x89,0x79,0xa0,0x63,0x48,0x1d,0x55,0x95,0x75,0x21,0xaa,0x6b,0x51,0x78,0x18, - 0xe6,0xed,0x02,0xcd,0xac,0xaa,0x7a,0x08,0xb2,0xcf,0x65,0xb7,0x0d,0x39,0x34,0xf8, - 0x08,0x07,0x63,0xff,0x79,0xeb,0x79,0x2e,0xa7,0xc5,0x8b,0xd4,0xda,0x31,0x13,0x66, - 0xae,0x0a,0x15,0x02,0x3b,0x05,0xb3,0x39,0x6c,0x94,0x9b,0xf0,0xf9,0x97,0x38,0xa2, - 0x92,0xc1,0xc1,0x41,0xc6,0x07,0xa5,0x70,0x86,0xc4,0x58,0x08,0xbc,0xfc,0xdd,0xae, - 0xfb,0x26,0xba,0xc0,0xe4,0x56,0x92,0xf0,0x6d,0x1b,0xa3,0x28,0xfa,0x6d,0x18,0x43, - 0x2b,0x31,0x46,0x4b,0x19,0xb8,0x54,0x9a,0x52,0xae,0x77,0xa9,0xb4,0xaf,0xab,0x3b, - 0x8f,0x5b,0xeb,0x9d,0x1c,0xe9,0x04,0x86,0xcf,0xc1,0x03,0x5b,0x50,0xed,0x20,0x86, - 0x0f,0x06,0x9e,0x0d,0x8f,0x3d,0x0c,0x5d,0xe9,0x56,0xfb,0x5d,0x07,0xf0,0x37,0x90, - 0xdb,0xff,0x6c,0x8a,0x6a,0xb2,0xd0,0x20,0xd6,0xd9,0x01,0xe9,0x73,0x61,0xfa,0x93, - 0xa2,0x68,0xc4,0x6d,0x34,0xd2,0x30,0xe3,0xa0,0x2f,0x1e,0xc9,0x21,0x0e,0x6d,0xac, - 0xad,0xff,0xc3,0x8e,0x54,0xdf,0xbf,0x31,0xe0,0xaa,0x09,0xe8,0x0c,0x0f,0xf4,0x04, - 0x28,0xaf,0xde,0x76,0xb6,0x1b,0x8b,0x8c,0x60,0x25,0xb5,0x20,0xe4,0xf7,0x93,0x5b, - 0x8a,0xd7,0x6c,0x91,0x13,0x48,0xd7,0x32,0x27,0x28,0xd5,0xc0,0x95,0xe5,0xe1,0xa4, - 0xce,0x9b,0x41,0xa5,0xc3,0xbf,0x16,0x1c,0x6b,0x60,0x16,0x1c,0x67,0x8b,0xe5,0x5e, - 0x06,0x38,0xb5,0xb5,0xc0,0xb3,0xd6,0xf1,0xe3,0x6a,0x4f,0x44,0x47,0x04,0x0e,0x48, - 0xd1,0x19,0x41,0x71,0xdd,0x6e,0x0e,0x97,0xcf,0x99,0x09,0x69,0xb6,0xc2,0xfd,0x69, - 0xeb,0x32,0x94,0x04,0xce,0xf8,0x4b,0x47,0xc6,0xc2,0x2e,0xc1,0xf0,0x5f,0xa7,0x78, - 0x62,0x17,0x5c,0xfd,0x66,0x05,0x67,0x27,0xc4,0x01,0xbf,0xaa,0x20,0xc0,0x49,0x9f, - 0xc6,0x1d,0x0c,0xca,0x61,0xa3,0xaa,0xdd,0x8d,0x24,0xf6,0x7f,0xf9,0x0f,0xbd,0xed, - 0x8f,0x33,0x39,0x6e,0x45,0x3c,0xdd,0xb5,0x9b,0x20,0x44,0xd4,0x6e,0x39,0x34,0x25, - 0x8c,0x9b,0x51,0x82,0x1e,0xfd,0x00,0x1a,0x86,0x1e,0x96,0x78,0x83,0xbc,0xb8,0x49, - 0x2e,0xf6,0x9c,0x4b,0x91,0x2c,0x49,0x5a,0x86,0xd5,0xc0,0x12,0xfe,0xf0,0x4f,0x8a, - 0x0e,0x15,0x43,0xfb,0x30,0xfe,0x69,0x1a,0x04,0xf4,0x13,0x7f,0x03,0xdf,0xac,0x42, - 0x83,0xd4,0xaa,0xd4,0xb3,0xa8,0xcb,0x45,0xa1,0xef,0xf6,0xed,0x53,0xe2,0x76,0x83, - 0x6a,0x87,0xea,0x10,0xc5,0xe4,0x7e,0xe5,0x42,0xa3,0x38,0xc4,0xe9,0xb2,0xe3,0x1e, - 0x4e,0x8f,0x01,0xf6,0x5a,0x89,0x00,0x52,0xf0,0x2e,0xcb,0x0d,0xac,0xcd,0x89,0xe2, - 0x57,0xac,0x2e,0x22,0xfa,0x86,0x43,0x56,0xa9,0x52,0xe7,0x32,0x28,0x6c,0x38,0x3a, - 0xe9,0x0b,0x9a,0x06,0x6e,0x8b,0xaf,0x12,0x30,0x9b,0x6b,0x04,0x5e,0x9f,0x30,0xfc, - 0xf4,0x44,0x7f,0x52,0xe4,0x8e,0x66,0x77,0x95,0x4d,0xf8,0x34,0xf2,0xea,0x73,0x6c, - 0x7d,0xab,0x61,0xb5,0x1a,0xf5,0xbd,0x12,0x46,0xb0,0x2e,0x41,0xf6,0x60,0x76,0xd5, - 0xfb,0x7e,0x45,0x55,0x5b,0x9d,0x5a,0x1e,0x3c,0xea,0xc1,0x69,0xd5,0xff,0xe5,0xf9, - 0xd2,0x18,0x02,0xfd,0xf8,0x68,0x6c,0x2e,0xa9,0xcb,0x17,0x31,0xa6,0x68,0xa1,0x47, - 0xf0,0xf5,0x2f,0x07,0x72,0x5d,0x02,0x29,0xb5,0x58,0x99,0x3e,0x80,0x28,0x7d,0x93, - 0x5d,0x97,0x2b,0x87,0x0c,0xbe,0xf4,0xda,0x44,0x47,0x97,0x31,0x58,0xa7,0xa8,0x2f, - 0x55,0xee,0xca,0xdb,0x0b,0x28,0xdb,0xc8,0x3e,0xeb,0x30,0x46,0x0c,0x96,0x7a,0xa6, - 0xa6,0x01,0xc8,0x63,0x28,0x79,0xf2,0xf7,0xb5,0xe1,0x04,0xee,0xda,0x64,0x8a,0x61, - 0xee,0x50,0x9f,0x58,0x26,0x7b,0xca,0x17,0x23,0x09,0x5e,0x8c,0xa4,0x62,0xbe,0x36, - 0xe2,0x03,0x15,0x76,0xac,0xbb,0xf7,0xfb,0xca,0x91,0xeb,0x1d,0x6e,0x67,0x33,0x7e, - 0x36,0x4d,0x27,0xdd,0x67,0x0f,0xa4,0x0b,0xa1,0x2b,0xbb,0x7e,0xef,0x62,0x36,0xb0, - 0xc8,0xbf,0xca,0xca,0xcd,0x6c,0x92,0xc2,0x82,0xd0,0x89,0x46,0xdc,0x32,0xcc,0xa9, - 0x1f,0x53,0x9f,0xae,0x02,0xd1,0x9c,0xbd,0x52,0xcc,0x27,0xeb,0x77,0xe8,0xa5,0xf3, - 0xc2,0xf5,0x45,0xbd,0x77,0x70,0x55,0x86,0x41,0xd5,0xdd,0xb2,0x53,0x8e,0x1a,0xe7, - 0x50,0x1c,0x26,0xd2,0xbf,0xef,0x47,0xb8,0x46,0xde,0xed,0x37,0xf0,0x10,0x3d,0xbe, - 0x85,0x55,0x2c,0x4e,0x10,0xe2,0x0e,0xe4,0xc5,0x44,0x10,0x66,0xe8,0x7e,0x48,0x32, - 0xa1,0xe2,0x3f,0xef,0xc9,0xa0,0x05,0x6e,0x84,0x4e,0x70,0x67,0x28,0x7f,0x25,0x7e, - 0x01,0x9d,0xba,0xfa,0x4c,0xe3,0x0f,0x29,0x45,0xdb,0xad,0x18,0xfa,0x8b,0x37,0x21, - 0x70,0x18,0xbe,0x17,0x30,0x71,0x69,0xc7,0xce,0x15,0xc9,0x05,0x99,0x86,0xb2,0xf3, - 0x8b,0xe5,0x42,0x46,0x83,0xc7,0x4f,0xb8,0xcf,0x5c,0xcc,0xad,0xdb,0x39,0x1c,0x6d, - 0xc2,0x5d,0x9d,0x76,0x3f,0x88,0x47,0xc2,0xcc,0x37,0xbf,0x80,0x7f,0xc8,0x59,0x6b, - 0xfc,0x9f,0xdd,0xe1,0xc8,0x78,0x93,0x2d,0x9f,0xc8,0x3c,0xd2,0x2d,0xf1,0x35,0x29, - 0x1b,0x59,0xd5,0x66,0x0c,0x79,0x7d,0xb1,0xe8,0xeb,0xef,0xdf,0x06,0xf0,0x26,0x77, - 0xcd,0xb1,0x71,0xe8,0x4d,0x3c,0x0d,0x51,0x83,0xe6,0xaf,0x8a,0x8d,0xf7,0x45,0x3a, - 0x8f,0x4e,0x75,0x6c,0xcb,0xe2,0x15,0xe7,0xc8,0xd8,0x72,0x62,0x8c,0x38,0xca,0x2b, - 0x06,0xb3,0x9d,0x3c,0xc6,0xc1,0x45,0x17,0x15,0xf3,0x05,0xd0,0x49,0x33,0x75,0x7c, - 0x6a,0x7c,0x68,0xdb,0x50,0x5b,0xa0,0x11,0xef,0xf2,0x61,0x78,0x00,0xf4,0x5e,0x31, - 0x6f,0x05,0x43,0xfd,0x6b,0xa0,0x21,0x20,0xe1,0xc6,0xf2,0x46,0x4c,0x60,0x0b,0x1d, - 0xdd,0x2a,0x38,0x92,0x65,0x57,0x40,0x41,0x0a,0xc8,0x6c,0x44,0xf6,0xa0,0xa1,0x45, - 0x16,0xd6,0xc9,0xc5,0x12,0x57,0x44,0x59,0xa7,0x3d,0xe9,0x1e,0x56,0xea,0x8c,0x17, - 0x02,0x95,0xf0,0x02,0x40,0xcf,0x3f,0x40,0xea,0xaf,0xd9,0x73,0xda,0xee,0x77,0xcf, - 0x00,0x74,0x4c,0x04,0x95,0x70,0x8b,0x25,0xbb,0x72,0xea,0x67,0x75,0x06,0x50,0xbd, - 0xfa,0x24,0x8e,0x52,0x7c,0x23,0xe8,0x2c,0xb6,0x19,0x80,0xf2,0x11,0xde,0x04,0x21, - 0x31,0xe3,0x03,0x58,0x58,0x0d,0xca,0xf9,0xc5,0xe6,0xcb,0xe5,0x5e,0xb7,0x51,0xd7, - 0xff,0x88,0x69,0x25,0x7c,0x62,0xd6,0x08,0x1a,0x86,0xa1,0x63,0xd1,0x3c,0x72,0x94, - 0xf7,0x73,0x66,0x50,0x12,0xb6,0xf6,0xc8,0x68,0xd3,0xf8,0xf1,0xff,0xee,0x9d,0x3e, - 0xd5,0xd8,0xb9,0x9a,0x6d,0x14,0x63,0x2a,0xe8,0x4e,0xc2,0xbc,0x58,0x70,0x23,0xc9, - 0x0f,0xcc,0xde,0xf0,0xff,0xd0,0x08,0x4d,0x8c,0x85,0x3b,0xca,0xbf,0xca,0x94,0xea, - 0x2e,0x5b,0x93,0xe4,0x9b,0x70,0x8a,0xae,0x4f,0x3c,0x81,0xdd,0x5f,0xa3,0xdb,0xa8, - 0xa2,0xf1,0x9c,0x79,0x75,0x09,0xda,0x43,0xcb,0x1d,0xca,0x6a,0x56,0x02,0xaa,0x62, - 0xbd,0x80,0x8b,0x44,0xcf,0x19,0xba,0x3e,0xce,0xd6,0xe1,0x7c,0xe6,0xac,0x1b,0xbb, - 0xb5,0x3f,0x62,0xbc,0x7e,0xe2,0xdb,0x52,0x4b,0x5f,0x2c,0x6e,0xd8,0x14,0x90,0xab, - 0xaa,0x7e,0xcc,0xae,0x03,0xbd,0x40,0x9d,0xfc,0x41,0xa2,0xcb,0x7a,0x83,0x33,0x2f, - 0x22,0x21,0xb3,0xc4,0x10,0x0c,0xeb,0xa3,0x62,0x09,0x79,0x9a,0x72,0x61,0x13,0x70, - 0x46,0x54,0x97,0x51,0xff,0xcb,0xfc,0x43,0x0e,0x9f,0x67,0x67,0xa4,0x0c,0x5d,0xf9, - 0x07,0xf7,0x1a,0xdc,0x44,0xe8,0x3f,0x27,0xf5,0xbf,0x8a,0xc5,0x0f,0xb0,0xba,0x79, - 0x00,0x4c,0xe5,0xae,0x44,0x17,0x28,0x97,0x6a,0xd1,0x96,0x47,0x3b,0x22,0xb0,0x12, - 0xa7,0x2c,0xdc,0x81,0x38,0x0b,0x0c,0x04,0x76,0x29,0xbc,0xdb,0x9d,0xb0,0xb8,0x80, - 0x09,0x1f,0xd6,0x73,0xc4,0x41,0xdb,0x5a,0x8e,0x6f,0x58,0x8d,0xd4,0x05,0x9e,0xe5, - 0x98,0x1b,0x51,0xa5,0xce,0x09,0x8d,0xc7,0x32,0x35,0xcf,0x57,0x6c,0x59,0x55,0x8f, - 0x5c,0x33,0x4d,0xc9,0x3b,0xd2,0x5a,0x11,0x07,0x76,0xdd,0x3c,0xd3,0xb9,0x7c,0xee, - 0x50,0x87,0xe9,0x6c,0xdc,0xe3,0x81,0xab,0xe1,0xd4,0x76,0x97,0xce,0xf5,0xa9,0xe8, - 0xd6,0x62,0x17,0x2f,0x9e,0x66,0x9a,0xa9,0xe1,0x1f,0x7e,0x86,0xce,0xbb,0x9c,0x6d, - 0x88,0xe1,0xa7,0xbe,0xaf,0x45,0x5f,0xb4,0x68,0x0e,0x48,0x5f,0xc9,0x2b,0x72,0x67, - 0x0d,0xd9,0x1a,0x57,0x00,0xd5,0x19,0xbd,0x23,0x66,0xa8,0x4f,0x42,0xae,0xef,0x0a, - 0x92,0xa4,0x52,0xac,0xb3,0xde,0x4e,0x15,0x87,0xd3,0x77,0x6c,0x7b,0x06,0x6e,0xfe, - 0xf3,0xd9,0x55,0x66,0xb2,0xdf,0x6f,0x09,0x59,0x00,0x3c,0x55,0x4c,0xef,0xa7,0x22, - 0x86,0x65,0x3c,0xcf,0xc6,0x41,0xa3,0x15,0x13,0x5f,0xad,0xea,0x5d,0xbc,0xcc,0xdc, - 0x12,0x2e,0x14,0xa0,0xb1,0x40,0x2d,0xcd,0x04,0xec,0x47,0x01,0xef,0xb2,0xff,0x84, - 0x3b,0xc5,0x7f,0x76,0xeb,0x62,0xaf,0xc0,0xf5,0x01,0x91,0x5b,0xf7,0x7b,0x58,0x19, - 0xa2,0x07,0x16,0xe7,0x95,0xac,0xb4,0x72,0xc2,0xea,0xc1,0xee,0xa4,0x2e,0x58,0x31, - 0x25,0x04,0x5a,0xf8,0x2d,0x83,0xfd,0xa1,0x3c,0x62,0x2f,0xa1,0xd5,0x49,0x59,0x08, - 0xa3,0x21,0x58,0xe6,0x1d,0x2e,0xfb,0x31,0x19,0xa5,0x98,0x4a,0x76,0x65,0x80,0xe1, - 0x33,0xa9,0x82,0x24,0x1c,0xa6,0xcd,0x25,0x3f,0x64,0x99,0x17,0x09,0xe6,0x76,0xb5, - 0xa0,0x60,0x8d,0x64,0x53,0x2e,0xc7,0xf4,0x05,0xf1,0x3f,0xb4,0x57,0xc5,0x95,0xc5, - 0xfa,0x7f,0xd9,0xcc,0xd0,0x2f,0x31,0x63,0x9c,0xcd,0x2e,0x16,0xc9,0x0a,0x77,0xa1, - 0x20,0xaa,0x88,0x51,0xb4,0x20,0x99,0x94,0x91,0x41,0x94,0x06,0xc4,0x6e,0x00,0x7a, - 0xab,0x0c,0x7d,0xf5,0x1c,0x68,0x4c,0xbb,0x54,0xc5,0x67,0x42,0x5e,0x98,0xca,0x74, - 0xcc,0x0f,0x27,0x98,0x36,0x63,0xbd,0x0f,0x22,0xec,0x9a,0x4e,0xdb,0x1e,0x87,0xf9, - 0x80,0x05,0x58,0xf0,0x05,0xd7,0x6d,0xbb,0x1c,0x8f,0x8a,0x2d,0xd8,0x6a,0x83,0x1e, - 0xea,0x8b,0x22,0x62,0x0c,0x76,0x9f,0xc8,0x29,0x6b,0xa6,0xdf,0xea,0xa5,0x96,0xcc, - 0x72,0xf2,0xd2,0x65,0x1c,0x6c,0x27,0x06,0xbf,0x43,0x52,0xfd,0x4d,0xc1,0x14,0xba, - 0xa7,0xa0,0xc9,0xd8,0x19,0x2d,0x2f,0x24,0xea,0x94,0x17,0x3b,0x85,0x67,0x83,0x54, - 0x10,0xa3,0x9b,0xea,0xb8,0x1f,0xe7,0x16,0x69,0x48,0x98,0xfd,0x25,0xc3,0x91,0xbb, - 0xe8,0x34,0x4b,0x2c,0x0a,0x6f,0x03,0x7c,0x67,0x42,0x5b,0x6c,0xc4,0x2e,0xdb,0x82, - 0x57,0x50,0xba,0x82,0xc7,0x8d,0x1e,0xa8,0x8b,0xf6,0x38,0x3b,0x73,0xb0,0x04,0x27, - 0x42,0x31,0x4b,0xf6,0x70,0x71,0xae,0xaf,0x8d,0xfa,0xa3,0xea,0x29,0x75,0xc5,0x6c, - 0x90,0x14,0x7a,0xa1,0x32,0x31,0x4b,0x3a,0xf0,0x86,0x3a,0xdf,0x2d,0xae,0x75,0x79, - 0xff,0xbe,0xf5,0x17,0x93,0x81,0x2b,0xb7,0x8a,0xd6,0xf6,0xea,0x04,0x8f,0x24,0xc2, - 0x44,0x1b,0x45,0xae,0x45,0xa1,0x94,0x1c,0xa1,0x4f,0x38,0xe6,0x7a,0x18,0x6c,0x2d, - 0x11,0x8e,0x15,0xd4,0xd2,0x8a,0xd8,0x78,0xc6,0x8c,0x8f,0xeb,0x09,0xe1,0xf1,0xbe, - 0x01,0xcd,0x1a,0x31,0x8d,0xf0,0x51,0x87,0x9f,0x5d,0x9d,0x8e,0xd6,0xa2,0x6d,0x28, - 0x81,0x6c,0x4d,0x25,0x73,0x75,0x45,0xf5,0x6e,0x16,0x0e,0xee,0x8d,0x0a,0x11,0x6e, - 0x0c,0x1e,0xdc,0x8d,0x9b,0x3e,0x14,0xee,0xfa,0x0c,0x06,0x2e,0xf8,0x70,0x76,0xbf, - 0x4a,0x3a,0x8a,0x7e,0xbb,0x3a,0xbb,0x20,0xee,0x4f,0x5c,0x55,0x5a,0x0b,0x23,0xc9, - 0xcb,0x29,0xd7,0x10,0x19,0xb2,0x34,0xa6,0x30,0xf1,0xcd,0x52,0x5b,0x38,0x77,0xbe, - 0xeb,0x14,0x4c,0xef,0x1a,0x3d,0x4f,0x27,0x12,0xa0,0xff,0xbf,0x90,0x76,0x47,0xcc, - 0x45,0xf0,0x9d,0xf7,0x09,0x78,0xba,0xcc,0x48,0x9f,0xce,0x61,0x64,0xd1,0x66,0xdf, - 0xaa,0x59,0xb1,0x9b,0xc6,0x8b,0x06,0xd9,0x82,0xf7,0xe4,0x4d,0x0d,0xd2,0x6f,0xab, - 0x2b,0x11,0x7f,0x37,0xaa,0x73,0xc5,0x01,0x3e,0x93,0x00,0xc0,0x11,0x3a,0x67,0x1b, - 0xc0,0x11,0x30,0xa3,0x69,0xe0,0x07,0xfc,0xc9,0xad,0x7b,0x9f,0x04,0xd2,0x58,0x26, - 0xd8,0x31,0x7f,0x06,0xe3,0xa3,0x98,0xa8,0xd0,0x54,0x48,0x2e,0xf3,0xa1,0x3f,0x72, - 0x69,0x2c,0x10,0x3b,0xea,0xe3,0x79,0xf4,0xd7,0xc2,0xc7,0xde,0x61,0xac,0x78,0x9e, - 0x21,0x2b,0xe5,0x9a,0xa7,0xa1,0x94,0x38,0xaf,0xb6,0x6e,0xd8,0x35,0x3d,0x3e,0xf3, - 0xd5,0x98,0x75,0xd3,0x4c,0x5e,0xda,0xc8,0xba,0xc3,0xc2,0x4c,0x58,0x75,0x76,0xe7, - 0x00,0x15,0xb9,0x72,0x10,0x1f,0xef,0x02,0x06,0xdf,0xdf,0x19,0x8f,0x78,0xf8,0xd0, - 0x87,0x06,0xd2,0xa8,0x74,0x5b,0x94,0x9a,0x4b,0x88,0xcf,0x39,0xaa,0x99,0x10,0x30, - 0xa1,0x89,0x0a,0x63,0x6a,0x9f,0x41,0x97,0xce,0x87,0x4a,0x3d,0xd0,0x7d,0x33,0x7d, - 0x24,0x5c,0x7a,0xd3,0xb6,0xb9,0x1b,0x0b,0xd5,0x8a,0x50,0x09,0x42,0xa5,0x37,0x6c, - 0x67,0x87,0x8d,0x75,0xeb,0xf5,0x5a,0xe8,0xca,0x3d,0xfa,0xa3,0x6f,0xfe,0x52,0x18, - 0x15,0x24,0xaa,0x6d,0x99,0x56,0x3e,0x7d,0xcc,0xc7,0xe0,0x07,0x25,0xab,0xf4,0x39, - 0x73,0x5f,0xdd,0x09,0xf7,0xce,0xa3,0xec,0xce,0x3f,0x09,0x56,0xfd,0xa8,0x3c,0xa9, - 0x85,0x3b,0x47,0x84,0x9c,0x0b,0x04,0x69,0x8e,0xc4,0xa3,0x4d,0x7c,0x74,0x42,0xb7, - 0x2c,0x37,0x5d,0xac,0x7d,0x1d,0x10,0x6b,0x4f,0xec,0xa9,0x55,0xd3,0x11,0xb6,0xc2, - 0x82,0x00,0xd0,0xbc,0x7c,0x5d,0xc5,0x0a,0x47,0x15,0x01,0x39,0xa2,0x5b,0xe7,0xb3, - 0x8e,0xcc,0x70,0xcb,0xbf,0x23,0xe3,0xef,0xb1,0x5c,0x16,0x90,0x2b,0xb8,0x8c,0xa4, - 0x6e,0x59,0x7c,0xa0,0xcb,0x78,0x63,0x7f,0x42,0x8e,0x40,0xe5,0xde,0x8f,0x1e,0xa5, - 0x87,0xf5,0x2c,0x52,0x57,0xd0,0x34,0x60,0xe7,0x96,0xac,0x37,0xf6,0xd4,0x76,0x12, - 0x86,0x6a,0x77,0xa4,0x4a,0x39,0x91,0xfc,0x90,0x8d,0xa4,0xa7,0x73,0x3a,0x7f,0x43, - 0x07,0xf7,0xdd,0xf5,0x4b,0xf0,0x82,0x87,0x79,0x2f,0x24,0xc5,0x95,0xd2,0x68,0x0e, - 0x58,0x95,0xcd,0x3c,0x69,0x3e,0x03,0xc6,0xc4,0x11,0x8c,0x77,0xe5,0x7e,0x25,0x46, - 0x26,0xd6,0x48,0xb9,0xf4,0xfa,0x76,0x90,0x55,0x78,0xa3,0xcb,0x9d,0xb0,0x64,0x75, - 0xc6,0x9a,0x56,0x52,0x71,0x0d,0x56,0x22,0x3b,0x2a,0x58,0x89,0xd4,0xf1,0xa5,0x3f, - 0x1b,0x90,0x5e,0x55,0xb6,0xbe,0x8d,0x0b,0x1c,0x9b,0xcf,0x56,0x84,0x59,0x0d,0x92, - 0x2b,0x9a,0xf5,0xd2,0x49,0xd7,0x24,0xa0,0x42,0xbb,0x45,0xd3,0xf1,0x6c,0xfb,0xd8, - 0xa2,0x47,0xde,0xa9,0xe3,0x27,0x24,0x55,0x93,0x55,0xd6,0xad,0x48,0xf7,0x8e,0xe8, - 0x4f,0x9d,0x86,0x1a,0x24,0xb5,0xa9,0x49,0xe9,0x84,0xba,0x3a,0x22,0x60,0x7d,0x8b, - 0xd0,0x35,0x37,0x73,0x34,0x41,0x65,0x54,0x1b,0xa7,0x37,0xae,0x33,0x01,0x51,0x9c, - 0x58,0x94,0xf6,0x51,0x48,0xf4,0xec,0x48,0x61,0xd6,0x9f,0x74,0x21,0x98,0x6c,0xcb, - 0x8d,0x92,0x62,0xca,0x49,0x0c,0x91,0x2a,0x7e,0x91,0xc1,0x6a,0x38,0x34,0xca,0x18, - 0x8c,0x93,0xbe,0xfa,0x5f,0x10,0x27,0xb0,0xc8,0x9c,0x7a,0xfa,0x40,0x52,0x0f,0x09, - 0x2a,0x90,0x27,0x22,0x55,0xff,0x61,0x9b,0x49,0x53,0xef,0xea,0x00,0x9e,0x57,0x7f, - 0x4e,0x30,0xa6,0xbf,0xbb,0x1d,0xc0,0x6b,0xce,0xdd,0x3f,0x03,0xa7,0xbe,0x3a,0xfb, - 0x63,0xcb,0xdd,0x64,0x0a,0x3b,0x77,0x60,0x00,0x90,0x87,0x8e,0xa5,0x6f,0x30,0xe1, - 0xa2,0xe1,0x70,0x72,0x9e,0xa7,0x02,0x0c,0xaa,0x05,0x8e,0x44,0xf6,0x7a,0x16,0x85, - 0xa1,0xdd,0x31,0x63,0xf8,0xab,0xe2,0x35,0x7d,0xc9,0x01,0xcd,0x1d,0x2f,0x3b,0x2f, - 0x22,0x18,0xcb,0x55,0x9b,0xd8,0x23,0x81,0x77,0xec,0x6c,0x53,0x2e,0x68,0xfb,0xa2, - 0xae,0x0b,0xca,0x1a,0x91,0x2a,0x2e,0x48,0x21,0x0b,0xb7,0x9b,0xa7,0xf2,0x70,0x00, - 0x83,0x0a,0xa0,0xb6,0x90,0x28,0xba,0xb7,0x81,0x65,0x74,0x06,0x8d,0x9a,0xd1,0xc3, - 0x0a,0xde,0xa9,0x43,0x11,0x42,0x47,0x49,0xc4,0xd7,0x2a,0xc5,0x3f,0x76,0x89,0xa4, - 0xde,0x01,0x19,0xd7,0x92,0x40,0x51,0x60,0x3f,0x56,0xe3,0xeb,0x24,0x26,0x86,0x56, - 0x85,0x6a,0x06,0x88,0x47,0xb1,0xb6,0x4a,0xb7,0x09,0x13,0xc4,0x95,0x25,0xf5,0xe8, - 0x6e,0xb8,0x80,0x1d,0xba,0x68,0xa1,0x76,0xb0,0x25,0x99,0x3e,0x15,0x72,0xa8,0x8c, - 0x1b,0x35,0xe3,0x4c,0x14,0x27,0xbe,0x56,0x55,0x16,0x3f,0xbf,0x9a,0x62,0xcb,0x79, - 0x7e,0xf6,0xb1,0xf5,0x3d,0x64,0xdf,0xc8,0x6a,0x0b,0x35,0x5b,0x54,0x9d,0x66,0x14, - 0xab,0x05,0xf8,0xae,0x98,0x24,0x92,0xac,0x9f,0xec,0x42,0xe8,0x5f,0x80,0x28,0x28, - 0x08,0xad,0xb2,0x3e,0x58,0xdd,0x38,0x65,0x4a,0x80,0x8e,0x3e,0x20,0x7c,0x40,0x3a, - 0xbf,0x60,0x33,0x2f,0xdb,0x0e,0x42,0x1a,0xfa,0x22,0x8d,0xcd,0x52,0xc5,0x8b,0xa5, - 0x36,0x0b,0xc1,0x7f,0x38,0x29,0xcb,0x1b,0xa3,0x42,0x80,0x4b,0x13,0x95,0xec,0x94, - 0x26,0x58,0xbc,0x6f,0x14,0x36,0x9c,0x74,0x81,0x5f,0xae,0x46,0xdc,0x8d,0x06,0x92, - 0x82,0x50,0xf3,0x76,0x90,0xb9,0x56,0x4b,0xc2,0x57,0x30,0x26,0x27,0x7b,0xa4,0xd1, - 0xa1,0x1d,0x89,0xe2,0x11,0xb8,0x75,0x01,0xbe,0x5f,0xed,0x81,0x19,0x3b,0x33,0xf9, - 0x1e,0xae,0x89,0x77,0xce,0xba,0x4d,0x28,0x00,0x5c,0xdc,0x8e,0xd4,0xd3,0x64,0xb2, - 0x06,0x38,0x7b,0x26,0x16,0x76,0x06,0x56,0x89,0x30,0x60,0x9b,0xd1,0x35,0xcf,0x93, - 0x67,0x31,0x76,0xb4,0x39,0x77,0xcb,0x03,0xe7,0xd8,0x8c,0x29,0x36,0xed,0x44,0x82, - 0xb0,0x3a,0x85,0xc5,0x81,0x33,0x6d,0x1f,0x81,0x91,0x5b,0x35,0xc8,0x75,0x0a,0xd1, - 0x2a,0x57,0xd3,0x9f,0xb5,0xf5,0x0f,0x47,0x08,0x33,0xd1,0x30,0xe2,0xef,0x93,0x67, - 0xc9,0x7b,0x46,0x74,0xb0,0x3e,0x76,0xaa,0x11,0x55,0x0e,0x5d,0xdb,0x38,0xb7,0xe8, - 0xa9,0x06,0xee,0xdd,0x94,0x34,0x9e,0x41,0xb0,0x5f,0xe0,0xba,0x90,0x76,0xfe,0xf6, - 0x25,0x6c,0x8f,0x58,0x19,0xc5,0x77,0x09,0xf6,0x55,0xa8,0x9f,0x98,0xf4,0x55,0x9b, - 0x3b,0x13,0xc5,0x63,0x1a,0x36,0xe8,0x4b,0x8a,0x1b,0xcd,0x8e,0x12,0x1f,0x6a,0x55, - 0xae,0xc0,0x65,0x48,0x15,0xae,0x6e,0xaf,0xbc,0xdc,0xd8,0x29,0x75,0x86,0x4e,0xd8, - 0x22,0x6a,0xb6,0xfb,0xc6,0x32,0xe9,0xf9,0xe6,0x51,0x8a,0x5c,0x11,0x7e,0x47,0xc9, - 0x2e,0x82,0xa7,0x66,0xef,0xe3,0xa8,0xcd,0x65,0x5c,0x82,0x4c,0xd8,0x84,0xf4,0xd9, - 0x22,0x8c,0x5f,0x7d,0xdd,0xfd,0x37,0x86,0xa8,0x3f,0xdf,0x8e,0x96,0x13,0x58,0x1b, - 0xfe,0x46,0x30,0x84,0xea,0xff,0x02,0x0f,0xfb,0x6d,0xb8,0x23,0x52,0x3b,0xf3,0x80, - 0x0d,0x8b,0xd0,0x94,0xeb,0xbe,0x98,0xc1,0xc9,0xcc,0xc7,0xdb,0x57,0xba,0x4e,0x27, - 0x09,0x2f,0x9e,0xe5,0x38,0x5f,0x49,0x8f,0x73,0xb6,0xed,0x03,0x35,0x7d,0xad,0x97, - 0x80,0x58,0x97,0xd7,0x36,0xc6,0xc2,0x14,0x64,0x3c,0x2f,0xdc,0x66,0xa1,0xdb,0x46, - 0x75,0x6a,0xe8,0xe4,0xe3,0xab,0x0f,0x10,0x68,0x5b,0x7c,0x75,0x77,0x6c,0x0e,0x96, - 0x04,0x47,0x88,0x16,0xf9,0x28,0x1b,0x32,0x0b,0x38,0x78,0x1b,0xc1,0xe3,0x5b,0xb9, - 0x77,0xea,0x55,0x38,0x35,0xe7,0x9d,0x1c,0x1c,0x1b,0x46,0xc6,0x22,0xe5,0x33,0xce, - 0xf7,0xc5,0x91,0xd5,0x96,0x60,0x1e,0x8c,0x32,0x51,0xf1,0xd8,0x36,0xe8,0x8a,0x27, - 0x89,0xd9,0x1f,0xec,0x9e,0xa0,0x97,0x2c,0xd8,0xac,0xb5,0xfc,0x63,0x59,0xb0,0x87, - 0x0b,0x32,0xfa,0xe1,0xe6,0xaf,0x5a,0x9a,0x13,0xc4,0xe3,0x3e,0x5b,0x50,0xe3,0x4f, - 0xbd,0xc8,0x1e,0xff,0x94,0xa5,0xf3,0xc6,0xa3,0x8b,0x6a,0x80,0xe7,0xfa,0xf1,0x9f, - 0xd1,0x2e,0xa3,0xe0,0x3c,0xaa,0x71,0xc5,0x6e,0xcd,0xea,0xbd,0xff,0x29,0x71,0xe0, - 0xaf,0x73,0xda,0x9e,0xe9,0xa3,0x89,0x4e,0xc3,0x71,0x92,0x2e,0xe8,0xe1,0x51,0x01, - 0x09,0xc6,0xe2,0xbc,0x9d,0xa5,0x81,0x5e,0x2c,0x6a,0xb0,0x63,0xfc,0xeb,0x19,0x2b, - 0x9e,0x32,0xdb,0x9f,0xc2,0x26,0x94,0x94,0x3f,0x18,0xb9,0x91,0x7d,0xe3,0x68,0x4a, - 0xc4,0x1f,0x99,0x21,0x3c,0xca,0xec,0x88,0x4b,0x42,0xf3,0xd5,0x2a,0xe0,0xa0,0xbd, - 0x15,0xd1,0xae,0x82,0x97,0xf1,0x4c,0x20,0x9a,0x1f,0x0f,0x44,0xd8,0x0d,0x2e,0xed, - 0xff,0x6e,0xbf,0xed,0x94,0x6e,0x66,0x63,0xc6,0xd7,0x2c,0xd4,0x8a,0xf7,0x9a,0xc4, - 0x7e,0x9a,0xff,0x4a,0xc8,0xf0,0x6f,0x8d,0x47,0xb7,0xcd,0x83,0x76,0xa5,0xbd,0x6e, - 0xa5,0xd2,0xf7,0x9d,0xc9,0xf1,0x35,0xdc,0x86,0xf3,0x4c,0x96,0x54,0x9d,0x64,0xb9, - 0x5a,0x3b,0xbe,0xee,0x5e,0xbd,0x6c,0xef,0x05,0xb4,0x92,0x8e,0x75,0x24,0xc8,0xa0, - 0xa9,0x4a,0xba,0x0b,0xcb,0xf1,0x87,0xad,0x24,0x4a,0x27,0xa3,0x71,0x6c,0xc5,0xb1, - 0xd4,0x39,0x9b,0xc1,0xd5,0x73,0xe2,0x1c,0x07,0x05,0x35,0x1f,0xbd,0xb4,0xfd,0x20, - 0x23,0x1a,0x16,0x3a,0xe3,0x02,0xd2,0x31,0x64,0x91,0x87,0x73,0x8c,0x0a,0xfd,0x8b, - 0x4f,0xf9,0xb1,0x2c,0xc9,0xb7,0x4e,0x0a,0x93,0x67,0x51,0x8a,0xf3,0x55,0x7c,0x34, - 0xc6,0xfd,0xbd,0x74,0x9c,0x66,0x2e,0xd8,0xd6,0x22,0x9e,0x54,0x14,0x93,0xb4,0x78, - 0x28,0x17,0xfd,0xe3,0xc0,0xf8,0x57,0xeb,0x13,0xd7,0xfd,0x3c,0xd1,0x71,0x17,0x60, - 0x50,0xf7,0xf5,0x08,0xc1,0xf9,0x3f,0x9f,0xeb,0x19,0xde,0x9b,0x7f,0x0c,0x34,0x64, - 0xc5,0xf8,0x3b,0xf4,0x09,0xfe,0xc1,0xce,0xef,0xd1,0x06,0xe6,0x36,0x15,0x3c,0x51, - 0xc4,0xf9,0x5a,0xbc,0xcc,0xd8,0x56,0xfc,0xee,0xd3,0xc6,0x2e,0x88,0xf2,0xf7,0x38, - 0x2a,0x13,0x39,0x98,0x9a,0xdb,0x5f,0x09,0x6f,0xba,0x67,0x6d,0xf7,0x43,0xd4,0x39, - 0x8b,0x12,0xd7,0x24,0x32,0x42,0x21,0x39,0xed,0x9d,0x4b,0x9d,0xbc,0x20,0x78,0x27, - 0x63,0xf0,0x10,0xc3,0x12,0xd5,0x80,0xa2,0x41,0xa5,0x6d,0xd9,0x93,0xbb,0x30,0x40, - 0x05,0x0e,0x37,0xb4,0xb0,0x81,0xae,0x52,0xcc,0x97,0x34,0x4a,0x30,0x65,0x79,0x83, - 0x89,0xdf,0x85,0x42,0x11,0x2c,0x29,0xdf,0x42,0x4a,0x76,0x21,0xad,0xfd,0x99,0x6e, - 0xd4,0x08,0x0e,0xaa,0x91,0x03,0xb5,0xae,0xc0,0x23,0xfb,0x37,0xd0,0x23,0x3a,0xb0, - 0x0a,0x0b,0xd5,0x4a,0x32,0xa6,0xc7,0x9f,0xa3,0xc7,0x2f,0x9b,0xad,0x9b,0x15,0x71, - 0x7c,0x05,0x58,0x12,0x79,0x49,0xfc,0x0b,0xe0,0x04,0x27,0x8b,0xac,0x9a,0x67,0x0d, - 0x81,0x44,0x45,0xc1,0xa5,0x86,0x81,0x7e,0x46,0xe9,0x2e,0x9a,0x2d,0x99,0xd9,0xd3, - 0x8a,0xda,0x93,0x5d,0x4d,0x3c,0xb1,0x7d,0xc5,0xef,0x26,0x8a,0x2c,0x98,0x86,0xf6, - 0x77,0x28,0x01,0xce,0x9b,0x6e,0xfe,0x2a,0x40,0x24,0xb2,0x39,0xd5,0xe5,0x71,0xe1, - 0x01,0x4b,0xd0,0x25,0x65,0x6b,0xdc,0x53,0x36,0x58,0x61,0x18,0xd6,0x6b,0x3c,0x51, - 0xab,0x6a,0x34,0x29,0x79,0xd5,0x5b,0xcb,0xec,0x08,0x74,0xd2,0x39,0xbc,0x08,0x3e, - 0x7c,0x02,0x93,0x6f,0x38,0xf4,0xc0,0x0f,0xcf,0x03,0x2c,0x3c,0x54,0x67,0x7a,0x98, - 0xf1,0x03,0x68,0xaa,0x3e,0x2f,0x23,0x95,0x2d,0x97,0x2d,0x93,0xa5,0x93,0x40,0x59, - 0xa8,0x4c,0x0a,0x65,0xac,0x6c,0x3a,0x38,0x56,0xc6,0x25,0x83,0xa4,0x92,0x23,0x08, - 0x73,0x03,0xc4,0x5c,0x1f,0x9e,0xd3,0x6d,0xf5,0x3b,0x2c,0x92,0x25,0x91,0x10,0x5a, - 0xf0,0x03,0x0b,0x19,0xc6,0x6d,0xdf,0x9b,0x49,0x47,0x24,0x82,0x24,0x90,0xfe,0x68, - 0xf7,0x5f,0x29,0x6c,0x23,0x72,0xc4,0x84,0x81,0xcf,0x0a,0x4c,0xfa,0xbf,0x0d,0x76, - 0x31,0x5e,0x4a,0x21,0xda,0x55,0xbc,0xc2,0x17,0xfe,0x9e,0x56,0xf6,0x24,0xad,0xbc, - 0xb0,0x5d,0x02,0xad,0x0d,0x70,0x52,0xde,0x98,0xfd,0xf5,0xe5,0x4e,0x7d,0x0c,0x77, - 0x24,0x30,0x4d,0x88,0xe2,0x93,0xb9,0xd3,0x91,0xcc,0x0d,0x37,0xf4,0xc8,0x3c,0xf2, - 0xd9,0x56,0x3b,0x3b,0xcd,0xcb,0x2c,0xef,0x61,0x2f,0x2b,0x1b,0x8d,0x8b,0xc4,0xd6, - 0xc2,0x1a,0x33,0x2b,0xcc,0xca,0xe3,0xe3,0x38,0x5a,0x23,0x0b,0x8c,0x8a,0x1c,0x99, - 0x86,0x10,0x3a,0x3a,0x4d,0xc9,0x51,0xe5,0xd9,0x77,0x2a,0x1a,0x0d,0x89,0x2d,0x75, - 0xa6,0x18,0x32,0x2a,0x4c,0xc8,0x6f,0xc8,0x1c,0xda,0x22,0x0a,0x0c,0x88,0x5f,0x17, - 0x4f,0xde,0x4d,0xa8,0x3e,0xa3,0x29,0x48,0xc3,0xa4,0xcc,0xa8,0xdb,0x7e,0x5e,0x90, - 0x39,0x92,0xd6,0x99,0x3d,0x42,0x51,0xf9,0x88,0xf6,0x87,0x2d,0x32,0xd3,0x97,0x0b, - 0x8a,0x08,0xb0,0x09,0xfe,0xf2,0x2c,0xf6,0xcc,0x18,0x47,0xfd,0xfe,0x8a,0x6e,0x7b, - 0x05,0x90,0xf1,0x22,0xb1,0x5b,0x81,0x51,0x63,0x94,0xd1,0x99,0x18,0xd4,0xf2,0x2a, - 0x2e,0xa7,0x39,0x33,0xc5,0xc3,0x00,0x0a,0x9d,0x1d,0x29,0x13,0x85,0x83,0x46,0xc8, - 0xd6,0xab,0x31,0x23,0xc4,0xc2,0x01,0x51,0x18,0x5d,0x21,0x03,0x84,0x82,0x68,0xb6, - 0x25,0xa8,0x38,0x32,0x45,0xc1,0x8c,0xeb,0x95,0x46,0x28,0x12,0x05,0x81,0xb0,0xfd, - 0x26,0xa2,0x30,0x22,0x44,0xc0,0x9f,0x1c,0xb9,0x1e,0x20,0x02,0x04,0x80,0xa4,0xff, - 0xfb,0xc1,0x0c,0x83,0xb7,0x50,0x0b,0xa6,0x5f,0xa0,0xd8,0x26,0x3f,0x04,0x50,0x16, - 0xec,0xc8,0xf1,0x16,0x97,0x96,0xf9,0x3c,0x41,0xdb,0x58,0x09,0x71,0x8d,0xb1,0x92, - 0xa1,0x29,0x56,0x0b,0x3f,0xe2,0x61,0xbb,0xc8,0x80,0xb5,0x27,0x57,0xec,0x1b,0x23, - 0x46,0x2c,0xc3,0x75,0x66,0xc6,0x99,0xf4,0xc7,0x36,0xe4,0xb0,0x38,0xf8,0xd5,0x22, - 0xb2,0x7e,0x3c,0xde,0x32,0x59,0xf9,0x10,0xe5,0x85,0x0f,0x99,0xa9,0x1b,0xe8,0x2f, - 0xf4,0xc7,0x12,0x72,0x95,0xad,0x6b,0x8f,0x47,0x1e,0x07,0x89,0xa8,0x1a,0xbe,0x01, - 0xf1,0x62,0xf3,0x52,0xa5,0xa3,0x5e,0x1c,0x1f,0xbd,0x0e,0x98,0x29,0x19,0xb5,0x44, - 0x05,0x83,0x55,0x28,0x34,0xe6,0xa9,0x77,0xb0,0xae,0x06,0x88,0x28,0x18,0x82,0x79, - 0xaf,0x0b,0x9a,0xf5,0xe3,0x74,0x36,0x6d,0xce,0xc0,0xd6,0xb8,0x1e,0x4c,0xd1,0x3d, - 0xac,0x76,0x14,0xf6,0x83,0x54,0x1c,0xe5,0x6b,0x8f,0x7a,0xd6,0x0c,0xa8,0x15,0xf8, - 0x00,0x87,0x98,0x51,0x9a,0x93,0x81,0x49,0x27,0xe9,0xaa,0xcd,0x3c,0x55,0xbb,0x69, - 0xbe,0x8e,0x51,0x3b,0x00,0x56,0x8c,0x05,0xe7,0x3e,0x53,0xae,0x3c,0x44,0x6a,0x28, - 0xec,0xd9,0x1d,0xb1,0xe1,0x53,0x5d,0x15,0x97,0xb7,0x0d,0x91,0xa1,0x13,0xfa,0xb2, - 0x85,0x40,0x15,0xa1,0xe0,0x52,0xaa,0x7e,0x38,0xa4,0x05,0x81,0xa0,0x12,0xe7,0xbb, - 0x71,0x81,0x1c,0xb0,0x61,0x51,0x33,0x96,0xbe,0x15,0x0c,0x90,0x21,0x11,0x90,0x28, - 0xbe,0x5b,0x14,0xa0,0x60,0x50,0x1b,0xc4,0x2c,0x42,0x04,0x80,0x20,0x10,0x44,0x60, - 0x00,0x1b,0x64,0x7a,0x6c,0xf1,0x9c,0xaa,0xe1,0x12,0x6f,0x55,0x0b,0xbc,0x6c,0x70, - 0x01,0xd3,0x54,0xe4,0x06,0xe6,0x3c,0x74,0x61,0x90,0x9c,0xe6,0xd4,0x79,0x44,0x61, - 0x08,0x19,0xfc,0x2d,0xd7,0x4d,0x6c,0x39,0x03,0x9e,0xa4,0xe1,0x80,0xf4,0x76,0x42, - 0x03,0x83,0x55,0x7f,0x43,0x38,0x2d,0x8a,0xe7,0xbd,0x9d,0x55,0xd1,0xf5,0x83,0x3d, - 0x02,0x60,0x1b,0x39,0xc9,0x4b,0xaf,0xe0,0x19,0xd7,0x0b,0x19,0x89,0x0b,0x74,0xc6, - 0x39,0x28,0x13,0x29,0xc8,0x4a,0xfc,0x0e,0x4a,0xd3,0x03,0x09,0x88,0x0a,0xc5,0xdd, - 0x2a,0xeb,0x1a,0x38,0x49,0x49,0xa8,0xeb,0x9d,0x7c,0x0a,0x18,0x09,0x09,0x15,0xf4, - 0x27,0x78,0x12,0x28,0x48,0x48,0x75,0x54,0x46,0x28,0x02,0x08,0x08,0x08,0x18,0xff, - 0x0f,0x08,0x59,0x68,0xdd,0xa8,0x6f,0x79,0xc9,0x5e,0xe6,0xab,0x9d,0xf7,0x70,0xce, - 0x2b,0x42,0xf1,0x5c,0x0e,0xf9,0x1e,0x28,0xe5,0xd1,0xee,0xbb,0x1e,0xd9,0x79,0xfe, - 0x53,0xd8,0x5f,0xab,0xcf,0x8c,0x24,0x23,0x49,0x53,0xe7,0x50,0x07,0xfc,0xa1,0x1f, - 0xf2,0x9b,0x17,0x71,0xad,0xf6,0xbf,0x7c,0xc9,0xb7,0xc7,0x9b,0x7f,0x0c,0xf6,0xb8, - 0x1d,0x80,0x19,0x31,0xc1,0x43,0x4c,0x08,0x93,0xd3,0x09,0x11,0x81,0x03,0xc0,0x3c, - 0xaa,0x3e,0x11,0x21,0xc0,0x42,0x44,0x18,0xc3,0x56,0x01,0x01,0x80,0x02,0x9f,0xc3, - 0x09,0x85,0x18,0x30,0x41,0x41,0xe7,0x69,0x80,0x5f,0x08,0x10,0x01,0x01,0xef,0x22, - 0xce,0x12,0x10,0x20,0x40,0x40,0x80,0x19,0xcb,0x9d,0x00,0x00,0xa0,0xea,0x80,0x0d, - 0xba,0x40,0x3b,0xa1,0xe7,0xdd,0x4e,0xb6,0x98,0xeb,0xa8,0xdb,0xa5,0x03,0xbf,0x11, - 0x8c,0x0d,0x33,0xa5,0x1f,0x8e,0x7e,0xc1,0x83,0xc1,0xe6,0xa4,0xa4,0xc2,0x04,0x84, - 0x0f,0x00,0x97,0x95,0x7b,0xa0,0xf7,0x67,0x21,0xed,0x6a,0x5a,0xb8,0xe0,0x61,0x6e, - 0xc2,0x63,0x4d,0x17,0x9f,0x8e,0x67,0xaf,0x2a,0xb5,0x5d,0xc6,0xdf,0x67,0xe8,0xca, - 0xe9,0x90,0x20,0x7b,0x36,0x4a,0x2e,0xe1,0xf7,0xed,0x8b,0x64,0x54,0xf4,0xed,0x44, - 0x84,0x13,0xe0,0x96,0xcf,0x27,0xcd,0xe5,0xaa,0xe4,0x27,0x0a,0x7d,0xba,0x1f,0x5a, - 0x86,0xad,0x81,0x7a,0x9a,0x4a,0xc3,0x81,0xb2,0xe2,0x68,0x1a,0xba,0x6b,0x19,0xcf, - 0x78,0xa3,0x99,0x5d,0xd3,0xdc,0x07,0x93,0xc7,0xc2,0x66,0x45,0x52,0xc8,0x1a,0x05, - 0x6b,0x68,0x50,0x3d,0xb9,0xd7,0x4c,0xb3,0x58,0xe7,0x56,0x5f,0x3e,0xc9,0xf1,0x47, - 0x4a,0x96,0x35,0x2d,0x5b,0x86,0x44,0x0f,0xc8,0xe6,0x4e,0xc2,0xa4,0xc8,0x94,0xf6, - 0x69,0xd9,0xbd,0xbc,0xb6,0xf5,0x70,0xd8,0x2c,0xfe,0xab,0xd2,0x31,0xc9,0xa4,0xdb, - 0x0a,0x4d,0xc9,0x63,0xf3,0x49,0x2d,0xc8,0x29,0x0b,0xd9,0xce,0x9b,0xb6,0xb5,0xb7, - 0xc2,0xdb,0xc2,0x4e,0x1e,0xd7,0xe1,0x8a,0x22,0xce,0x17,0x12,0x38,0x88,0x6c,0xe2, - 0xf8,0x38,0xc9,0x4c,0x64,0x6d,0x9e,0x8b,0x45,0xb8,0x6d,0xfc,0x2c,0x6d,0xb8,0x5a, - 0x70,0xb1,0xc7,0x52,0x94,0x2d,0x2d,0xf9,0x3f,0xed,0xad,0xe1,0x5a,0xfc,0x0a,0x32, - 0x04,0x89,0xeb,0x59,0xe4,0x0f,0x9a,0x06,0xe5,0xe9,0xec,0x4c,0xa8,0x6f,0x96,0x78, - 0x20,0x52,0x84,0xbf,0x54,0xab,0xcb,0xa1,0xbc,0x52,0xcc,0xa1,0x74,0x30,0x34,0x6f, - 0xd4,0x72,0x33,0x7c,0x35,0x5d,0x7a,0x39,0x62,0x31,0x48,0x27,0xd0,0xae,0x06,0xef, - 0x5d,0xb3,0x85,0x01,0xe0,0x6f,0xc8,0xa5,0x5d,0x3c,0x6c,0x9a,0xe6,0x8f,0x22,0xee, - 0x78,0x8c,0x59,0xcb,0x9f,0xef,0x9d,0xb5,0x16,0xfe,0x22,0x84,0x50,0x8c,0xe1,0xd4, - 0xa5,0x02,0x40,0xc0,0x3e,0xc8,0xef,0xf3,0x98,0xe9,0x00,0x1a,0x8f,0xd5,0x8a,0x17, - 0xe1,0x15,0x9c,0x94,0x3f,0x75,0xa1,0x78,0x75,0x15,0x8a,0x78,0x98,0x27,0x15,0x45, - 0xd3,0xbb,0xfb,0x45,0x3f,0x90,0x73,0x5b,0x13,0xfd,0x10,0x16,0xec,0xab,0x45,0x61, - 0x4a,0x76,0xcb,0x6d,0x5a,0x74,0xdd,0xd9,0xf9,0x17,0x5d,0xe5,0xbc,0xda,0x56,0x80, - 0x64,0xa5,0xef,0x67,0x50,0xfa,0xc2,0x08,0xc9,0xf8,0x2d,0x09,0x8f,0x85,0xda,0x62, - 0xc0,0xc8,0xc8,0x6f,0x73,0x9d,0x9a,0xca,0x82,0x0b,0x25,0x0d,0x73,0xd6,0x11,0xeb, - 0x53,0x87,0xf9,0x19,0x4d,0x99,0x49,0x25,0xe0,0x5e,0x81,0x29,0x13,0x38,0x25,0x49, - 0x0a,0x93,0xdb,0x15,0x9b,0x8b,0xa2,0xc9,0xed,0x50,0xdb,0xae,0xc5,0x99,0x5e,0x48, - 0xe2,0x5e,0x96,0xae,0x30,0x97,0xd6,0x71,0x83,0xbe,0x96,0xab,0xb0,0x5f,0x70,0xa6, - 0xe3,0xe0,0xae,0x2d,0x75,0x1d,0x4a,0x8b,0x47,0x54,0xd2,0x8f,0x5d,0x7e,0xe7,0xda, - 0xa0,0x7a,0x81,0x47,0xd1,0xfc,0xbb,0x7b,0xea,0x56,0xdf,0xe8,0xfe,0xde,0x37,0x5d, - 0xfb,0x80,0x91,0x55,0x29,0x94,0x1f,0xea,0xed,0x1b,0xe7,0x7c,0x90,0xdd,0x97,0x26, - 0x22,0xc0,0xde,0x83,0xfd,0xb3,0x98,0xa8,0x94,0x54,0xe6,0xa3,0xbf,0x82,0x9f,0x13, - 0x88,0x8d,0x7e,0xb3,0xe2,0x5c,0xb8,0xf4,0xd7,0xc2,0x47,0x45,0x3b,0x82,0x21,0x27, - 0x0b,0x80,0xb7,0x65,0x6b,0x0f,0x16,0x38,0xaf,0xb6,0x8f,0x8f,0xbc,0xef,0x41,0xe2, - 0x8f,0x67,0xbf,0x87,0x7e,0x21,0xda,0xc8,0xe7,0xd3,0x42,0x48,0xbd,0x61,0x60,0x82, - 0x0a,0xc4,0x47,0xd6,0x7d,0xe6,0x48,0x9c,0xbb,0x65,0x30,0x7e,0xe3,0x19,0xd1,0x95, - 0xc5,0x85,0x8e,0xd3,0x14,0xc5,0x83,0x0d,0x2f,0x47,0x2c,0x88,0xaa,0x64,0xe1,0x85, - 0x32,0x47,0x61,0x34,0x90,0xc8,0x49,0x9c,0x33,0xa5,0xe7,0x05,0x29,0x3b,0x21,0x56, - 0x83,0xc7,0x69,0x46,0x9e,0x0a,0x07,0xf7,0x32,0x64,0xd1,0x84,0xc9,0x3a,0x7c,0x8e, - 0x8d,0x23,0x19,0xbf,0x12,0x07,0x30,0xd7,0x4c,0xcc,0xcc,0xbe,0xa9,0x4b,0x02,0x5c, - 0x0b,0x7c,0xe8,0x9a,0x19,0x89,0x7f,0x9a,0x1d,0x49,0xfe,0x2d,0x1f,0xab,0xe7,0x1c, - 0xe7,0x08,0x67,0xfc,0x96,0x0e,0xb3,0xd6,0xc4,0x3e,0x77,0xdc,0xd2,0x45,0x3a,0xe7, - 0x8d,0x3e,0x58,0x20,0xad,0x70,0xe4,0x3f,0x4d,0x8b,0x13,0xbb,0x34,0xf9,0xc9,0xbb, - 0xb1,0xec,0x36,0x2e,0x56,0x07,0xb6,0x99,0x44,0x82,0xa0,0x79,0xb5,0xbe,0x0b,0xab, - 0xdf,0x8d,0xd0,0xad,0x4d,0x00,0x2a,0x90,0xb4,0x69,0x9c,0x1c,0xa8,0x10,0x3d,0xa4, - 0xac,0xc2,0xa0,0x4e,0x1e,0xce,0xb3,0xcb,0x18,0x71,0x44,0xf7,0x23,0x8d,0x35,0x40, - 0x8b,0x24,0x2b,0x2f,0x9b,0xa6,0x8c,0x04,0x07,0x18,0xed,0x1d,0x20,0x32,0x25,0x71, - 0xee,0x3b,0xa5,0x77,0x3a,0x54,0x7f,0x53,0x2e,0x64,0x07,0x37,0x88,0x32,0x0b,0x63, - 0xc9,0x9d,0x79,0x67,0x3b,0x55,0x6c,0x3a,0x47,0x61,0x86,0x45,0xbf,0x5a,0x42,0x8b, - 0xcf,0x57,0xfb,0x17,0x35,0xb6,0x6b,0x37,0x65,0x76,0x16,0x31,0x28,0x14,0x73,0xa0, - 0x25,0x38,0xf3,0x07,0x34,0x1e,0x6b,0xc0,0x83,0x7b,0xdf,0xb3,0x21,0x25,0x44,0xdb, - 0xee,0xd6,0xa1,0x64,0xb6,0x44,0x52,0x63,0xea,0x79,0x95,0x17,0x30,0xfa,0x52,0xac, - 0x84,0xf0,0x2e,0x56,0x5c,0x57,0xbc,0xea,0x94,0xd1,0xbd,0x7c,0x1c,0xc7,0xc5,0xd0, - 0xac,0xf2,0xbb,0x56,0x24,0x1d,0xce,0xf0,0x1b,0xd9,0xab,0x72,0xfe,0x5d,0x53,0xac, - 0x04,0x35,0xe9,0x26,0xa5,0xa1,0x7a,0xe0,0xe1,0x93,0x85,0xf5,0xab,0x5c,0x14,0x9a, - 0xa9,0x8e,0x74,0xdf,0x56,0xb3,0x60,0x4a,0x3e,0x2d,0x11,0x31,0x97,0x4e,0x70,0x95, - 0x7f,0xd7,0x99,0x3e,0xce,0xfb,0x45,0x3e,0x3d,0x84,0x0c,0x4d,0x91,0x52,0x04,0x91, - 0x74,0x2e,0xe4,0xb0,0xd4,0x65,0x21,0x55,0x14,0xf9,0xe9,0x35,0xf8,0x55,0x4e,0x3b, - 0x7b,0x24,0xac,0xf1,0x40,0x1a,0x80,0x8a,0x4c,0x24,0x89,0xb7,0x16,0x7e,0xa0,0xb9, - 0x2c,0x37,0xb8,0x47,0x1c,0xbf,0x50,0x6b,0xe2,0x71,0xb0,0x64,0x15,0x3e,0x16,0xeb, - 0x29,0x32,0xf8,0x7f,0xc0,0x30,0xc1,0x18,0x71,0x9d,0xa0,0x76,0xed,0x56,0x1f,0xcf, - 0x4e,0x4b,0xe0,0xeb,0x57,0xbc,0xcc,0x09,0x42,0x73,0xbf,0x1e,0xb0,0xde,0xaf,0xa5, - 0xc5,0xbd,0x3b,0x21,0x47,0x1e,0x7f,0xad,0x6c,0xd1,0xba,0x1f,0xdd,0x4f,0xc3,0x3f, - 0x02,0xdb,0xc7,0xea,0xa8,0xd2,0x2e,0x18,0x20,0x4a,0xd8,0x21,0x54,0x80,0x08,0x94, - 0x51,0x5c,0x5c,0x87,0xb0,0xfe,0xe1,0x7b,0xbc,0x7d,0xa6,0x90,0x73,0x6c,0x01,0x3a, - 0xe8,0x99,0x41,0x1d,0x1b,0xdd,0xee,0x53,0xa2,0x74,0x86,0x9e,0x90,0x10,0xb6,0x20, - 0x20,0xfc,0x36,0x24,0x30,0xdc,0xc4,0x30,0x41,0x83,0x1b,0xc9,0x43,0x98,0xe7,0xd1, - 0xeb,0x96,0x7f,0x75,0x58,0x8b,0xf4,0x02,0xa9,0x06,0x8e,0xe0,0x0e,0xcf,0xe4,0xf5, - 0xd6,0x66,0xb6,0xc4,0x70,0x35,0x6b,0x44,0xb2,0x2b,0xfb,0x85,0x5d,0x45,0xf2,0xcc, - 0xb1,0x46,0x87,0x3b,0xf8,0xa4,0xe5,0x03,0x29,0x24,0x94,0x5f,0xb9,0x34,0xe2,0x9b, - 0x38,0x86,0xdf,0xc0,0x78,0xc5,0x3b,0x71,0xc0,0x27,0xf9,0x5d,0xb8,0x25,0xb9,0xad, - 0xff,0xf5,0x39,0xa9,0xef,0xd5,0xcf,0x29,0x7f,0x7e,0xf2,0x2e,0x18,0xb3,0xb1,0xa8, - 0xc5,0xa6,0x31,0xad,0x53,0x86,0xbb,0xa4,0xd1,0xbb,0xd8,0x23,0x13,0xc2,0x11,0x4b, - 0x63,0x78,0x95,0x99,0x73,0xe8,0x4e,0xe9,0x54,0xf8,0xf2,0xd0,0xda,0xbe,0xca,0x1b, - 0xa9,0xa6,0xcd,0x62,0xf1,0x19,0xae,0xa0,0x7d,0x99,0x59,0x26,0xb2,0x89,0x68,0xbb, - 0x44,0xd1,0xf8,0xfd,0x5c,0x83,0xd2,0x7d,0x72,0xe8,0x51,0x9d,0x40,0xf9,0x74,0xfd, - 0x29,0x00,0xec,0xcc,0x97,0x20,0xbc,0x89,0x81,0x6d,0x1e,0x7d,0xdb,0x3f,0x11,0x52, - 0x61,0xcc,0x01,0x5e,0xd0,0x6a,0x12,0xff,0x02,0x7c,0x8d,0xe1,0x6e,0xc5,0x5f,0xf9, - 0xd7,0x1f,0xb5,0xd9,0x37,0x22,0x05,0xeb,0xc3,0xeb,0x85,0xf9,0x87,0xc4,0x47,0xff, - 0x0e,0xb6,0x92,0x46,0xb3,0x76,0xaf,0x11,0x72,0xff,0x5a,0x1f,0x74,0x01,0x34,0x6f, - 0xd4,0x72,0x3b,0x95,0xbc,0x3d,0x22,0x31,0xee,0xd7,0x1e,0x48,0xe3,0x8a,0x3d,0x7f, - 0x5d,0xb3,0x32,0xa1,0x3f,0x30,0x54,0xb2,0xdc,0x70,0xab,0x01,0xd2,0x7f,0xf6,0xee, - 0xc9,0x61,0xe5,0x8a,0xb3,0x87,0x1d,0xf1,0x98,0xf7,0xf5,0xb7,0xb1,0xa8,0x04,0xb3, - 0x52,0x95,0x9a,0x54,0xa0,0x9f,0x6a,0x61,0x42,0x59,0xf2,0x75,0xf6,0xd0,0x29,0x3e, - 0xba,0xe8,0xc8,0x25,0x7d,0x23,0x7f,0xf0,0xab,0x44,0x68,0x96,0x8c,0x00,0x0d,0x3e, - 0x43,0x95,0x83,0x47,0xd9,0xf4,0xd2,0xa7,0x70,0xfd,0x97,0xe2,0x53,0xa9,0x60,0x3c, - 0xab,0x13,0x93,0x5d,0x11,0x33,0x7a,0x00,0x7f,0x97,0x1f,0xdb,0xbd,0x42,0x78,0x05, - 0xdd,0xbb,0xc2,0xf3,0x58,0x3a,0xd4,0xae,0xa0,0xfa,0xf7,0x51,0x7b,0xac,0xda,0x38, - 0x88,0x38,0xeb,0x6f,0x2b,0x3a,0x26,0x47,0xd5,0xbb,0xdd,0x82,0x67,0x62,0xc6,0x7a, - 0xbe,0xb7,0xf9,0x04,0x59,0xb9,0xb3,0xcb,0x1f,0x3f,0xd5,0xb2,0xb2,0xd7,0x5f,0x84, - 0xb9,0x60,0x8e,0x8d,0xc6,0x3b,0xae,0x31,0x51,0x69,0x1f,0xfa,0xd7,0xa7,0xc4,0x25, - 0x22,0x47,0x41,0x3d,0x78,0x2a,0xbe,0x62,0xea,0xec,0x97,0x68,0x22,0x3e,0x09,0xd6, - 0x7d,0x29,0x0c,0xdd,0x50,0xdf,0x5e,0xeb,0x5b,0xe9,0x5d,0xf5,0xb3,0x2f,0x22,0x20, - 0xa9,0x6a,0x99,0x5c,0xb8,0x95,0xff,0x63,0x81,0xca,0xa8,0xd7,0x59,0x3c,0x88,0xf6, - 0xf1,0x4a,0xae,0x2c,0xa9,0x3c,0x01,0xf6,0xa7,0x11,0x7f,0xee,0xe1,0x1b,0x60,0x33, - 0x26,0x7f,0xde,0x8f,0xe1,0x03,0x05,0xbf,0x42,0x50,0x98,0x24,0x3f,0x57,0x3e,0xea, - 0x05,0xc3,0xea,0xe7,0xb6,0xe1,0x00,0xcc,0xb8,0x60,0xe8,0x54,0x11,0x3a,0x1b,0xa6, - 0x73,0x37,0xe0,0xf4,0x86,0x0f,0x5d,0xdc,0xea,0x64,0x35,0xaa,0x3d,0xa1,0x2a,0x7d, - 0x78,0x22,0x9b,0x29,0x36,0x02,0x01,0xcc,0x30,0xa0,0xd8,0xca,0x77,0xe7,0xbd,0x43, - 0x31,0xb2,0x9e,0xc3,0x34,0x72,0xb0,0xfc,0x8e,0xa6,0xb5,0x5c,0x3d,0xb6,0x56,0x6a, - 0x67,0x8f,0x49,0xcf,0x13,0x05,0x42,0x81,0x95,0x61,0xd8,0x6e,0x3c,0xa7,0x3c,0x83, - 0x06,0x56,0x9e,0xdf,0x92,0x66,0x96,0x92,0x1c,0xd6,0x5b,0x96,0xd8,0xa6,0x96,0x21, - 0xe5,0xb1,0xb2,0x95,0x14,0xe1,0xbb,0x45,0x0f,0x25,0x7e,0x86,0xcd,0x72,0x1a,0xf5, - 0xf9,0xeb,0x67,0xfd,0x02,0x75,0xc9,0x55,0x24,0x0a,0xb0,0xd2,0xce,0x13,0x54,0x97, - 0xf8,0x0a,0xec,0x9f,0x9d,0x3d,0x7c,0xc9,0x07,0x34,0xfc,0xcf,0x1b,0x5d,0xd8,0x74, - 0xec,0x86,0xf5,0x83,0x77,0xf8,0x4d,0xbf,0x39,0x69,0xe3,0x31,0x9e,0x1e,0x8d,0xe8, - 0x9b,0x7e,0xed,0x9b,0x99,0xcb,0x2d,0xb2,0x26,0xf9,0xe5,0xaa,0x1c,0xef,0x9b,0x01, - 0xf3,0xb0,0x55,0x6a,0x91,0xae,0xc4,0x9b,0xa6,0xc8,0xac,0xe2,0xcf,0x47,0xcb,0xc6, - 0x97,0x7f,0x82,0x41,0x1d,0x00,0x7b,0x48,0xa4,0x48,0xbe,0x0d,0x55,0x81,0xbe,0x4a, - 0x12,0x3c,0x54,0x4e,0x13,0xa2,0x4d,0x5f,0xa5,0xc1,0x37,0x6b,0x3f,0x41,0x4b,0xc6, - 0xad,0x7f,0x3b,0xff,0x3e,0x8d,0x45,0xfb,0xec,0x4d,0x9d,0xfb,0xdc,0xe5,0x20,0x6e, - 0xbe,0xab,0x84,0x82,0x4b,0xf0,0xf4,0xbb,0x62,0x6f,0x60,0xf8,0xe7,0xcf,0x3f,0xa2, - 0x26,0x6e,0x77,0x96,0xcd,0x70,0x39,0xa1,0x7b,0x95,0x07,0x06,0xad,0x5e,0x6d,0x81, - 0xf0,0x3f,0x02,0x0b,0x48,0xa3,0x06,0x41,0xe2,0x02,0xa7,0xe5,0x1f,0x10,0x17,0x23, - 0x3f,0xcc,0xf6,0x97,0xb3,0x23,0x1b,0x3f,0x69,0x0e,0x7f,0xb5,0xcd,0x5e,0xa7,0xe9, - 0x78,0xd6,0xda,0x46,0x74,0xbd,0x15,0x12,0x6e,0x75,0x4f,0x04,0xda,0x09,0x0a,0xb0, - 0xd0,0x68,0xae,0xb6,0x1d,0x37,0x2a,0x6e,0x8c,0x07,0xba,0x05,0x3d,0x78,0x66,0x00, - 0x59,0xf5,0x20,0x57,0x97,0x77,0xb2,0x10,0xb8,0x5b,0x8d,0x17,0xf2,0x57,0x7b,0xb1, - 0x58,0x4a,0xf5,0x6f,0xd7,0x37,0xc8,0x6a,0x50,0xe2,0xab,0x67,0x1c,0x75,0x0b,0xf5, - 0xb5,0xe3,0x1f,0xf1,0x54,0xb5,0x4e,0x8d,0x91,0xd7,0x66,0x0e,0xdd,0x38,0xed,0x91, - 0x73,0x9d,0xd0,0x13,0x46,0x39,0x40,0x27,0x8c,0x7a,0x9e,0xae,0x0a,0xef,0x23,0x84, - 0xf6,0xce,0xd9,0x17,0x49,0xd9,0x6d,0xaa,0x84,0x28,0x6c,0x25,0x83,0xf5,0xe8,0x3b, - 0xf1,0x99,0x90,0x58,0x77,0xe9,0xfc,0x48,0xbb,0xae,0x60,0x5f,0x29,0x79,0xb2,0x34, - 0xd3,0x3d,0xbe,0x9e,0x55,0xfe,0xb1,0x6e,0x3e,0xf2,0xac,0xea,0x16,0xee,0x38,0x4a, - 0xc4,0x1f,0xb0,0x52,0x1c,0x16,0x85,0x85,0x07,0xd0,0x38,0x0d,0x31,0x50,0x21,0x38, - 0xe4,0x43,0x64,0x3e,0xa4,0x2b,0x88,0x4e,0x24,0xd3,0x89,0x67,0x1f,0x5d,0x49,0x4a, - 0x2b,0x30,0x2b,0xde,0x3f,0x7c,0x80,0x85,0xc1,0x00,0x3b,0x0e,0x5c,0xbf,0x32,0x3e, - 0xa3,0xa1,0xc5,0x15,0x1a,0x24,0x06,0x42,0xbf,0x9d,0x14,0xe3,0xd0,0x40,0x5e,0x99, - 0xea,0x33,0x08,0x74,0x1d,0x61,0x5b,0xc3,0x13,0x9c,0xd2,0xa8,0xdc,0x03,0xc0,0xf2, - 0x96,0xdf,0xe3,0x1c,0x69,0xab,0xc5,0xdf,0x3d,0xe3,0x3d,0xa3,0xcc,0x9f,0x0f,0x90, - 0x01,0x36,0x88,0x99,0x12,0x2d,0x4f,0xbc,0x2a,0x31,0xe7,0x05,0x53,0x55,0x57,0x33, - 0x20,0xa5,0x80,0x41,0x16,0x54,0xc5,0x62,0x52,0x40,0x68,0x9a,0x42,0x29,0x5b,0x61, - 0x7b,0xaa,0xa8,0x14,0x0e,0x2a,0x7e,0x48,0x7f,0x0b,0x07,0x40,0x24,0x62,0x15,0xb2, - 0xee,0xab,0xf0,0xad,0x9e,0x6b,0xd5,0x72,0xe0,0xb7,0xae,0x3f,0x27,0xfa,0x5f,0x22, - 0xa1,0x69,0xa9,0x15,0x86,0xac,0x59,0x73,0x91,0x7c,0x19,0x69,0xc4,0x66,0x3c,0x88, - 0x69,0x88,0x62,0x33,0x3c,0x24,0x2c,0x10,0x20,0xf9,0xda,0x4e,0x7a,0x85,0x89,0xe3, - 0xf0,0x02,0x2e,0x5e,0x9d,0x25,0x5e,0x4b,0x43,0x25,0x1a,0x7a,0x05,0x6f,0x1b,0x0c, - 0x8c,0x3a,0xbb,0x4f,0x3b,0x26,0x6d,0xad,0x29,0xe5,0x91,0xeb,0x84,0x6e,0x82,0xe8, - 0xd3,0x9e,0xe3,0xec,0x1a,0x3b,0x7d,0xbd,0xca,0xe2,0xfe,0xfd,0x78,0x68,0x24,0xe9, - 0x0b,0x8c,0xc6,0xae,0xf3,0x0e,0xa8,0x61,0xe7,0xc5,0x53,0x60,0x69,0x8c,0xfd,0xf9, - 0xd7,0x1c,0xb4,0xd8,0x0b,0x60,0xe6,0x08,0xff,0x46,0xd2,0x78,0xdc,0x3d,0xf4,0xe9, - 0x0a,0x4e,0x9b,0x41,0x8a,0x63,0x1d,0x89,0x8a,0x7c,0x6b,0x2a,0x18,0x2e,0x12,0xbb, - 0x6a,0x40,0xb5,0xd8,0x1b,0xef,0xd8,0xbf,0xc3,0x54,0xcb,0x71,0xc3,0x69,0x47,0xfe, - 0x4a,0x62,0xdc,0x81,0x34,0x60,0xb0,0xc2,0x97,0x35,0xac,0x4a,0xdc,0x7d,0xeb,0x61, - 0x37,0x9f,0x08,0x90,0x25,0x50,0xbc,0xa3,0x7b,0x35,0xcb,0x54,0x31,0xde,0x7b,0x0c, - 0xcb,0x20,0xb0,0xb5,0x80,0x39,0x2d,0x5e,0x28,0x00,0x68,0xe2,0xf6,0xc2,0x33,0x39, - 0xc9,0x1e,0x9f,0x4f,0x90,0x53,0xa6,0xae,0x42,0x11,0x0c,0xb7,0xa8,0x88,0xe3,0x64, - 0x11,0x4b,0x42,0xa2,0x53,0xb4,0xd7,0xe5,0x66,0x24,0xab,0x15,0xd2,0x83,0x4e,0x2c, - 0x2b,0x11,0x45,0x36,0x9f,0xbe,0xdb,0x8d,0xe1,0x5d,0xf8,0x0b,0x77,0xe5,0xfd,0x3e, - 0x80,0xbb,0x9d,0xe5,0x30,0x3e,0x24,0x1c,0xf6,0x14,0x8b,0xee,0xf2,0xdd,0xcd,0x2d, - 0xa3,0xc3,0x49,0x37,0x31,0x1f,0x99,0x93,0xa2,0x47,0xdc,0xf1,0xab,0xaf,0xf9,0xfb, - 0x46,0x7b,0x06,0x80,0x84,0x23,0x15,0x52,0x20,0x8a,0x92,0x50,0x3c,0xc3,0x70,0x14, - 0xdc,0xba,0xcf,0xfa,0xd2,0xf8,0x18,0x21,0x82,0x1d,0x16,0x9c,0xd8,0x66,0xfc,0xf6, - 0xc0,0x48,0x7a,0xeb,0x53,0x0b,0x29,0x35,0xcb,0x1a,0xf7,0x55,0xf8,0x7c,0x4a,0x6a, - 0xb3,0xb6,0xce,0xfb,0x52,0xea,0x39,0x20,0x65,0x56,0x2b,0xdf,0x42,0x1e,0x92,0xb7, - 0x69,0xee,0x62,0xae,0x7b,0xbc,0x2e,0x8a,0x2b,0x5e,0xec,0x6b,0xd6,0x63,0xf6,0x2b, - 0x45,0x0f,0xf6,0x0c,0xd4,0x32,0x2c,0xf9,0x23,0xf6,0x5a,0x0a,0xfb,0x5d,0x39,0x60, - 0x99,0x21,0xbf,0x4f,0xbb,0x5c,0x2f,0x01,0xfa,0x13,0xed,0x6a,0x56,0x76,0xf7,0x2a, - 0x99,0x04,0xf7,0x0d,0x46,0x30,0x1b,0xf8,0x6b,0xcf,0x27,0xf5,0x24,0xf0,0x7e,0x9e, - 0x34,0x2b,0xc0,0x46,0xeb,0xad,0x0e,0x07,0x67,0x22,0x0a,0x36,0xd3,0x70,0x70,0x01, - 0x53,0xc5,0x29,0xa4,0x26,0x2e,0xfd,0x35,0xe4,0x3e,0xd8,0xbd,0x56,0xec,0xe4,0x39, - 0xef,0x10,0xb1,0x65,0x98,0xe2,0x17,0xbb,0x40,0x66,0x91,0x23,0x51,0x72,0x0f,0x8a, - 0x09,0x8e,0x11,0x87,0xb6,0xc3,0x8d,0x51,0x0d,0x91,0xf3,0x8a,0x76,0x18,0xe0,0x4e, - 0xba,0x9f,0xbe,0xc2,0xb4,0x0f,0x0a,0x04,0xa4,0xa4,0xf8,0x2a,0xb7,0xeb,0x29,0x34, - 0xf8,0x86,0x50,0xad,0x64,0xa5,0xf8,0xb4,0x13,0xc3,0xa1,0x7e,0xbe,0xe7,0x9c,0x25, - 0x6d,0x05,0x25,0x73,0xa5,0x66,0xf3,0xa5,0xde,0xc2,0x45,0x97,0xda,0xe9,0xd7,0x43, - 0xf0,0xa7,0x5e,0xd2,0x63,0xe5,0x71,0x1d,0xa4,0xe7,0x01,0xd7,0xc3,0x87,0xdd,0xaf, - 0xc6,0x85,0x22,0x07,0xbf,0x2a,0x92,0x39,0x56,0xac,0xb2,0xd2,0x18,0x53,0xd5,0x64, - 0x23,0x56,0x0d,0x8e,0x3e,0xc9,0x42,0x38,0x03,0x6d,0x32,0x1e,0xfc,0xf6,0xd8,0x74, - 0xe4,0x87,0xfb,0x0a,0x98,0xfa,0x9c,0xc9,0x60,0x37,0xd3,0xd7,0xdc,0xec,0x94,0x2a, - 0xdf,0x24,0x2b,0x13,0x41,0x29,0x78,0x3d,0x05,0xb9,0x0f,0x5d,0x66,0x8e,0x42,0x4e, - 0x79,0x8c,0x22,0x57,0xe2,0x97,0x0a,0xca,0xb1,0x73,0x72,0x62,0xa0,0xa0,0xd0,0x4a, - 0x70,0xad,0xb2,0x5b,0x05,0xc0,0x12,0x7d,0xcc,0xc2,0x6a,0x38,0xa3,0xf6,0xc0,0x6e, - 0x73,0x8d,0xe3,0x46,0x33,0x57,0x1b,0xa9,0x4d,0x8a,0x70,0xeb,0x82,0xd4,0x4b,0x5f, - 0xf0,0x8f,0x70,0xbf,0xbd,0xb4,0x13,0x19,0xe9,0xce,0x04,0x0d,0x38,0xf1,0x74,0xb3, - 0x0e,0x3f,0xe5,0xe0,0xcb,0xd2,0xcb,0x07,0xae,0xdd,0x8c,0x48,0xd8,0xfd,0x6b,0xa8, - 0x4e,0x43,0x12,0x93,0xba,0xb5,0xc3,0xcc,0x4b,0x0e,0xeb,0x56,0x5f,0x5a,0xe5,0x81, - 0xd8,0x39,0x45,0x07,0x49,0xb1,0xce,0xdc,0x8c,0xdf,0x48,0xe0,0xf2,0x42,0xe5,0x62, - 0xbb,0x06,0xa9,0xd0,0x33,0xa3,0x82,0x82,0xb7,0x7c,0x2c,0xb6,0x75,0x62,0x9e,0xa4, - 0xcd,0x37,0xe5,0x36,0x32,0xfb,0x2d,0xea,0xc3,0x5d,0xd4,0xcf,0x97,0x92,0x3c,0xda, - 0x31,0x38,0x6c,0xa5,0x3d,0xbe,0xf9,0xc9,0x8c,0xf7,0xee,0xee,0xe6,0x99,0x64,0xa5, - 0x4d,0x55,0xc5,0x39,0xdd,0xb4,0x77,0x83,0xea,0x96,0x41,0x0d,0xb5,0x16,0xb9,0x73, - 0x06,0x87,0x6b,0xd5,0xcf,0x1c,0x47,0x0c,0x90,0x97,0x29,0xa5,0xb4,0x07,0x78,0x12, - 0xe9,0x3c,0x19,0x2e,0xd9,0xd8,0x75,0xd4,0x06,0xaa,0xef,0x41,0xd9,0x57,0x8a,0xf8, - 0xd2,0xfa,0x4e,0x87,0x0e,0xa6,0x28,0x36,0x86,0x8b,0xea,0x36,0xd8,0x56,0xe4,0x8d, - 0x64,0x28,0x4b,0x8d,0xb4,0xd6,0x49,0x26,0x8f,0x9a,0xe7,0x27,0x59,0x55,0x49,0xf9, - 0x5a,0x66,0x17,0x60,0x9f,0x16,0x05,0x0a,0xf7,0x74,0xac,0x37,0x58,0x54,0x40,0x6b, - 0x52,0x9f,0xa6,0xcb,0xbe,0xad,0x5f,0x94,0xff,0x91,0xfc,0xce,0xef,0x98,0x48,0x7a, - 0x53,0x9e,0x96,0x9e,0xdf,0xc2,0x7b,0x0c,0x92,0x54,0xde,0xff,0x3a,0x32,0xe0,0xc3, - 0x2e,0x9c,0xbe,0xdb,0x1b,0x15,0xe0,0x14,0xba,0x09,0xff,0xff,0x1d,0x34,0xe8,0xca, - 0x67,0x2e,0x5e,0x3d,0x8c,0x3f,0x7b,0x9b,0xab,0x74,0x10,0x8d,0x7f,0x8f,0x04,0x04, - 0x40,0x10,0xb8,0x2c,0xb3,0x8c,0x10,0xdc,0xc1,0x02,0x13,0x62,0x44,0x2c,0x68,0x0d, - 0x88,0x8c,0xce,0x12,0x32,0x61,0xbf,0xb1,0xc1,0x80,0x80,0x04,0x72,0x20,0x41,0x21, - 0x81,0x06,0xf9,0xef,0x79,0x66,0x16,0x1e,0x14,0x40,0x94,0xa1,0x8c,0x4a,0xd2,0x10, - 0x0f,0x0a,0xcf,0x12,0x30,0x30,0x79,0x71,0xdc,0x4e,0x59,0x28,0xdd,0x98,0xef,0x1e, - 0xb7,0xd8,0x44,0xa2,0x36,0x4a,0x0e,0x52,0x46,0x08,0xd4,0x23,0x51,0x6b,0xd8,0x97, - 0x01,0xf0,0xa8,0x14,0xa3,0x28,0x7f,0x81,0xdf,0x05,0xdc,0x33,0xd2,0x6b,0x29,0x83, - 0x04,0xf3,0x81,0x7a,0x9a,0x4a,0x30,0x6f,0x12,0x32,0x41,0xa2,0xd0,0x93,0x4d,0x16, - 0x02,0x09,0xb7,0xd5,0x5b,0x99,0xb1,0xfb,0xe1,0x91,0xe7,0x55,0xf0,0xc7,0x71,0x2f, - 0xf7,0x82,0xfa,0x28,0xa6,0x08,0xfe,0xba,0x40,0x42,0x13,0xa8,0x04,0x91,0x40,0x85, - 0xfe,0x84,0x2e,0x7e,0xf2,0x26,0x1a,0xc5,0x49,0x92,0x61,0xb8,0x05,0x9c,0xd4,0xa9, - 0x61,0x3a,0x02,0x06,0x1c,0x7e,0x54,0xd0,0x48,0xd1,0xa9,0xc2,0x23,0x95,0xef,0x3e, - 0xa8,0x2b,0x3f,0x7f,0xbd,0x21,0x33,0xbd,0x91,0xbe,0xa1,0xc2,0x2e,0x29,0xe1,0xb6, - 0xd6,0xf3,0x86,0x5f,0xcd,0x6e,0x2d,0x95,0x4a,0x42,0xd2,0x9d,0x96,0x4c,0xb1,0x5d, - 0x60,0x72,0x7d,0x63,0x15,0xf8,0xb6,0xf8,0xb7,0x6d,0x6d,0x58,0xd4,0x6f,0x1d,0xa6, - 0xb0,0x0d,0xe5,0x92,0x94,0x68,0x3b,0xef,0x36,0x0f,0xd3,0xaf,0x59,0x28,0x49,0xa8, - 0x34,0x4d,0x0b,0x66,0x91,0xba,0xf7,0x3b,0x48,0x9b,0x6c,0x7c,0x56,0x63,0x2a,0x86, - 0xb1,0x4c,0xfc,0xea,0xe6,0x78,0x54,0x48,0x91,0x5b,0xae,0x57,0xa6,0xdf,0x31,0x4e, - 0xcc,0x15,0xf4,0xfe,0xe3,0x99,0x9c,0x40,0xa7,0x1e,0xe2,0x2e,0x9a,0xb4,0x2b,0x86, - 0x35,0xec,0xfd,0xee,0x6a,0x7a,0x17,0x51,0x08,0x56,0x72,0x54,0x2a,0x62,0xfe,0x60, - 0xa3,0x13,0xf5,0xb1,0x34,0xc6,0x1c,0x57,0xe5,0xa3,0xe3,0x82,0x9a,0xd6,0xb9,0xdc, - 0x00,0x0b,0x54,0x40,0x6e,0x90,0xf0,0x10,0x6a,0x5b,0x44,0xe5,0x52,0x74,0x12,0x3f, - 0x2f,0xbe,0x48,0x50,0x67,0x1b,0x18,0x82,0x4d,0xaa,0xdc,0xf4,0x73,0x75,0x3a,0x30, - 0x1d,0x84,0x85,0xc5,0xb6,0x32,0x95,0xfc,0x5c,0x13,0xd5,0xe5,0xf2,0x76,0xb0,0x71, - 0x81,0x08,0x8d,0xd4,0xb7,0x33,0x35,0x33,0x65,0xa2,0xdd,0xf5,0xf3,0x77,0x58,0x09, - 0x0e,0xb5,0xd8,0x26,0x30,0x3e,0x5b,0x07,0x60,0x98,0x17,0x5f,0x98,0x34,0x8e,0x09, - 0x2b,0xb4,0xf6,0x5a,0x89,0x77,0x26,0x9c,0x6a,0x19,0x35,0x54,0x3d,0x15,0x43,0x18, - 0xa2,0x11,0x8f,0x6a,0xdb,0x1a,0x32,0xaf,0x7c,0x3e,0xf6,0xd6,0x2d,0xe7,0x4b,0xc8, - 0xab,0x10,0x38,0x1f,0xbc,0x5b,0xa1,0x9d,0x57,0x84,0x4b,0xe3,0xd7,0xa7,0x39,0xf6, - 0xdd,0xe9,0x42,0x48,0x6a,0x84,0xc6,0x48,0x76,0xdd,0xd6,0xec,0x7a,0x7c,0xf9,0xfc, - 0xa4,0x1f,0xf7,0x5e,0x3a,0x5f,0x0b,0xc7,0x09,0x1f,0xde,0xfc,0x7b,0x7d,0xb8,0x0b, - 0x29,0x58,0x07,0xc1,0x44,0x3a,0x07,0x69,0xfc,0xeb,0xd7,0xed,0xfa,0x7e,0xf8,0xd8, - 0x26,0x13,0xf7,0x0d,0x54,0x30,0x59,0xad,0x02,0x6e,0xdf,0xfd,0xfb,0x7f,0xa3,0x5d, - 0x47,0x8c,0x22,0x11,0xb7,0x90,0x8f,0x13,0x4e,0x6f,0x33,0xac,0xb5,0x1f,0x20,0xb8, - 0xe4,0xe7,0x53,0x03,0xb8,0x0e,0x46,0xb2,0xc7,0xc9,0x82,0xc9,0xa2,0xa3,0x37,0x61, - 0xa5,0x97,0x1f,0x8e,0xb0,0xd5,0x75,0x5d,0xae,0xc0,0x4a,0xa3,0x88,0xb4,0x9d,0xfd, - 0x64,0xe5,0xd1,0x1e,0x38,0x91,0xb4,0x51,0x85,0xcc,0xb9,0x23,0xf1,0x8d,0x3e,0xad, - 0x4c,0x2f,0xa0,0x62,0x99,0xa6,0x7f,0x7d,0x13,0x86,0x98,0x19,0x74,0xe9,0x17,0xa3, - 0xb8,0xd7,0x80,0xd4,0x16,0x5b,0x81,0x61,0x12,0x81,0xfc,0x6a,0xd4,0xeb,0x9c,0x5b, - 0xa4,0x99,0x56,0x46,0x1b,0xaa,0xf6,0x47,0x3b,0xcf,0xf7,0x7a,0x28,0xe6,0x4a,0xad, - 0x5f,0x78,0xb3,0x4e,0x34,0xa1,0x5f,0x2a,0x4b,0xca,0x19,0x48,0xf3,0x89,0x96,0xe0, - 0xed,0xee,0x32,0x05,0x98,0xfc,0x12,0xe4,0xce,0xc0,0xf2,0x11,0x54,0x84,0x03,0x54, - 0xc4,0xed,0xd2,0xee,0x15,0xcf,0x5a,0x7a,0x58,0x44,0x1d,0xa9,0x36,0x4f,0x97,0x41, - 0x45,0xce,0x07,0x7d,0x12,0x05,0xbe,0xdb,0xc0,0xc5,0x9b,0xed,0x08,0x2c,0x82,0xf9, - 0x21,0x97,0x3b,0x70,0x43,0x04,0x43,0x48,0xc7,0x63,0x3b,0xce,0x1f,0xab,0x3c,0xa5, - 0x34,0x8f,0xea,0xb5,0xbf,0x2b,0x2a,0x6f,0xc1,0xc8,0xb2,0x51,0x56,0x80,0x68,0xab, - 0xb0,0xcf,0xca,0x5a,0x60,0xad,0x2a,0xfb,0x57,0x69,0x1a,0x41,0x7b,0xeb,0x98,0x4e, - 0xe5,0xf1,0xe4,0x5f,0xe1,0x8e,0x77,0x2c,0x48,0xec,0xdb,0xad,0x5d,0xe0,0x35,0xb4, - 0xc5,0x24,0x83,0x9d,0x19,0x5a,0xf0,0x7d,0x07,0x77,0xf3,0xa0,0x3e,0xe0,0xdc,0x00, - 0x25,0xf2,0xfe,0x9b,0x97,0xb6,0xb4,0xc5,0x40,0xe4,0xdd,0x4d,0x9f,0x44,0x14,0xc2, - 0x27,0x9e,0x2c,0x74,0x94,0x3b,0xd8,0x96,0x98,0x65,0x3c,0x70,0xe7,0xf2,0x1d,0xd3, - 0xb4,0x9d,0x2d,0x83,0x15,0x3a,0x95,0xad,0x68,0x5f,0x16,0xbd,0x9f,0x86,0x4d,0xd3, - 0xb8,0x1e,0x56,0x75,0x37,0xfb,0x45,0x81,0x55,0xdc,0x5e,0x4c,0x1c,0x54,0x0c,0xdc, - 0xe0,0x60,0xdc,0x16,0xcb,0xbb,0x36,0x93,0x04,0xdf,0xf4,0xe6,0x76,0xf4,0x32,0x40, - 0x23,0x3a,0xe8,0x34,0xb5,0xbd,0x1e,0xf6,0x66,0xf7,0xfc,0xf6,0x77,0xf5,0x83,0xb1, - 0x4d,0x30,0x85,0x87,0x58,0x3d,0x34,0x90,0xdc,0xba,0xf5,0xe7,0xf6,0xf6,0x8e,0x20, - 0x79,0x3c,0x18,0x35,0x93,0xb1,0xbd,0xf3,0x83,0xd3,0xfd,0xf7,0xf7,0xf7,0x5e,0x08, - 0x2d,0xc0,0x20,0x7e,0x60,0xb7,0x99,0xb0,0xcf,0x5d,0xb8,0x1c,0x5f,0x38,0xea,0xdc, - 0x35,0x22,0xa4,0x9a,0x9e,0xb4,0x0c,0x86,0x9a,0x98,0x9e,0xae,0xc9,0x2e,0x25,0x69, - 0x8e,0xaa,0xc7,0xcb,0xf8,0xb7,0x26,0xf5,0x34,0xd5,0xed,0xf5,0x4b,0x85,0x37,0x63, - 0xad,0x60,0xe5,0x61,0x1e,0xf7,0x11,0x59,0x5e,0xbe,0x0a,0x00,0x20,0x86,0x01,0xc2, - 0xc5,0x0a,0xee,0xf9,0x9f,0x63,0x75,0xd5,0x0c,0x9e,0xf6,0xee,0x7e,0xfc,0x51,0x85, - 0xfb,0x58,0x42,0x40,0xb2,0x4b,0xc9,0x4a,0x69,0x3d,0xfe,0xfe,0x7f,0xfd,0xcc,0xb1, - 0x7b,0x62,0x87,0x8f,0x52,0xb3,0xf3,0xee,0x6e,0x7e,0xf7,0xef,0xfe,0xfe,0xc8,0xec, - 0x44,0x3a,0xe7,0xda,0x30,0xbb,0xaf,0x13,0x4c,0x54,0xff,0xff,0xcd,0x90,0x80,0x00, - 0x55,0x40,0xf8,0x86,0x98,0x71,0x69,0xf0,0x0c,0xc1,0x91,0xfb,0xe7,0x64,0x88,0x89, - 0x17,0x41,0xd2,0xeb,0xb2,0x63,0x32,0xe0,0x1d,0xc9,0x3c,0x53,0x49,0x6e,0x01,0x25, - 0x05,0x02,0xf9,0x87,0x18,0x7a,0x12,0x6b,0x4d,0x21,0xc9,0x2f,0x54,0xf6,0x09,0x0d, - 0x87,0x03,0x9c,0xa7,0x14,0xd6,0x09,0x7b,0x4d,0x4b,0x2d,0xea,0x66,0x67,0x7b,0xae, - 0xa3,0x61,0xd3,0xbe,0xa7,0xf0,0x6b,0xea,0x43,0xe4,0xeb,0x6b,0xf1,0xe0,0x63,0x03, - 0x8f,0x99,0xb0,0x5b,0xb0,0xa0,0xdf,0xa3,0xe0,0x78,0xe6,0x96,0xce,0x5a,0x68,0x12, - 0x06,0x1a,0xb9,0x77,0x4b,0x33,0x2a,0x1f,0x18,0x99,0x7e,0x3b,0x0b,0xf9,0x31,0x76, - 0x12,0xab,0xde,0x0f,0xa1,0x86,0x63,0x2f,0x38,0x06,0x80,0xfd,0x2e,0x96,0xc3,0xac, - 0x2c,0x48,0x42,0x35,0x07,0x2e,0x10,0xda,0x0f,0x4c,0x88,0x27,0xdc,0x3c,0x98,0xbc, - 0x2d,0x49,0x3e,0x0c,0xba,0x6b,0x20,0x3a,0x55,0x69,0x9b,0xe3,0xee,0x6d,0x10,0xfd, - 0x8e,0x0a,0x0b,0xa1,0x79,0x25,0x17,0x7d,0x2f,0xb4,0x37,0x4f,0x74,0xa5,0x8e,0x08, - 0x8f,0x0b,0x98,0xc2,0x45,0xb3,0x9b,0x29,0xd9,0x49,0xd2,0x36,0x5d,0x3f,0xe2,0x02, - 0xdb,0xa0,0xba,0xb7,0xa3,0xd8,0x6d,0x82,0xa1,0x43,0x2d,0x12,0x74,0xb3,0xa1,0x32, - 0x8b,0x73,0x9c,0xbe,0xe8,0x50,0x19,0x86,0xb3,0x42,0x0e,0x86,0xe6,0x0e,0xe7,0x13, - 0x55,0x53,0xbb,0x7f,0xea,0x92,0xe8,0x7b,0xea,0x00,0xec,0xc8,0x21,0xf3,0x6e,0x5f, - 0x1f,0x6b,0x68,0xbf,0x7b,0xf0,0x05,0x9b,0xdb,0xb2,0x26,0xfd,0x14,0x0f,0x04,0x80, - 0x78,0xf8,0x6c,0xbe,0xb2,0x18,0x2c,0xc0,0xd0,0x58,0xa5,0xa6,0xe7,0x74,0xde,0xb0, - 0x26,0xe9,0xec,0xd5,0x75,0x3e,0xe5,0xc2,0xef,0x34,0x48,0xbf,0xf5,0x25,0x4f,0x28, - 0x82,0x11,0x03,0x75,0xf4,0x3d,0x64,0xd3,0x6e,0x37,0x2d,0xa7,0x65,0x76,0x02,0x1d, - 0x24,0xe6,0xed,0xd4,0xf9,0xb8,0x64,0xc3,0x6f,0x36,0x39,0xcf,0x46,0xfe,0xc4,0x72, - 0x62,0x14,0xc4,0xbb,0x4e,0xcb,0x33,0x1b,0x83,0xc2,0xd2,0x6b,0xcb,0x22,0x42,0xd6, - 0x0f,0x13,0x18,0x8f,0xe2,0x56,0x1a,0x56,0xa8,0xd8,0xa7,0x9f,0xe5,0x4a,0x0d,0xfe, - 0x8e,0x77,0x7e,0x60,0x45,0x8a,0x2e,0x9f,0xc0,0xbb,0xdd,0xf0,0x03,0x00,0x49,0xfa, - 0x8c,0xea,0xe6,0x86,0x37,0x54,0xf1,0x6e,0x1c,0xda,0x5a,0x3f,0x52,0xfa,0xc6,0xb1, - 0x37,0xb3,0x01,0x6e,0xba,0x10,0x3f,0xfb,0xec,0x44,0x72,0x8b,0xe9,0xd4,0xfd,0x69, - 0x33,0x19,0x6b,0xeb,0x21,0xf6,0x66,0x9f,0xf8,0xf5,0x3a,0xe6,0xda,0x1c,0x37,0x37, - 0xc3,0x08,0x85,0x6f,0xbc,0x28,0xbe,0xfa,0x64,0x06,0x37,0xe7,0x29,0xd6,0x51,0x50, - 0xbb,0xb0,0x8e,0x42,0x0e,0x3f,0xbf,0xf3,0x7c,0xf7,0xb6,0xee,0x7d,0x67,0x61,0x2a, - 0xca,0x09,0xe8,0xca,0xa4,0x81,0xb5,0x16,0x6c,0x1c,0xfb,0x02,0x9b,0xe0,0x7c,0xf0, - 0xfe,0xa9,0x6e,0x56,0x3a,0xad,0x21,0x8a,0xb9,0xc2,0x9e,0x83,0x07,0x82,0x3f,0x96, - 0x7a,0x11,0x26,0xb7,0x20,0x93,0x4b,0xae,0x0b,0xe8,0x2a,0xc9,0x91,0x71,0x37,0xeb, - 0xdf,0xc0,0xb1,0xdb,0x4e,0x49,0x7f,0xfc,0xed,0x1f,0x64,0x58,0x0c,0xc2,0xe0,0xa6, - 0x22,0xc0,0xc0,0x04,0x4a,0x0d,0x20,0x62,0xc4,0xc6,0x14,0x44,0xf8,0xaf,0xb8,0xb6, - 0x23,0xc1,0x7b,0x92,0x61,0x7d,0x3c,0xb5,0x64,0x56,0xb3,0x34,0xd2,0xe5,0x21,0x97, - 0xcc,0x38,0xaa,0xe5,0x92,0x53,0xa0,0xe4,0x25,0x19,0xb0,0xf8,0x63,0xe6,0x29,0x3a, - 0x85,0x83,0x76,0xba,0x93,0x52,0x8d,0xcc,0x86,0x30,0x40,0x35,0x10,0xe7,0x5a,0xc5, - 0xaa,0xcb,0xd5,0xa4,0xab,0x50,0xe7,0x9d,0xbf,0xa7,0x95,0x26,0x16,0x99,0x43,0x58, - 0xa4,0x78,0x90,0x6a,0xce,0x96,0x30,0x66,0x8c,0xca,0xc6,0x04,0xec,0xba,0x60,0x9c, - 0x3d,0x82,0x99,0x75,0x4b,0x0a,0x0e,0x23,0x8a,0xd0,0x94,0x88,0x8a,0xf8,0x71,0x52, - 0xd3,0x5f,0x12,0x25,0xe5,0x38,0x81,0x57,0x4a,0xd1,0x69,0x9f,0xc5,0x1a,0x22,0x0a, - 0x0c,0xc8,0xe8,0xff,0xae,0x38,0x62,0x59,0x54,0x42,0xd8,0x2c,0x65,0xec,0x2a,0x1a, - 0x0d,0xc9,0x52,0xee,0x15,0xa6,0x8e,0x5a,0x45,0x19,0xfa,0x3c,0xb9,0xed,0x23,0x27, - 0x8c,0x8a,0x4b,0x25,0x1e,0xa2,0xf4,0xd5,0x2d,0xac,0x4b,0x2d,0xf2,0xee,0x2b,0x87, - 0x8d,0x8b,0x03,0x21,0x1a,0xde,0x94,0xeb,0x4c,0x6a,0x02,0x3d,0x4b,0xef,0x7a,0x0d, - 0x9e,0x83,0x5b,0x7c,0x66,0x70,0x0d,0x77,0x85,0xc3,0x65,0x91,0xab,0x8f,0x68,0x5a, - 0x0c,0xba,0xb9,0xa4,0x3b,0x06,0x41,0xda,0xa2,0xfd,0xc1,0xdb,0xac,0xd1,0x5c,0x7b, - 0x8a,0x09,0xb5,0xad,0x65,0x23,0xca,0x4f,0x4b,0x60,0x08,0x14,0xf0,0x51,0x15,0x5d, - 0x32,0x0e,0x93,0x57,0xf4,0xeb,0x8b,0xa8,0x2e,0xa3,0x2f,0x34,0xdd,0x01,0x01,0x82, - 0x4f,0xb4,0x2e,0xf1,0x2c,0xff,0x90,0xec,0xbb,0xed,0x9f,0xf5,0xf8,0x6c,0xac,0x92, - 0x94,0x1c,0x7f,0x9c,0xb1,0x25,0x63,0xfa,0x1a,0xf1,0x9c,0xaf,0xed,0xb5,0xda,0x87, - 0xa4,0xf7,0xa4,0x58,0x03,0xb6,0xde,0xd4,0x64,0x05,0x5a,0xcc,0x23,0x1f,0xc9,0xb4, - 0x16,0x1e,0x09,0xe0,0xad,0xbc,0xfd,0x82,0x1d,0x9d,0x1c,0xb0,0x14,0x95,0xf4,0x78, - 0x26,0xe4,0x1f,0xbd,0xa0,0x0b,0x68,0x42,0xad,0x34,0x20,0x1d,0xa7,0x97,0x4b,0x30, - 0xe7,0x6a,0x82,0x34,0xf0,0x38,0x46,0x6c,0x90,0x94,0xbc,0x21,0x3b,0x83,0x96,0xc3, - 0x9e,0x6b,0xde,0x4c,0x45,0x46,0xd9,0x91,0x38,0x29,0xde,0xad,0xd8,0xea,0x5a,0x31, - 0x83,0x1a,0x46,0x38,0x56,0x0b,0x44,0xec,0x44,0x52,0xc6,0x79,0x46,0xc1,0xc2,0xad, - 0x2d,0xf8,0x12,0x51,0x8b,0xbc,0xb6,0xd8,0xee,0xdc,0x02,0x58,0x6c,0x06,0x2f,0x45, - 0xce,0x9d,0xaf,0x41,0x8a,0xbd,0xb2,0x4a,0x92,0xd6,0xc6,0xc5,0xc2,0xb8,0xdd,0x89, - 0xa4,0xd5,0x77,0xe8,0xa4,0x75,0x3b,0x49,0x6e,0xde,0xca,0xd5,0x4b,0xcf,0x3a,0xe9, - 0x23,0xfe,0xf6,0xf8,0xa5,0xf4,0x05,0x9c,0x4e,0xbe,0x9a,0xb9,0x69,0x9f,0x4d,0x20, - 0x45,0x93,0x1f,0xbc,0xef,0x83,0x5d,0xe5,0xcd,0x59,0xfe,0xe2,0x87,0x8a,0xd5,0x7f, - 0xd8,0x00,0xee,0x9d,0x85,0xbd,0x06,0xc8,0x1f,0x42,0xc7,0x75,0xcc,0x0d,0x66,0xb4, - 0xd2,0x61,0xd6,0xc9,0x9a,0xa9,0x64,0x11,0x57,0x0a,0x88,0x95,0x68,0x61,0xbb,0x21, - 0x5a,0x29,0xa2,0x71,0xbf,0x0e,0xde,0x19,0x16,0x5a,0x91,0x1d,0x68,0x72,0x2f,0xef, - 0xe1,0x9c,0xe2,0x44,0x11,0x40,0x68,0x07,0x89,0x24,0x54,0xf4,0x0e,0xcf,0x98,0x7f, - 0xdf,0xae,0xa8,0xc4,0xb0,0x3a,0x31,0x63,0xc5,0x5d,0xa6,0x54,0xde,0xc7,0xf8,0x73, - 0x11,0x3d,0xdf,0xf4,0x91,0x24,0x3f,0xc3,0x09,0x26,0xda,0x05,0xda,0x40,0x71,0x7f, - 0x57,0x4b,0xab,0xe3,0x13,0x27,0x89,0x03,0xa9,0x07,0x85,0x75,0x91,0xb6,0xbc,0xc2, - 0x82,0x3c,0xa0,0xe4,0x0a,0x89,0x68,0xc5,0xc4,0xa4,0x9d,0xe6,0x70,0x04,0x41,0x32, - 0xf8,0xd8,0xcf,0xd6,0x31,0xd5,0x78,0xd4,0xe2,0xea,0x4b,0x01,0x71,0x85,0x79,0xbf, - 0x00,0x02,0xd0,0xa7,0xb0,0x56,0x01,0x74,0xfc,0x40,0x8b,0x64,0x71,0x24,0x10,0x6d, - 0x24,0xba,0xf7,0x7c,0x30,0x21,0x48,0x56,0x62,0xe8,0x5d,0xf1,0xc5,0x7f,0x7a,0x63, - 0xd2,0x40,0x4e,0x6e,0x2b,0x0c,0x6c,0x2e,0xa1,0x47,0x8a,0x2e,0x5c,0xbd,0x72,0x3c, - 0xb8,0x00,0xff,0xe5,0x11,0x52,0x8a,0x7e,0x71,0xc4,0x1b,0x4f,0x0a,0x07,0x7b,0x63, - 0x5a,0xa2,0x79,0xe5,0x4b,0xb1,0x45,0x2e,0x23,0x2e,0x8f,0x33,0x8b,0x6e,0x8c,0x63, - 0x04,0x69,0x8f,0xf1,0x19,0x10,0x42,0x75,0x6e,0x07,0xf9,0x30,0xd8,0x0b,0x43,0xae, - 0x88,0x08,0x92,0x55,0xfb,0x23,0x47,0xea,0xca,0x17,0xe8,0x93,0x5c,0xbd,0x6a,0x14, - 0xaa,0xb2,0xdf,0xde,0x39,0x9d,0xee,0x1a,0x78,0xd6,0x6d,0xf8,0x2f,0x22,0xce,0x2b, - 0x7d,0x08,0xe3,0x44,0x52,0x3f,0x6b,0x81,0xfd,0x81,0x3a,0x2b,0xd2,0x20,0xf0,0xb1, - 0xa1,0x40,0x91,0x5c,0x38,0x34,0xa1,0x91,0xfc,0x82,0xbb,0xc3,0xdb,0xb2,0x3e,0x07, - 0xd3,0x9b,0x43,0x77,0x11,0x55,0x34,0xe9,0xc1,0x56,0x6a,0xd7,0x53,0xd4,0x8c,0x17, - 0xd6,0x9a,0x90,0xb3,0x90,0xbb,0x3c,0xfc,0xc0,0x57,0xe4,0x51,0x9a,0xfa,0x01,0x06, - 0x5b,0x99,0xbd,0x55,0xee,0x9d,0x31,0xf4,0x43,0x54,0xc9,0x47,0x10,0xd6,0x89,0x16, - 0x5e,0x52,0x0a,0x7d,0xce,0xfc,0x39,0xf9,0x42,0x55,0x93,0x50,0xd0,0x03,0x24,0x6b, - 0x24,0x19,0x10,0x94,0xb2,0xcb,0xbc,0xc9,0xe0,0x50,0xb4,0xa4,0x67,0xf6,0x34,0xa2, - 0xc8,0xaf,0x18,0x71,0x70,0x39,0x7c,0x85,0xc2,0xea,0xdc,0x09,0x73,0xae,0x47,0x43, - 0x18,0x34,0x9c,0xcd,0x17,0xba,0x4c,0x83,0x15,0x50,0xad,0x1c,0xd2,0xed,0x33,0x8c, - 0x48,0xdc,0x42,0x2a,0x5a,0xaf,0xe6,0x02,0x87,0xea,0xf5,0x71,0xad,0x75,0x3d,0x6a, - 0x84,0xa5,0xbc,0x7f,0x67,0x3e,0x36,0xe5,0xc9,0x5e,0x7a,0xdf,0x1b,0xfe,0xba,0xe7, - 0x8a,0x58,0x6e,0x1d,0x95,0x34,0x3a,0x45,0x38,0x22,0x1a,0xfc,0x35,0x82,0x7f,0xae, - 0x5d,0x15,0xa7,0xe9,0x19,0x59,0x33,0xe0,0x4b,0x81,0x97,0xde,0xd7,0xfc,0x3e,0x9f, - 0x61,0x7f,0x3f,0xee,0x3f,0x4b,0x45,0xcb,0x12,0x19,0x1b,0x39,0xe7,0x37,0x26,0xca, - 0x6d,0x11,0xd0,0xae,0x67,0xc3,0x28,0xdd,0x4a,0x6d,0x69,0xb0,0x5b,0x2e,0x30,0x04, - 0xc0,0xa5,0x35,0x8e,0x15,0xb7,0x3e,0xfa,0x02,0x50,0xa5,0x1e,0xf9,0x8a,0x0d,0xd4, - 0xca,0xbe,0x77,0xd9,0x5b,0x5d,0x50,0x6d,0x96,0xac,0xb7,0xac,0x17,0xf5,0x75,0x31, - 0xe3,0x50,0xf7,0x80,0x50,0x07,0x21,0xd1,0x47,0x52,0x64,0x0d,0x3d,0x70,0x5b,0x79, - 0x0a,0x3f,0xce,0xfa,0x14,0x5b,0x24,0xe4,0x1c,0xd2,0xee,0xfe,0x48,0x4d,0xec,0xed, - 0x96,0xae,0xf1,0x0a,0x66,0x76,0x69,0xdf,0x01,0x7a,0x9e,0xee,0xf6,0x65,0x9a,0x86, - 0x73,0x7f,0xa8,0x83,0x90,0x93,0xc9,0xdf,0x72,0x39,0xa9,0x16,0x87,0x60,0xb9,0x79, - 0xa4,0x73,0xf6,0xe9,0xaa,0x83,0xc6,0xb7,0xb1,0xa4,0xe0,0xdf,0x32,0x4e,0x5f,0x4a, - 0xa1,0xc8,0x62,0x35,0x26,0xeb,0x8f,0x11,0x76,0xa8,0x88,0x41,0xab,0xeb,0x7a,0x64, - 0x85,0x81,0x10,0xaa,0x97,0x5e,0x6d,0xed,0x46,0x07,0xf8,0x09,0x09,0xee,0xd6,0x05, - 0x80,0xc4,0xb8,0x52,0x7f,0x97,0x96,0x23,0xd8,0x6b,0x61,0x9a,0xf0,0x3d,0x1f,0x31, - 0x05,0xb0,0x74,0xaf,0x17,0x1c,0x20,0x8b,0x22,0x38,0xfd,0xeb,0x2a,0x3f,0x9d,0x4d, - 0x22,0x77,0x7b,0x0c,0x27,0x4f,0x08,0xc2,0xc8,0x07,0xaa,0x1f,0x75,0x47,0xfe,0xe1, - 0xfc,0xea,0x6a,0x1a,0x25,0xaf,0x1a,0x72,0xec,0xcf,0xe6,0xba,0x29,0xc5,0x98,0xae, - 0x7b,0x37,0x78,0x0f,0xe3,0xab,0x6d,0x4e,0xc0,0xcc,0xeb,0xdc,0xc3,0x1e,0x50,0xd1, - 0x26,0xca,0x8b,0x7b,0x3c,0x21,0x1f,0x6f,0x6e,0xcd,0x81,0xc0,0xdb,0xba,0xa2,0xa8, - 0xaf,0x73,0xf9,0xca,0x7a,0x35,0x4c,0x42,0xc1,0x3a,0xaa,0x99,0xdc,0x1b,0x20,0xa7, - 0xac,0x86,0x78,0x67,0x19,0x7f,0x9d,0xba,0x03,0x8f,0x4e,0x9c,0xdd,0xe5,0xb7,0xcd, - 0xce,0x73,0x23,0xcb,0x92,0xec,0x3b,0x73,0x27,0xff,0x48,0x9f,0x7d,0xe1,0xef,0xab, - 0x70,0x80,0x1f,0x79,0x95,0x22,0xe9,0x15,0xcc,0x8f,0x76,0x8f,0xdb,0xe0,0x5c,0x40, - 0xa8,0x9e,0xfd,0x7f,0x53,0x90,0xa7,0x05,0x62,0x01,0x90,0x11,0xf6,0xf4,0xec,0x82, - 0x0a,0xd3,0xb0,0xa7,0x14,0x1e,0x04,0x37,0x6b,0x5b,0xc4,0xc5,0x5e,0xee,0x85,0x07, - 0xe4,0xf9,0xb5,0x8a,0xac,0x1f,0xe5,0x21,0x64,0x6a,0xbf,0xc5,0xb5,0xe2,0x2f,0x76, - 0xa3,0x13,0xb5,0xe5,0x5e,0x9a,0xea,0x36,0x63,0x61,0x87,0x5e,0x8b,0x9c,0x5a,0x1e, - 0x4d,0x9b,0x39,0xc7,0xce,0x5e,0x0a,0xcb,0x19,0x5d,0x40,0x04,0x09,0x94,0x14,0x56, - 0x57,0xb3,0x4a,0x3e,0x48,0x78,0xd6,0x70,0xe7,0x6c,0xf0,0xf1,0xd6,0x7d,0xb2,0xf1, - 0x59,0x43,0x52,0x1f,0xb0,0x87,0xae,0xe3,0xe0,0x47,0x35,0x6a,0x73,0xf0,0x0d,0x93, - 0x49,0x1c,0x10,0xf7,0xab,0x57,0x45,0x23,0xbb,0xd1,0xf9,0x15,0xf1,0x46,0xfa,0xf8, - 0x03,0x15,0xff,0x8c,0x5b,0x98,0x6f,0xfb,0x0f,0xf8,0x8f,0x9f,0xdd,0xca,0x00,0x78, - 0xe4,0xfd,0xd0,0x4b,0xbf,0xbd,0x06,0x8b,0xcc,0x78,0x84,0x57,0x74,0x96,0xc3,0xac, - 0x65,0xfe,0xfe,0x72,0x59,0x45,0xcf,0x29,0x6c,0xd0,0x4b,0xdc,0xdf,0xe5,0x06,0xc8, - 0x29,0x87,0x34,0xfd,0x4a,0xd9,0x07,0x48,0x86,0xb5,0x86,0x8e,0x5c,0xc9,0x62,0x28, - 0xac,0x94,0xc0,0x13,0x27,0x31,0x26,0x67,0xcd,0x78,0x3b,0x6c,0x7d,0x1a,0xdf,0x58, - 0x0d,0xfd,0x21,0x97,0xc7,0x27,0xb4,0xc5,0x03,0x08,0x09,0x80,0x1c,0x58,0x92,0xb9, - 0x0d,0xd2,0x98,0xcd,0xf6,0x1a,0xe5,0x3a,0x26,0x3f,0xad,0xc1,0x5d,0xf8,0x17,0x59, - 0x2f,0x24,0x58,0x07,0xb9,0x8e,0xed,0x7f,0xd3,0xba,0x87,0xd8,0x5c,0xbe,0x3a,0xf3, - 0x62,0xaf,0x2b,0x22,0xfd,0x42,0x82,0x0f,0x7f,0x08,0xc0,0x37,0x2c,0x43,0x56,0xa5, - 0x31,0xae,0x77,0x53,0xd3,0x29,0xc7,0xb0,0x36,0x44,0xc8,0xc7,0x7b,0xce,0x57,0xf0, - 0xe6,0xc7,0x2a,0x80,0x03,0x3d,0xc8,0x21,0x21,0xfd,0x85,0xca,0x31,0xcd,0x9b,0x62, - 0xe5,0x6f,0x81,0x11,0xee,0xd0,0xd9,0x19,0x2e,0xce,0x0f,0x46,0xbd,0x0f,0x97,0x7b, - 0x28,0x91,0x12,0xc0,0x7a,0x99,0xc2,0xe4,0x54,0x27,0xaf,0x16,0x7c,0xfb,0x72,0xa3, - 0x25,0xaa,0xb0,0x16,0x9f,0x29,0x63,0x00,0xc3,0x5a,0xe6,0xac,0xc7,0x6a,0x11,0xc5, - 0x96,0x39,0x51,0x07,0x33,0x2a,0xbd,0x12,0xa8,0xf0,0x88,0x90,0x37,0x39,0x9d,0xaa, - 0x7a,0x78,0x69,0x17,0x10,0x8c,0x67,0xc1,0xa2,0x43,0xeb,0x8a,0x27,0x68,0x64,0xe8, - 0x09,0x48,0xb8,0xf2,0x73,0x19,0x6c,0x1d,0xa1,0xa9,0xf4,0xcd,0x5b,0x88,0x75,0xe0, - 0x09,0x72,0xf4,0x29,0xf0,0xc8,0x99,0xbc,0x5f,0x1b,0x0c,0x3e,0xfe,0xdc,0x0f,0x5a, - 0x61,0x21,0x7c,0x10,0x61,0xaa,0xbf,0xba,0xe3,0x40,0x53,0xa4,0x41,0xca,0x9a,0xe8, - 0xf3,0x9a,0x67,0x82,0x9a,0xaa,0x09,0xb8,0xcf,0x79,0xc7,0xb9,0xc3,0x94,0x96,0xdb, - 0xab,0x53,0xaa,0xcc,0xf3,0x76,0x33,0x28,0x04,0x57,0x12,0x68,0x07,0xb8,0x10,0x5a, - 0xb8,0x54,0xd6,0x92,0x28,0x3d,0xb6,0x0b,0x65,0xbb,0xdb,0x1a,0x78,0xcd,0xef,0x26, - 0x40,0x25,0xd9,0x4c,0xbb,0x6e,0x71,0x1f,0xc4,0xb1,0x9f,0x72,0xdd,0x75,0x2a,0x99, - 0xb7,0x72,0x73,0xbd,0x99,0xda,0x01,0x7b,0x78,0xe6,0xfd,0x1d,0x9a,0x6b,0x04,0x79, - 0x21,0x52,0x82,0xb1,0xb0,0xfe,0x40,0x53,0x5c,0xfd,0xac,0x37,0x04,0x7a,0x72,0xb8, - 0xc0,0xbe,0xd8,0x67,0x01,0x9e,0xb0,0xc3,0x4b,0xa7,0xc5,0xa6,0x94,0x1d,0x85,0x37, - 0x5d,0x92,0xbf,0x76,0x92,0x9d,0x45,0x1d,0x0b,0x03,0xc5,0x21,0xe6,0x93,0x18,0x82, - 0x91,0xf2,0x1b,0xe6,0xdd,0x5f,0x63,0x88,0x08,0x50,0x59,0x4e,0x7c,0x8e,0x25,0x80, - 0x62,0xc0,0x74,0x45,0xd3,0x57,0x86,0xf1,0x06,0x74,0x9f,0x06,0x92,0x8b,0x6c,0x82, - 0x25,0x27,0xcd,0xb2,0xf2,0x56,0x64,0x37,0xa1,0x49,0xe7,0x67,0xd0,0xaa,0x95,0xde, - 0x8c,0xa6,0xcf,0xc7,0x4d,0x2d,0x52,0x63,0x54,0x7f,0x79,0x9e,0x2c,0x89,0x3a,0xa3, - 0x00,0x0c,0x19,0x05,0x32,0xcf,0x55,0xdd,0x02,0x58,0x60,0xc4,0xac,0xc8,0x38,0xbd, - 0xa7,0x9e,0xe0,0x6d,0x3b,0xaa,0xf5,0x5b,0x18,0x5b,0xf1,0x5c,0xf8,0x67,0x98,0x1d, - 0xc2,0xf8,0x22,0x0f,0x01,0x31,0x0d,0x4b,0x11,0xf4,0xa0,0x80,0xda,0x1c,0x07,0xc9, - 0xb0,0xb7,0x47,0x01,0xae,0xc5,0xa9,0xb8,0x09,0xf5,0x0c,0x27,0xfb,0xc8,0x09,0xb0, - 0x29,0x14,0x08,0xee,0x81,0xba,0x8e,0x19,0x04,0xfb,0xa1,0x80,0x5a,0x17,0x64,0xbe, - 0xd5,0xa3,0x39,0xbf,0x6b,0x9d,0x36,0x46,0x0b,0x51,0xec,0x49,0x89,0x3e,0x9a,0x43, - 0x48,0x19,0x4c,0xae,0x15,0xe2,0x3e,0x56,0x46,0x50,0x79,0x2c,0x92,0x27,0x1c,0xc9, - 0x25,0xb3,0xff,0x90,0x45,0x7b,0xac,0xce,0x4b,0xa1,0x57,0xb0,0x2e,0x14,0x36,0xa8, - 0x8d,0x09,0xe5,0x78,0xf8,0x32,0xc8,0x06,0x69,0x08,0xad,0xfc,0xb3,0xd4,0x97,0xb7, - 0xf0,0x43,0xfa,0x86,0x12,0x92,0xca,0x32,0xe7,0x60,0x96,0x86,0x20,0x44,0x6d,0xa9, - 0xa4,0x8a,0x68,0x9f,0xf6,0x10,0x02,0xa1,0x3d,0x6e,0xe8,0x41,0x49,0x8d,0xe1,0x36, - 0xe1,0xc0,0xdb,0xfc,0xf7,0x52,0xa7,0x21,0x79,0xae,0xe5,0x1a,0x3d,0x33,0xa9,0x32, - 0x41,0x28,0xd6,0xe7,0x9f,0xe1,0x6d,0x41,0x0f,0x52,0x83,0xa4,0xa9,0x4c,0x76,0x20, - 0xf9,0xd9,0xf8,0xc2,0x66,0xfe,0xa0,0xe8,0x47,0x04,0x74,0x75,0x7f,0x6c,0xff,0xa1, - 0x83,0x28,0x28,0x7b,0xba,0x51,0x7c,0x90,0x8f,0x86,0x07,0x89,0xb6,0x66,0xb5,0xbd, - 0x6f,0x65,0x46,0x1b,0x6a,0x8f,0xb1,0xea,0x3c,0x4d,0xa8,0x8f,0x33,0x67,0xbb,0xef, - 0x6c,0xe3,0xa1,0x55,0xc3,0x52,0x2b,0x60,0xe9,0x64,0x06,0x89,0x2f,0x7d,0xf1,0x0a, - 0xc4,0xa3,0xe7,0xfc,0x64,0x07,0x4c,0x8a,0xa7,0x19,0x25,0x5c,0x96,0x39,0x39,0x9e, - 0x19,0xb6,0x2c,0x20,0x2d,0x04,0xcb,0x4a,0xec,0x16,0x4b,0x5b,0xfc,0x4f,0xf4,0x30, - 0xf4,0x1f,0xb2,0xc8,0x4a,0xa2,0x15,0x8a,0xb0,0xcc,0xcd,0x13,0x51,0xec,0xeb,0x97, - 0xe1,0x10,0x3d,0x8f,0x76,0x9a,0x8f,0x59,0x32,0x6a,0x2c,0xbd,0x6b,0xa2,0x5a,0xb4, - 0xa2,0x81,0xfe,0xca,0x6e,0xf6,0x4c,0x8b,0x25,0xc3,0xa9,0x6e,0x58,0xac,0x54,0xfe, - 0x6e,0x89,0x2a,0x73,0xb2,0x59,0x6c,0xcf,0xa4,0x2e,0x85,0x04,0x29,0x72,0x9c,0x8c, - 0x44,0xed,0x44,0x8f,0x62,0xa7,0xf3,0x59,0x3a,0xc1,0x7c,0x10,0xb6,0x66,0x12,0x25, - 0xee,0x8b,0x60,0xdb,0xfb,0x1e,0xc0,0xca,0xa9,0x60,0x42,0x4e,0x7e,0x4b,0xe4,0x0e, - 0x52,0x65,0x24,0x78,0xc9,0xde,0x0e,0x51,0x50,0x7f,0xd4,0x08,0x1d,0xfd,0xba,0xa0, - 0xcc,0xba,0xe9,0xdd,0x7d,0xa0,0x2f,0x98,0x5d,0xc1,0xa6,0xd4,0xbf,0x20,0xf3,0xbd, - 0xc2,0xd0,0x46,0x47,0xfc,0xf0,0xa0,0xd0,0x9c,0x07,0xd3,0x9a,0x76,0xa5,0xd0,0x7f, - 0xa5,0x26,0xab,0xa2,0x35,0x0d,0x1d,0xa7,0x30,0x96,0xf5,0xa2,0x1c,0x22,0x6c,0xe6, - 0x20,0xa6,0x6b,0x35,0x2f,0xcf,0xec,0x80,0x10,0xb8,0xfa,0xe6,0xf6,0x24,0x52,0xe6, - 0xa8,0x13,0xa7,0x52,0x0f,0x51,0x83,0x70,0xd1,0x5c,0xa4,0xe7,0x1c,0x5d,0x12,0x33, - 0xae,0x99,0xe1,0xfc,0xf9,0x43,0xb1,0x1d,0x1b,0xb4,0xcb,0x2b,0x9f,0x6c,0x6d,0x93, - 0xed,0x6a,0xb4,0x2a,0x52,0xc8,0xc6,0x11,0x4b,0x2a,0x79,0xf5,0xfb,0x5c,0x33,0x77, - 0xef,0x43,0x98,0xa6,0xb3,0x3e,0x88,0x2f,0xb9,0xba,0xce,0x89,0x95,0x09,0xee,0x16, - 0x5b,0x62,0xbf,0x1a,0x27,0x46,0xab,0x84,0x59,0xcc,0x86,0xae,0xde,0x52,0xc0,0x0f, - 0xc0,0xd7,0xa7,0xcf,0xf0,0x0f,0x5e,0x41,0x17,0x77,0xcf,0x2d,0x4a,0xd3,0x45,0x67, - 0x73,0xd9,0xbb,0x70,0x75,0x6a,0x2a,0xb3,0x6d,0x1b,0x6c,0xbf,0x35,0xd0,0xa2,0x35, - 0xa1,0x31,0xc0,0x13,0x27,0x09,0x0e,0x98,0xec,0x8b,0xf8,0xef,0x97,0xa6,0x70,0x6a, - 0xbd,0x95,0xfb,0x17,0x0c,0x46,0xee,0xd5,0x01,0x88,0x0a,0x78,0x0f,0xb8,0x31,0x54, - 0xcd,0x9a,0xaf,0xf0,0xeb,0xfc,0xef,0x09,0x42,0xd1,0xb5,0x10,0x5a,0x5e,0xe9,0x2b, - 0xd2,0x3e,0x55,0x30,0xd7,0x45,0xad,0xc4,0x81,0x0a,0xfe,0x79,0x87,0x5b,0x4c,0x48, - 0xc8,0x4a,0x13,0x9b,0xf9,0x91,0x6d,0x53,0x6b,0xc1,0x91,0x42,0xbb,0x23,0x2e,0xc0, - 0x1c,0xb4,0x19,0x53,0xe8,0x87,0xff,0xf0,0x20,0xe5,0xe5,0x66,0x12,0x91,0x0c,0x12, - 0x8f,0x5a,0x62,0xc5,0x94,0x6c,0xea,0xde,0x79,0x2e,0xf1,0x27,0x83,0x6f,0x07,0x95, - 0xa1,0xbc,0x1a,0xe6,0xb3,0xbe,0xc9,0x37,0x09,0x60,0xc7,0xd7,0xf1,0xe6,0x7e,0x79, - 0xd4,0x0c,0xb8,0xac,0xd2,0xe9,0x6a,0x88,0x20,0x0b,0xcd,0x84,0x1c,0x62,0x31,0x22, - 0xe4,0x69,0xc0,0x70,0x15,0x24,0x67,0x37,0x89,0x4e,0x80,0x71,0xff,0x68,0xc3,0xb1, - 0xbb,0x97,0x3e,0x2e,0x1d,0xd0,0x08,0x66,0x25,0xf9,0x20,0xcd,0x73,0xe9,0x77,0x6d, - 0x49,0x04,0x75,0xa5,0x9b,0x28,0x11,0xf8,0xa0,0x4c,0xa3,0x15,0xf0,0xbc,0xc2,0x25, - 0x84,0xa5,0xe4,0x35,0xf3,0xd9,0xb6,0xd9,0xeb,0x08,0xb4,0xce,0x60,0xc7,0x02,0x85, - 0xe8,0xf6,0xd4,0xfe,0x1d,0xac,0x22,0xc6,0xe5,0x44,0xc4,0xde,0x79,0xec,0xca,0xce, - 0x42,0x90,0xda,0x1f,0x7d,0x95,0x2e,0xad,0x88,0xfe,0x02,0x46,0x9b,0x9a,0xcb,0x25, - 0x1e,0xa0,0x74,0xda,0x70,0x28,0xe4,0xc8,0x6a,0x0b,0xbd,0xdf,0xe5,0xc4,0x7c,0x71, - 0xc0,0xfd,0xf9,0x8b,0xd8,0x2c,0x45,0x9b,0xce,0xc1,0x23,0x91,0x68,0x17,0x58,0xa7, - 0xe0,0xdc,0x35,0x2f,0x7f,0x43,0x62,0x18,0x53,0xe0,0x49,0xdb,0xa7,0xa4,0x4b,0x51, - 0x63,0x0d,0xcb,0xd9,0x67,0x4c,0x01,0xe2,0x21,0x2a,0x51,0x94,0x25,0x2e,0x75,0x64, - 0xe9,0xf0,0x2c,0x1d,0xc3,0xa4,0xc0,0xcb,0x34,0x0f,0x68,0x0c,0x13,0x86,0x7c,0x42, - 0x81,0x53,0xd4,0x1b,0xd9,0xc1,0x2c,0x4e,0xcc,0x5d,0xac,0x94,0x19,0x6f,0xb4,0x63, - 0x51,0x9a,0x1d,0x34,0x05,0x03,0x7f,0xeb,0xec,0xa7,0x26,0x47,0x05,0x6a,0xad,0xad, - 0x93,0x9a,0x66,0xc5,0xb4,0x7c,0xb9,0x3a,0x1b,0x0f,0x2f,0x56,0x88,0x62,0xf2,0x77, - 0x48,0x82,0xb2,0x6a,0x82,0xfa,0x63,0x11,0x18,0x85,0x4e,0xd3,0x1a,0x82,0xe8,0xb3, - 0x00,0xb2,0x78,0x34,0x3a,0x3b,0x5c,0xf5,0xe5,0x85,0xac,0xc3,0x8f,0x7b,0xdb,0x43, - 0x1b,0xba,0xa4,0xa6,0xc0,0xa8,0xa4,0x50,0x17,0x15,0x0f,0x07,0xf7,0xf8,0xd4,0x32, - 0x80,0xbb,0xe0,0xf1,0xe2,0x1a,0x0c,0x85,0x81,0x06,0xea,0xd4,0x53,0xf7,0xda,0xef, - 0xdb,0xe2,0x61,0x46,0x98,0x3d,0x61,0x0d,0x02,0xc8,0x8f,0x5b,0x18,0x13,0xaa,0x1b, - 0x0b,0x10,0x3e,0xb1,0xc7,0x2a,0x68,0x95,0x4a,0xb5,0x97,0xca,0x93,0x7b,0x19,0x6b, - 0x5d,0xb4,0x62,0x74,0x08,0x74,0x4e,0x4b,0x4b,0xd4,0x8d,0x4f,0x5b,0xd4,0x03,0xad, - 0x49,0xb5,0x3f,0x3d,0xb8,0xe5,0x92,0xee,0x09,0xfc,0x3b,0xde,0xda,0xdc,0x53,0xa9, - 0x5e,0x24,0x68,0x15,0x1c,0xed,0x79,0x84,0x02,0xaa,0x08,0x2e,0xc5,0xd4,0xd5,0x4c, - 0x52,0x1d,0x06,0x48,0x1a,0x51,0x6d,0xaf,0xa0,0x77,0xe8,0xd8,0xd9,0x19,0x35,0x23, - 0x2d,0x5d,0xd5,0x6e,0xc4,0x7d,0x69,0x84,0x92,0x33,0x86,0x36,0xf9,0x2a,0xf4,0x68, - 0x56,0x5d,0xff,0xad,0xa2,0x93,0x1f,0x0c,0x0b,0x61,0xe9,0xd8,0x59,0xc3,0x74,0xa7, - 0x2a,0x12,0xec,0xa5,0x6b,0x86,0x39,0x84,0xe8,0xcd,0x12,0x1f,0x57,0xa2,0xe9,0x02, - 0x83,0x82,0x47,0x75,0xb7,0x29,0x0d,0x10,0x24,0x4e,0xa3,0xa4,0xd4,0x58,0xaa,0xfb, - 0x6a,0x6c,0xb2,0x14,0x87,0xa9,0x6a,0xad,0xae,0xa5,0xf2,0x37,0x2c,0xe8,0xc9,0x02, - 0xb7,0x69,0x81,0xed,0x7d,0x53,0x4f,0x25,0x2d,0xcd,0x89,0xa2,0xda,0x80,0x85,0xfb, - 0xb6,0x45,0xea,0x93,0xcf,0xbc,0x01,0xc9,0x69,0xce,0xfd,0x4d,0xbd,0xee,0x1e,0x7b, - 0x8b,0x29,0x0c,0x7e,0xfd,0xe0,0x57,0x1e,0x9e,0x3d,0x62,0x75,0x67,0x05,0x7f,0xc1, - 0x3f,0x8f,0x4c,0xa6,0x1f,0xaa,0xe3,0xc0,0xb8,0x55,0x82,0x96,0x5b,0x80,0xf2,0xd0, - 0xb2,0x2b,0xdb,0xf7,0x24,0x09,0x76,0x61,0x6f,0x6b,0x91,0xc9,0xe4,0xeb,0xeb,0x40, - 0xbf,0x36,0xb0,0x45,0x72,0x58,0x20,0x17,0x62,0xce,0xc1,0x85,0xf4,0x54,0x2a,0x1f, - 0x3f,0x63,0x9a,0xf0,0xb0,0xa5,0x4d,0xdb,0xef,0x88,0xa0,0x5b,0xef,0x25,0xa8,0xd8, - 0x8e,0x87,0x6e,0x40,0x13,0xb7,0x44,0x3c,0xa4,0xc6,0xc4,0x02,0x6e,0xe1,0xf9,0x0b, - 0xbf,0x51,0xfa,0x0b,0x49,0xc6,0x0e,0x19,0xac,0xd4,0xcd,0x16,0xcc,0x27,0x8b,0xd9, - 0x01,0x85,0xd6,0xe0,0x12,0x06,0x69,0xa4,0x26,0xaf,0x9b,0x22,0x2c,0x4a,0x44,0x66, - 0x7a,0xe0,0xdc,0x7a,0x91,0x5a,0x70,0x0c,0x0c,0x83,0xad,0x6b,0x04,0x51,0x14,0x66, - 0xe6,0x3c,0x15,0x35,0x90,0x5b,0xd6,0x09,0x32,0x6b,0x84,0x78,0xbe,0x6e,0x5d,0x77, - 0x44,0xdf,0xeb,0x53,0x63,0xcc,0xe3,0x2d,0xba,0x8f,0xe5,0x0d,0xbe,0xfd,0x0d,0x72, - 0x64,0x3e,0xe3,0x4b,0x99,0xae,0xe0,0x3c,0x0d,0x6f,0x0a,0x8c,0x53,0x32,0x02,0xba, - 0x87,0x15,0xac,0x87,0x10,0xde,0x0a,0x02,0x0c,0x01,0x23,0xd5,0x00,0x71,0x3e,0x50, - 0xce,0xd5,0x13,0xcc,0xcc,0xb8,0x6a,0x8b,0x8e,0x60,0xab,0x48,0xf8,0x0c,0x7b,0x61, - 0xa0,0x17,0x35,0xc0,0x90,0x2e,0x4b,0x9f,0x0d,0x23,0x9c,0x58,0x15,0x51,0x13,0x71, - 0xc7,0xa5,0x2e,0x7f,0x9f,0xfe,0x38,0xb1,0x63,0x91,0xdb,0x9b,0x00,0x55,0xdb,0x80, - 0x87,0x41,0xe7,0xc4,0x87,0xd8,0x4b,0xf1,0x4d,0xdb,0x8c,0xc1,0x8b,0xfb,0x7b,0xf2, - 0xa4,0x98,0x40,0x44,0x7f,0xbd,0x7c,0xcf,0x98,0x88,0x48,0x85,0x1b,0xfa,0xf2,0xfc, - 0x84,0xd4,0xdb,0xbe,0x7c,0x2f,0x47,0x1c,0x17,0x8d,0x41,0x94,0x92,0xf9,0x92,0x11, - 0x06,0x48,0xec,0x11,0xc3,0xac,0xbd,0xd3,0x12,0x78,0x6d,0x0f,0x41,0x4c,0x91,0x8c, - 0xc7,0xbb,0xd8,0x2f,0x2c,0xf5,0x71,0x40,0xcd,0x47,0xa3,0xee,0x7a,0x55,0xf1,0x48, - 0xd5,0x08,0x63,0x9c,0x6d,0xa2,0x92,0x3f,0x9a,0x64,0x84,0x0f,0x01,0x26,0x80,0x2f, - 0xdb,0x6c,0xd9,0x2b,0x3e,0xbe,0x83,0xc9,0x17,0x47,0xe7,0x9f,0x6d,0x05,0xef,0xb3, - 0xea,0x16,0x3c,0xf9,0x56,0x98,0xfb,0x44,0x60,0x76,0x53,0xcc,0x89,0x0d,0xa6,0xcf, - 0x41,0xdd,0x7e,0x3e,0x2a,0xf3,0xe0,0x81,0xe3,0x7a,0xa7,0x6a,0x5a,0x3f,0x75,0x25, - 0x44,0x44,0xf6,0xce,0x0c,0xd9,0xe8,0xe3,0xef,0x03,0x49,0xcb,0x8b,0x3c,0x39,0xb2, - 0x51,0x35,0x77,0xbc,0xcf,0x31,0xe1,0x2b,0xea,0xeb,0xac,0x41,0x85,0x2d,0x90,0x2a, - 0xd2,0x60,0x35,0xde,0x9b,0x12,0xbf,0xdb,0x42,0x52,0x3f,0xdb,0x99,0xbe,0x3a,0xf3, - 0x38,0xaf,0xca,0x19,0x34,0x4e,0x2e,0x09,0xcd,0xc6,0x34,0x3a,0x86,0x94,0x1b,0x92, - 0x04,0x69,0xa0,0xd6,0xc5,0x12,0x8d,0xa2,0x51,0x49,0xfb,0x30,0x85,0xa4,0x90,0xf2, - 0xbc,0xad,0xc1,0x3a,0x98,0x4e,0x10,0x61,0xdc,0xef,0x76,0xd6,0x0a,0xc9,0x31,0xc1, - 0x76,0x0c,0x2e,0xb9,0x49,0x67,0x1f,0xc0,0xad,0x03,0x3e,0x02,0x3a,0xc6,0xa0,0x7f, - 0x26,0x89,0x0d,0x26,0x31,0x64,0x6a,0x9f,0xb5,0x3f,0x88,0x78,0x9a,0x35,0xcd,0x48, - 0x81,0x32,0x83,0x36,0xf8,0x74,0x02,0x8f,0xe0,0x20,0xfe,0x4c,0x63,0xc1,0x18,0x49, - 0x25,0x05,0x1c,0x47,0x10,0x71,0x42,0xe3,0x70,0xeb,0x43,0x76,0xee,0x87,0x22,0x33, - 0x0e,0x81,0x7d,0x37,0x78,0x56,0xb4,0x8b,0xe1,0x37,0xce,0x5c,0x53,0x64,0x62,0x49, - 0xbf,0x05,0xa1,0x0b,0xf9,0x87,0x32,0xa5,0xa1,0x79,0xcc,0x1e,0x5c,0x24,0x06,0xf3, - 0xa8,0x81,0xec,0x14,0xf2,0xaf,0x1c,0x4a,0xa2,0xa8,0xbd,0xcd,0xc5,0x09,0x49,0xf2, - 0x2b,0x0c,0x61,0xfe,0x56,0x81,0xbf,0xbb,0xd8,0x42,0xf2,0x23,0x08,0x1e,0x8b,0xfb, - 0x0b,0x23,0x28,0x83,0x45,0xdd,0x3b,0x24,0x20,0x3a,0x73,0xb7,0xfb,0xbd,0x04,0x08, - 0x06,0x87,0x76,0x2e,0xf1,0xbd,0xde,0x1a,0xf5,0x31,0xb2,0xc2,0x45,0xe7,0xd4,0x2b, - 0x58,0x63,0xf0,0xb2,0x99,0x7a,0x11,0xfc,0x15,0xd9,0xe2,0xfd,0x64,0xed,0x47,0xaf, - 0xa8,0x2c,0x77,0x2f,0x71,0x9f,0xff,0xfa,0xd5,0x44,0xd7,0x8f,0x6f,0x6f,0x29,0x49, - 0x88,0xcf,0x9a,0x3f,0x68,0x4a,0x24,0x3e,0x09,0xed,0xec,0x44,0x2b,0xfe,0x95,0x53, - 0x44,0x6d,0xfb,0x97,0x0a,0xf6,0x6a,0x88,0xe0,0x90,0x73,0x55,0xaa,0x30,0x46,0x6b, - 0x82,0x1c,0xf2,0x07,0x5a,0xb7,0x0d,0x4f,0x88,0xb0,0x2e,0xab,0x9d,0xda,0x65,0xc0, - 0x1b,0x1f,0xa3,0x29,0x7e,0xbf,0x4b,0x94,0x1f,0xf9,0xcb,0x3f,0xf4,0xa6,0x07,0x90, - 0x02,0x15,0x0d,0xaa,0x35,0xe6,0x07,0xb5,0xc0,0xd3,0xab,0xb1,0x9a,0xf6,0xe7,0xf8, - 0xfa,0x65,0xd3,0xc2,0xd3,0x0b,0x2b,0xba,0x97,0xc8,0xb4,0x4a,0x40,0xd9,0xf1,0x97, - 0xe9,0x8f,0xf6,0x65,0xbf,0xea,0x22,0xf6,0x82,0xd6,0x4a,0x16,0xf1,0x22,0x66,0xed, - 0x43,0x69,0x78,0xf4,0x36,0xc9,0xd6,0x11,0x5d,0xc7,0x47,0x07,0x5e,0xdb,0x05,0x75, - 0x4a,0xa6,0x21,0xae,0x6d,0xaa,0x2c,0x02,0x6f,0xea,0x0e,0x86,0xc3,0x78,0x0a,0x73, - 0x89,0x92,0x22,0x92,0xee,0xcc,0x28,0x9d,0x4b,0xb8,0x16,0xea,0xea,0x2c,0x0a,0x7a, - 0x42,0xd8,0xd0,0x06,0x3d,0xed,0x14,0xbc,0xca,0xf4,0x3b,0x28,0xfe,0x6f,0x78,0x6b, - 0x09,0x92,0x60,0x7c,0x62,0x7a,0x77,0xe8,0x53,0x57,0xb4,0xa2,0x20,0xd1,0x8e,0x1d, - 0xab,0xb4,0x3d,0x82,0x55,0x90,0x0e,0x4b,0xc8,0xbb,0xcf,0x23,0x02,0xd6,0x0c,0xc9, - 0xd5,0xe1,0x25,0x8c,0x2e,0x41,0x2e,0xe5,0xea,0xab,0x62,0x9f,0x42,0x73,0xdb,0x5c, - 0x75,0x6a,0xf5,0x4e,0x3b,0x39,0x38,0x35,0x68,0x6f,0x4c,0x1e,0xd7,0xd0,0x45,0x27, - 0xc9,0x6c,0x38,0xb6,0x64,0x81,0x6d,0x06,0x57,0x32,0xb7,0x43,0xa9,0xd3,0xf6,0x3b, - 0x42,0x85,0x8d,0xb2,0xc3,0xc0,0x9f,0x64,0x3b,0xd6,0x49,0x1f,0x57,0xd2,0xdb,0x60, - 0x47,0x3f,0xde,0x9d,0x7f,0x36,0x9c,0xb0,0x54,0xc8,0xcf,0x35,0xaa,0x33,0x10,0x42, - 0x01,0x8e,0x0c,0x08,0xf1,0x55,0x18,0x37,0x2e,0x20,0xcf,0x8e,0x9d,0x76,0x59,0x81, - 0x8d,0x3d,0x21,0x38,0x10,0x77,0x37,0xd2,0xa8,0xe2,0x97,0x99,0xae,0x46,0x77,0x27, - 0x91,0xc1,0x1f,0xe6,0x7d,0xe3,0xc6,0x40,0xf1,0xaf,0x6c,0x24,0xef,0x25,0x5e,0x9a, - 0x66,0x3b,0xd8,0xbd,0xde,0xd5,0x38,0xe6,0xbf,0x4d,0x47,0x4f,0xa2,0xf5,0x7a,0xa9, - 0xf8,0xe9,0xb5,0x57,0x97,0xb7,0x53,0x6f,0x24,0x68,0xe9,0x69,0x6f,0xb8,0x41,0x4b, - 0x6f,0x1c,0x41,0x54,0xa2,0xc2,0xf5,0x98,0x17,0x3b,0x31,0xfa,0x5b,0x32,0xad,0x43, - 0xef,0x8a,0x50,0x66,0x36,0xf8,0x6a,0x80,0x43,0x4a,0xe9,0x14,0xdd,0x9c,0x62,0xf9, - 0x2c,0x85,0xfc,0x3c,0x18,0xe4,0x50,0x22,0x4d,0xca,0x94,0x82,0x92,0x65,0x00,0x9f, - 0x4e,0x69,0x8d,0xef,0x81,0x8b,0x32,0x2b,0x26,0xd8,0x3a,0x01,0xd9,0x3c,0xa3,0x1a, - 0xb4,0x77,0xc2,0x01,0x4c,0xde,0x0d,0x13,0x0e,0xda,0xcd,0xbc,0xb7,0x6c,0x3b,0x79, - 0x89,0x2b,0x43,0x95,0xbf,0x7d,0xbf,0x39,0xd1,0x46,0x1f,0x21,0x0b,0x1f,0x74,0x28, - 0x6e,0xaa,0xc1,0x7a,0xc6,0x4d,0x20,0xc0,0xce,0xfe,0xf0,0x55,0x62,0x79,0x29,0xa9, - 0x83,0xcf,0x91,0x79,0xbe,0x12,0xd6,0xe8,0x73,0xc7,0x68,0xfa,0x01,0x81,0x1d,0x4d, - 0x6f,0x0d,0x83,0xe1,0xe8,0xa3,0xb3,0xf6,0x1e,0x71,0x62,0x50,0xb2,0x3b,0x69,0x1b, - 0x53,0x3e,0xcd,0x67,0x13,0x0b,0x39,0x00,0xae,0xaf,0x58,0x4b,0x03,0x0e,0x74,0xe0, - 0x20,0x30,0x92,0x82,0x5f,0x35,0x54,0xe3,0x9f,0xdd,0x67,0x97,0x8a,0x5f,0x66,0x87, - 0x07,0x9c,0x8f,0x99,0xed,0x1a,0xaa,0x00,0x9a,0xb1,0x4f,0x45,0x0f,0x5c,0xb0,0xfc, - 0x65,0xf0,0x25,0xc1,0x26,0xe6,0x3f,0xa7,0x47,0x7f,0x66,0xd4,0x8e,0x51,0xad,0x82, - 0xd5,0x3d,0x08,0x02,0x32,0xa5,0xe2,0x4c,0xc1,0x7e,0xee,0x06,0x0f,0x5c,0xf1,0xf2, - 0x38,0xd6,0xde,0x7e,0xc1,0xd8,0xf0,0x1c,0xbf,0x29,0xe5,0x04,0xda,0x59,0xdb,0xeb, - 0xd3,0x04,0x8a,0xd1,0x34,0xe5,0x6b,0x01,0xe3,0x58,0xf4,0x73,0xd6,0x7f,0xa2,0x6c, - 0x13,0x99,0x5a,0x54,0x32,0x6b,0x5a,0xfe,0x85,0x7b,0xe0,0x05,0xd2,0xf0,0x5a,0xfe, - 0x57,0xc6,0x50,0xee,0x4c,0x3a,0x2f,0x59,0x0c,0xb3,0x82,0x15,0x56,0x7d,0xb4,0xe5, - 0xae,0xb0,0xf6,0x10,0xc7,0x35,0x27,0x9b,0x00,0x27,0xe5,0xdd,0x42,0x5b,0x56,0x18, - 0x24,0x26,0xf0,0x0d,0x2d,0x16,0x29,0xb0,0xef,0x91,0x6d,0x80,0x07,0x4c,0x5a,0xe9, - 0xef,0x45,0xd9,0x19,0x57,0x5c,0xa7,0x56,0x8d,0x98,0xc4,0x5c,0xc2,0x0f,0x17,0x4b, - 0x5a,0x94,0xcd,0xa0,0x39,0x6e,0xf9,0xd9,0x12,0x57,0xec,0x45,0x7e,0xf5,0x3f,0xcb, - 0x28,0x1c,0xb5,0x34,0xab,0x34,0xcd,0x08,0x72,0xd8,0x0b,0x0c,0xfc,0xff,0x7d,0xc1, - 0x13,0x09,0xea,0xbe,0x95,0x29,0x26,0xfe,0x46,0x10,0x86,0x9c,0x3c,0x82,0xa6,0xd4, - 0xd6,0x4a,0xe3,0x81,0x07,0x37,0x4b,0xcf,0x07,0xe7,0x42,0x8d,0xbf,0x7e,0xfe,0xd6, - 0x2f,0x83,0xfe,0xc4,0x87,0xe2,0xca,0x0a,0x6d,0x88,0x87,0x7d,0xdd,0xfd,0x5a,0x1d, - 0xa3,0x06,0xde,0xa4,0xd3,0x8b,0x1a,0x24,0xe3,0x46,0x71,0xca,0x56,0x42,0x70,0x40, - 0x4d,0x0e,0xe2,0x07,0x65,0xb0,0x60,0xb2,0x44,0x7a,0xe6,0x84,0xa4,0xc2,0x51,0x2f, - 0x21,0x88,0xd5,0x9a,0xfb,0x61,0x99,0xcd,0xa3,0x62,0x15,0x5a,0xb8,0xe1,0x69,0xb1, - 0xcb,0x88,0xb7,0x2d,0xb0,0x30,0x61,0xb3,0xc4,0xb8,0x4d,0xc6,0xff,0x0f,0x96,0x42, - 0x22,0x1f,0x14,0x5a,0x34,0x90,0x87,0x68,0xe7,0xeb,0xc0,0x22,0x54,0x04,0x68,0x70, - 0x05,0xd7,0x14,0x6b,0x70,0x67,0xbf,0x8d,0x80,0x9e,0xdb,0x0a,0x31,0x45,0x9b,0xb1, - 0x9e,0x49,0x95,0x5f,0xb0,0xf3,0x59,0x8c,0x01,0x1d,0x0f,0x17,0xae,0xc9,0x9f,0xb9, - 0xe4,0x4a,0x0a,0xe9,0x72,0x18,0xbe,0xf5,0xe7,0x5b,0xa7,0x78,0xd5,0x66,0x06,0xea, - 0x8a,0x0b,0xbc,0xa8,0x78,0x68,0x28,0xca,0xca,0x00,0xac,0x9c,0x92,0xab,0x6a,0xb8, - 0x59,0x82,0xf1,0xed,0x67,0x29,0x92,0x3a,0xe8,0xc3,0xd2,0x28,0x3a,0x96,0xc7,0xf9, - 0xc4,0x05,0xfc,0x7f,0xf2,0x09,0xc8,0x39,0x6b,0x4c,0xad,0x88,0x12,0xc9,0x8f,0xfb, - 0x0b,0x43,0xad,0x24,0x98,0x5e,0xf4,0xdb,0x4b,0xa8,0xe5,0x98,0x32,0xe8,0x54,0x64, - 0xad,0x41,0xbb,0x73,0x34,0xf9,0x6c,0x89,0x2a,0x93,0x25,0x84,0x42,0x2e,0x0e,0x2a, - 0xac,0x0e,0x93,0xbc,0xee,0x62,0xcb,0x0b,0x7f,0x21,0x6b,0xf8,0x7b,0x9a,0xaf,0xdb, - 0x9e,0x06,0x13,0xc9,0x96,0xc5,0x2d,0x44,0x2b,0xe1,0xd1,0x54,0xdc,0x6f,0x8f,0x41, - 0x8d,0x9f,0xca,0x22,0x3c,0x6e,0x3d,0x99,0xc8,0xc5,0x1b,0x78,0xb4,0xe2,0x40,0x70, - 0x7a,0x1f,0xd2,0x25,0xdb,0x13,0x16,0x42,0x81,0xaf,0xcd,0xa2,0x95,0x7b,0x46,0x6e, - 0x82,0x1c,0xb2,0xad,0xf9,0xe0,0xe3,0xb4,0x15,0x9c,0x67,0xbc,0xd4,0x8e,0x65,0xc5, - 0xaf,0x1f,0xc3,0xbd,0x30,0xbe,0xd5,0x9d,0x77,0xdf,0x9b,0x4d,0x96,0x3f,0x47,0x6a, - 0x02,0x15,0xf5,0xa7,0x79,0x3c,0xdd,0x2d,0x97,0xfe,0x26,0x15,0x1c,0x93,0xa3,0x3f, - 0xc3,0x92,0xc5,0xb7,0x22,0x5a,0x6a,0xcd,0x99,0xcf,0xc4,0xa2,0x41,0xf4,0x8c,0x49, - 0x9a,0x1f,0xea,0xac,0x2b,0x98,0x0b,0x40,0x1c,0xc0,0x5d,0xe5,0x67,0x34,0x45,0x3f, - 0x91,0xf5,0xa3,0xb8,0xb1,0x97,0x55,0x0c,0x96,0xfd,0x15,0xf5,0xe4,0x82,0x09,0x39, - 0xda,0x5a,0xc8,0x12,0x79,0x8e,0x86,0xda,0xe5,0xb6,0xe3,0x39,0xd0,0x07,0x8e,0x5c, - 0xc9,0x17,0x50,0x7f,0x0a,0xa3,0x4a,0x38,0x83,0xe9,0x3a,0xde,0xa6,0x87,0x6e,0xdc, - 0x46,0x92,0x4d,0xcd,0x46,0xb7,0x8d,0xcb,0x42,0xf2,0x21,0x2f,0x44,0xd4,0x67,0xcd, - 0xbf,0x15,0xb0,0x74,0xed,0x78,0x29,0x49,0xaa,0xf5,0xad,0x33,0x0f,0x16,0x9a,0x7b, - 0x2b,0x12,0x54,0x02,0xbf,0x19,0x67,0xbd,0x09,0x2a,0x06,0xcd,0x79,0x64,0x50,0xe4, - 0x8d,0x51,0x8e,0x59,0xd3,0x2c,0xcc,0xaf,0x59,0xf7,0xe8,0x8c,0x7c,0x8e,0x4b,0x30, - 0xe7,0xd6,0x95,0xdc,0x53,0x0d,0xcd,0x7c,0x31,0xe0,0x7a,0xfe,0x2f,0xd0,0xeb,0x5b, - 0xe2,0x16,0xe1,0x2c,0x19,0xbb,0xef,0x7a,0x96,0xf3,0x4e,0xf2,0x7e,0xaa,0xcb,0xfd, - 0x4a,0x04,0x30,0xa7,0xbd,0x3e,0x17,0xec,0x02,0x8e,0x16,0x79,0xa5,0x26,0xef,0x60, - 0x45,0xa0,0xf0,0x28,0x68,0x55,0xe4,0x40,0x07,0xbf,0x03,0x83,0xa8,0x63,0x10,0x42, - 0x04,0x8e,0x38,0x5c,0xfc,0x10,0x40,0x50,0x04,0x81,0xe1,0x24,0xb0,0x1e,0x59,0x81, - 0xa6,0xf7,0x71,0x39,0xbe,0xe0,0x49,0x41,0x85,0xe2,0x21,0x55,0x3f,0xb3,0x49,0xb3, - 0xcd,0x8e,0x69,0x8b,0x87,0x02,0x41,0xce,0x72,0x81,0x15,0xb2,0x3e,0x92,0x6a,0x82, - 0x4a,0x9f,0x80,0xe8,0x0b,0xe6,0x4e,0x5b,0x2e,0xc9,0x67,0x95,0x02,0x39,0xfe,0x76, - 0x25,0x47,0xe8,0x56,0x95,0xf2,0xbb,0x4a,0xae,0xb4,0xc2,0x8b,0xf6,0x3e,0xc7,0xb7, - 0xc6,0xca,0xe3,0x9f,0x96,0xa6,0x8e,0x10,0xb6,0x84,0xa3,0x66,0x3d,0x56,0x3f,0xbb, - 0x47,0x4a,0x66,0xd3,0xd7,0x3d,0x84,0x9f,0xc7,0x7c,0x7e,0x8c,0x24,0xa5,0x28,0x02, - 0xaf,0xed,0xf2,0xfd,0x3e,0x75,0x25,0x20,0x4a,0x39,0x8c,0xda,0x7d,0x88,0x7a,0x17, - 0xac,0x03,0x6a,0x82,0x5b,0x08,0x5a,0x9a,0x69,0x44,0x78,0x3b,0x7f,0x9b,0x79,0x16, - 0x2f,0x8c,0xf5,0x32,0x77,0x5b,0xa2,0xaf,0xb0,0x48,0xed,0x03,0xd4,0xeb,0x53,0xf9, - 0x0f,0x88,0x7b,0xec,0xbb,0x76,0x43,0xb9,0xcc,0xd3,0xa4,0xbb,0xcf,0xeb,0x9d,0xb1, - 0x83,0x21,0xe2,0x4e,0x1e,0xac,0x41,0x92,0xf6,0x8e,0xe2,0xcc,0xd3,0xae,0x13,0x2b, - 0x3a,0x9b,0xe8,0x86,0x1f,0xad,0xba,0xe3,0xf8,0x10,0xa4,0x72,0xa0,0xac,0xfe,0xd0, - 0xed,0x8a,0x83,0xe1,0xd3,0xec,0x37,0x6e,0x27,0x9f,0xf1,0x66,0xdf,0x6e,0x23,0x7b, - 0x02,0x02,0xeb,0x5f,0x57,0x76,0x03,0x5c,0x32,0xc0,0x9b,0xd1,0x92,0xad,0xb3,0xe0, - 0x67,0x7c,0x20,0x98,0x1a,0x44,0x4b,0xd1,0xc7,0x83,0x0f,0xd6,0xf4,0xe6,0x66,0x78, - 0x86,0x97,0x8a,0x26,0x53,0xf3,0x60,0x50,0x85,0x75,0x0b,0xdb,0x46,0x08,0x2f,0x8b, - 0x07,0x9f,0xf7,0x94,0x9a,0x11,0x4e,0xd0,0x90,0x76,0xfd,0xb7,0x00,0xab,0xfb,0x36, - 0x04,0x19,0x6e,0xc6,0xdd,0xbe,0x45,0x0e,0x0e,0xdb,0x7d,0x2e,0x4c,0xf9,0x7b,0x24, - 0x02,0x19,0x5f,0x39,0x30,0x95,0x8c,0xea,0x8f,0x25,0x4b,0xd7,0x61,0x5b,0x35,0x22, - 0x80,0x85,0x54,0xc7,0x27,0xb1,0x6b,0x01,0x1f,0x58,0x58,0x94,0x88,0x96,0x1b,0xfb, - 0x4d,0x27,0x58,0xd6,0xae,0xb2,0x8d,0x90,0xda,0x77,0x55,0x95,0x80,0x59,0x95,0x2f, - 0x3d,0x6c,0x87,0x55,0x01,0xcf,0x2b,0xcb,0x0c,0x46,0x9b,0x95,0x00,0x7a,0xc9,0x68, - 0xae,0xd0,0x59,0xe0,0x3a,0x6a,0x99,0xc5,0xb1,0x04,0x76,0xd0,0xdb,0xe8,0x56,0x18, - 0x28,0x43,0x25,0xd9,0xd4,0xaa,0xe7,0x25,0x6b,0x98,0x3f,0x3a,0x2d,0x71,0x3f,0xf9, - 0x0f,0xff,0xb4,0x77,0x44,0x01,0x8e,0xf5,0xd3,0x54,0x08,0x49,0xde,0x98,0x2d,0x79, - 0x01,0x96,0x4a,0x70,0x54,0x58,0x16,0x4a,0x91,0x2d,0xf7,0xae,0xfb,0x29,0x06,0x27, - 0x2f,0xc3,0x26,0xee,0xbb,0xa7,0x70,0xc6,0xee,0x79,0x61,0x11,0x8b,0x7f,0x35,0x51, - 0x54,0x93,0x8e,0x70,0x22,0xff,0x49,0x1a,0x1c,0xdd,0x5a,0x0e,0x7b,0xf2,0x18,0x4f, - 0x9e,0x71,0xe2,0x4b,0xfe,0x0f,0xac,0x60,0x91,0xd8,0x27,0xf0,0x7a,0x51,0x36,0xdf, - 0x0a,0x30,0xff,0xe4,0x13,0xfd,0xbf,0xd3,0x3f,0x2b,0x6f,0xff,0xff,0xff,0xdb,0x9f, - 0x7f,0x8e,0x7a,0xa4,0x10,0x21,0x51,0x46,0xd6,0x48,0xae,0x09,0x9a,0x19,0xef,0xed, - 0xc2,0x43,0x28,0x62,0x32,0x33,0x20,0xcf,0xed,0x4c,0xe1,0x47,0x65,0xe8,0xc1,0x39, - 0x70,0xd9,0x91,0x15,0xd8,0x39,0x12,0xa3,0x76,0xc8,0xaf,0x49,0xb1,0x66,0x4b,0x4b, - 0xb2,0xea,0xe9,0xbe,0x97,0x2e,0xb6,0xd7,0xd1,0xbe,0xb9,0xbf,0xd0,0x13,0x10,0x7f, - 0x28,0x9f,0xb8,0x3b,0x9d,0xa2,0xf3,0x67,0xee,0x21,0xd7,0x11,0x8b,0x99,0xeb,0xf0, - 0xdf,0x26,0xb0,0x50,0xee,0xa0,0x02,0xf4,0x3b,0xea,0xe6,0x1d,0x72,0xb7,0x41,0xc5, - 0x86,0xc1,0xc1,0x05,0xd8,0x8d,0x69,0x50,0x63,0x39,0xfe,0x3f,0x27,0xfa,0xd9,0x33, - 0x70,0x62,0xdb,0x93,0x95,0x15,0xf9,0x03,0xa1,0x70,0xdf,0x41,0x32,0x61,0xb9,0xee, - 0x18,0xf5,0x7d,0x8e,0xa2,0x0a,0xea,0xac,0x60,0xb0,0xb4,0x00,0x6d,0xcc,0x32,0x5f, - 0xcb,0x0b,0x0f,0x98,0x29,0x9b,0xc0,0x2c,0x6d,0x4f,0xa4,0x04,0xfe,0xc4,0xfb,0x8b, - 0x3e,0xc0,0xbb,0xca,0x46,0x22,0x5b,0x39,0xfb,0xae,0x06,0x40,0xeb,0xe2,0x43,0xb8, - 0x28,0x8b,0x4b,0x08,0x71,0xa6,0x93,0xac,0x68,0xb4,0x88,0xb9,0xc3,0xc6,0x7a,0x8f, - 0xc8,0x1c,0x7f,0xc8,0x0c,0x9c,0x2c,0x6f,0xeb,0x13,0xf6,0x31,0xf9,0x09,0x6a,0x7c, - 0x68,0x83,0x5d,0xd8,0x0d,0x4e,0x9a,0x41,0xf3,0x30,0x4c,0x5b,0xf8,0x08,0x78,0x39, - 0x0a,0x88,0xcb,0x59,0xf9,0xd7,0xff,0x06,0x5c,0x31,0xed,0x45,0x79,0xc3,0x5d,0x6c, - 0x60,0x4b,0xf5,0xbd,0xd9,0xf0,0x23,0x60,0xa8,0x2f,0x64,0x9f,0x06,0xf2,0xbd,0x3c, - 0xd7,0xad,0xba,0x65,0xcb,0xab,0x6c,0x22,0xe0,0xd8,0x06,0x57,0xf4,0xfd,0x77,0x12, - 0x97,0xfb,0x5c,0xbc,0x5a,0x52,0xb4,0xb0,0x0a,0x1a,0x0c,0xa7,0x1f,0x35,0x50,0x7a, - 0x51,0x01,0x85,0x68,0x84,0x99,0x2d,0xf1,0xe4,0x5d,0xc7,0x2e,0x1b,0x16,0x8d,0x81, - 0xa2,0x15,0x0d,0xaa,0xdd,0xe6,0xe2,0xc2,0xc6,0xd4,0xbb,0x01,0x7d,0xd8,0xb9,0x2c, - 0x22,0xaf,0xbc,0xd9,0x3b,0xda,0xb7,0x82,0xe0,0x43,0x82,0xc0,0xae,0x25,0x97,0xd2, - 0x5c,0x51,0xf4,0xf4,0xde,0xcc,0x39,0x0d,0x40,0xf8,0xd6,0x74,0xd0,0xd8,0x2f,0x39, - 0x7c,0x57,0x55,0x47,0x3a,0xee,0x6f,0x03,0xc6,0x8d,0xb5,0xe7,0xbb,0x7b,0x14,0xc5, - 0x06,0xa8,0x65,0x49,0x80,0x73,0x05,0x1e,0xd4,0x57,0x4c,0x47,0x0c,0x67,0xf7,0x5d, - 0x89,0x87,0x14,0x08,0x62,0x7c,0xe9,0xbd,0x6e,0x5a,0xee,0xa8,0x91,0x99,0x36,0x66, - 0x85,0x14,0xae,0x0e,0xb9,0x33,0x64,0x3a,0xe1,0x01,0x65,0x9b,0xd8,0xd8,0xb3,0xeb, - 0x53,0x7f,0x2b,0xfe,0x88,0xb3,0x17,0xb6,0xcf,0x5e,0x57,0xbd,0x20,0x77,0xf0,0x71, - 0xe9,0x59,0x1f,0xda,0x58,0x9d,0x21,0x5d,0x4a,0x5d,0xcb,0x4e,0xd3,0xa6,0x3d,0x20, - 0x66,0x51,0x7c,0x33,0x53,0xb5,0x6c,0x13,0x6c,0x4d,0xb6,0xef,0x2f,0xf7,0x46,0xdd, - 0xfa,0x60,0x26,0x40,0xc6,0x36,0xf2,0x6b,0x48,0x57,0xe4,0x7e,0xf3,0xa5,0xba,0xb2, - 0x25,0x68,0xdf,0xdd,0x66,0xb7,0xa9,0x9b,0x15,0xa3,0xd3,0x0f,0x7a,0xde,0x64,0x5b, - 0x11,0xb7,0x4e,0xae,0x96,0x36,0xc1,0x86,0xed,0x6d,0xa7,0x7f,0x7b,0x17,0x58,0x25, - 0xa5,0x9f,0xc0,0xad,0x1e,0xaf,0x9c,0xa7,0x66,0xcd,0x8e,0x0a,0xf7,0x85,0x10,0xfc, - 0xa9,0x8c,0x3b,0x25,0x13,0xa1,0x00,0xe2,0xbe,0xce,0xe4,0xc7,0xf6,0xa1,0x95,0x61, - 0x3f,0xe7,0x61,0x23,0x1c,0xe0,0x77,0xa1,0xcd,0x1f,0x8f,0x0a,0x77,0x4f,0xd4,0x79, - 0x04,0x8e,0x2b,0x93,0xfd,0x3a,0x59,0x72,0x3c,0xce,0x8b,0x09,0x76,0x42,0x5a,0xf2, - 0xd8,0x2b,0x5f,0x01,0xc0,0xae,0xe7,0x9d,0xa7,0x17,0x5f,0x41,0xab,0xeb,0x56,0x7f, - 0xcd,0x34,0x57,0x64,0x77,0x6b,0x23,0x04,0xc5,0xf2,0x10,0xea,0xbe,0x24,0xc5,0x21, - 0xa2,0xea,0xa2,0xb6,0x35,0xe6,0x8a,0x61,0x0f,0xdd,0x45,0x14,0xef,0xe9,0x96,0x20, - 0xb3,0x21,0x29,0xde,0x2a,0xe5,0x3c,0x91,0xbc,0xe7,0xf3,0x75,0x28,0xe1,0x7b,0x7f, - 0xa9,0x57,0x82,0x5d,0xc8,0x69,0x38,0x2e,0xef,0x33,0x24,0xdd,0x30,0x35,0x51,0xe1, - 0x8e,0x84,0xb9,0x6d,0x6d,0xc5,0x1a,0x59,0xcf,0xe1,0xbc,0x06,0x75,0xda,0x22,0x6d, - 0x73,0x07,0x04,0x3a,0x7d,0x05,0xe3,0xaf,0xb4,0xde,0xe5,0x1b,0x37,0x2b,0x52,0x74, - 0xf1,0x74,0xcd,0xff,0x9e,0x30,0x04,0x59,0x8e,0x74,0x2b,0xcf,0xfe,0x4a,0x71,0xb4, - 0x2a,0x23,0x23,0x57,0x1f,0x1c,0xb2,0x53,0xf6,0xc1,0xd6,0x32,0x7c,0x3e,0x14,0x5d, - 0x6c,0xad,0x4a,0x2c,0x7d,0x9b,0x72,0x6a,0x17,0x7a,0xa0,0x7f,0xfc,0xee,0xc3,0x39, - 0xec,0xb8,0xb9,0xae,0xe2,0x01,0x8c,0x11,0x43,0x38,0x77,0x8d,0x5e,0x8e,0x13,0x7f, - 0x66,0xa4,0x95,0x58,0xfc,0x8f,0xf9,0x9d,0xc9,0x7e,0xfc,0x7a,0xd9,0xbe,0x26,0x0e, - 0xa6,0xc7,0xb1,0x75,0x0c,0x3d,0x14,0xf2,0xc5,0x58,0xe2,0x06,0x9f,0xf3,0x98,0xed, - 0x86,0xee,0x40,0xe5,0x0d,0x17,0xd3,0x36,0x05,0xb8,0x8e,0x86,0xb6,0x5e,0x6f,0xfd, - 0x07,0xcd,0xc3,0xaf,0x5f,0xa3,0x31,0x41,0xe2,0xe3,0x25,0x56,0x57,0xb2,0x4d,0x3d, - 0xea,0xd1,0x38,0xe4,0x81,0x3a,0xe2,0xb2,0xe3,0x52,0x1d,0xc4,0x56,0x70,0x3e,0xc0, - 0x85,0x8f,0xe1,0x00,0x60,0x16,0x4a,0x80,0x95,0xb1,0xca,0xca,0xd5,0xb6,0xa8,0x30, - 0x5c,0xb5,0x70,0xd3,0xd6,0x1a,0xc6,0xb5,0x69,0xaa,0x70,0x85,0x43,0xfa,0xbc,0xb5, - 0x24,0xa1,0x79,0xc5,0xba,0x1d,0x4d,0x18,0xd5,0x52,0x66,0xf0,0x74,0xf2,0x52,0x94, - 0x65,0x77,0x7f,0xa4,0x8e,0xbe,0x91,0x88,0x79,0x5c,0x22,0x9d,0x80,0x97,0x24,0x52, - 0x2c,0x98,0x86,0x64,0xd5,0xa9,0x0f,0x2e,0x14,0x89,0x51,0x5d,0xf0,0xb9,0xdf,0x4e, - 0x8e,0xf7,0x2c,0x8d,0x0d,0xe8,0x3e,0xaf,0x84,0x63,0x84,0x0e,0xdd,0x56,0x27,0x8b, - 0x4d,0x9c,0xbd,0x8d,0x2e,0xb2,0x0d,0x58,0xb7,0xdb,0xa1,0x9a,0x17,0xbe,0x76,0x7e, - 0x08,0xed,0x89,0xb6,0x81,0xd5,0x93,0x29,0xf9,0xd3,0x1b,0xdd,0xd9,0x2e,0x2e,0x7b, - 0xf2,0xd8,0xb3,0xbc,0xc5,0x43,0x56,0x00,0x9f,0x55,0x36,0xc2,0xba,0xbe,0x93,0x5e, - 0x57,0x4b,0x78,0xc1,0x0f,0x06,0x24,0x1a,0x13,0x9f,0x25,0xfb,0x79,0xac,0xc4,0xcc, - 0x02,0x93,0x27,0xd6,0xd3,0x6a,0x57,0x61,0xef,0xe6,0xe0,0xaa,0x81,0xe3,0xd2,0x39, - 0x73,0xdb,0xeb,0xad,0x40,0xfd,0x3a,0xb8,0x8c,0xff,0x5d,0x7b,0x8b,0x1b,0x3e,0x2c, - 0x8d,0x86,0x8a,0x44,0xb3,0x26,0xef,0x20,0xbf,0x40,0x07,0x94,0xdf,0x62,0x32,0xe3, - 0x3d,0xac,0x8c,0xf6,0x93,0x69,0x4f,0xa8,0x08,0xd3,0xf0,0x2a,0x29,0x95,0x07,0x41, - 0x88,0x43,0x09,0x06,0x31,0xaa,0x11,0xb9,0xae,0xd0,0x26,0x24,0x5d,0x6e,0x9c,0x56, - 0x43,0x81,0xa9,0x77,0xd0,0x27,0x96,0xa9,0x9a,0xd1,0x0a,0x2f,0xad,0xd7,0x7a,0xf0, - 0x98,0xab,0x9a,0xc4,0x6a,0x8b,0x37,0x90,0xc2,0x5b,0xc7,0x9f,0xa3,0xe7,0x97,0x92, - 0x30,0x65,0xb6,0x53,0xee,0x2a,0x10,0xfc,0xbe,0x29,0x7c,0x06,0xf0,0x24,0xe5,0x65, - 0xf5,0x30,0x61,0x37,0xf0,0x10,0xe8,0x11,0x42,0x50,0x01,0x7e,0x56,0xc9,0xf1,0x61, - 0x87,0xb8,0xce,0x57,0x10,0x66,0x9d,0x8e,0x4c,0x3a,0x83,0xaf,0xef,0xc8,0x4a,0xda, - 0x8a,0x0c,0xfa,0x4a,0x1e,0x69,0x8d,0x28,0x48,0x48,0xc2,0x5f,0x76,0xc3,0x34,0x34, - 0xeb,0x69,0x8e,0x38,0x1f,0x48,0x9c,0x38,0x49,0x49,0x09,0xc3,0xb0,0x66,0x8f,0x6b, - 0xab,0xaa,0x43,0x20,0x14,0x66,0x15,0x29,0xc8,0x4a,0xeb,0x29,0x38,0xcb,0x8e,0xe4, - 0x38,0xd0,0x66,0xe0,0x91,0x69,0x5d,0x39,0xc9,0x4b,0xcd,0x04,0x32,0xad,0x03,0x2e, - 0x68,0x0c,0x2e,0xcc,0xe6,0x0c,0xb5,0x06,0x2b,0x48,0x72,0x1e,0x38,0x5b,0x14,0xba, - 0x0f,0x88,0x28,0x43,0xd5,0x86,0x9f,0x7a,0x07,0x4b,0xba,0x38,0x20,0xe6,0x38,0x6d, - 0x63,0x25,0x6f,0x0f,0x19,0xfa,0x32,0x29,0x8a,0x00,0xad,0x6a,0x7b,0x2f,0xf8,0xbb, - 0xaf,0xd2,0xad,0x59,0xf0,0xa9,0x7b,0x29,0x6a,0xc7,0x5b,0x9f,0x59,0x27,0xfb,0x81, - 0x28,0x30,0x15,0x73,0x36,0x41,0xaa,0xe7,0x53,0x54,0xc4,0x37,0x5e,0xdf,0x0c,0x91, - 0x29,0x11,0xd7,0xa2,0x4a,0x20,0x1c,0xf6,0x69,0xdc,0x9c,0x47,0xa1,0xda,0xfa,0x80, - 0xa0,0x12,0x99,0x01,0xc4,0xba,0xf7,0xe1,0xb9,0x1c,0xb2,0xd6,0x8c,0xf4,0x0d,0x91, - 0xa9,0xec,0x22,0xee,0x6c,0xef,0x63,0x79,0x63,0x1b,0x38,0xb0,0x76,0x65,0xe9,0x8e, - 0xd7,0x48,0x6f,0x0e,0x89,0x9b,0xd6,0xd0,0x99,0x38,0xaa,0xe3,0x56,0x09,0x88,0x3e, - 0xca,0x06,0x69,0xd0,0xb4,0x23,0x4a,0x92,0x03,0xf1,0x8f,0x07,0xff,0x1b,0xd5,0xb2, - 0xcc,0x7a,0xe2,0xdb,0x62,0x9d,0x91,0xf1,0x19,0xeb,0xc2,0x16,0x76,0xfb,0x89,0x3e, - 0x87,0x5b,0x9d,0x4b,0x48,0x9a,0x23,0xf7,0x02,0xd4,0x62,0x66,0x77,0xaa,0xf9,0x88, - 0x28,0xe7,0xbd,0xd2,0x84,0xb3,0xdc,0x58,0x64,0x57,0xc6,0x32,0x83,0x64,0x0e,0x98, - 0xd6,0x19,0x3b,0x3c,0x09,0xbb,0x7e,0xfc,0x48,0xd2,0x9f,0x8a,0x93,0x6c,0x07,0x76, - 0x57,0xe5,0x36,0x68,0xbe,0xfb,0x77,0xed,0xff,0x55,0x2a,0xe7,0x1c,0xfd,0xf0,0x66, - 0x5e,0xe4,0xd5,0xb5,0xd1,0xb0,0xc0,0x5b,0x45,0xd0,0x4f,0x8b,0x09,0x6b,0x82,0x8e, - 0x60,0x50,0xb0,0x9d,0xd8,0x37,0x15,0x1b,0xe6,0xd1,0xb0,0xeb,0x7b,0x0c,0x6e,0x88, - 0x8a,0x97,0x33,0xde,0x7b,0x68,0xba,0xe6,0x5f,0xf2,0x21,0x82,0xb9,0x7d,0x82,0x0f, - 0xec,0x18,0x45,0x3d,0x6b,0x61,0xb3,0x17,0x89,0x7e,0x6a,0x16,0x07,0xc8,0xb8,0x3b, - 0x89,0x8f,0x3c,0xf2,0x45,0xc3,0xca,0x8b,0x10,0xf2,0x24,0xff,0xa5,0x02,0xa4,0x86, - 0x30,0x44,0x31,0xf1,0x63,0x84,0x23,0x22,0x44,0xe0,0x17,0xb1,0xb5,0x4f,0x48,0x10, - 0x08,0x0a,0x75,0x3e,0xdd,0xca,0x5c,0x92,0x4d,0x78,0x9e,0x0f,0x83,0x45,0x27,0x2e, - 0x04,0xef,0x7e,0x45,0xa3,0x67,0x28,0x23,0xc4,0x02,0xd7,0xd6,0x16,0xa2,0xd6,0xf1, - 0x07,0x87,0x7e,0x04,0xf6,0xab,0x69,0xb3,0x99,0xc5,0x2a,0xa8,0x3e,0x55,0x98,0x4a, - 0xfb,0xcb,0x60,0x34,0xfd,0x72,0x78,0x80,0xc3,0x06,0x50,0x14,0xf5,0xe2,0x69,0x2d, - 0xa0,0xc4,0xe9,0xa5,0xc5,0x0a,0x7c,0x32,0x0f,0xde,0x80,0x51,0x73,0x5a,0x38,0x32, - 0x73,0xc9,0x9f,0xd8,0xfd,0x10,0xdd,0x10,0xd8,0x40,0x21,0x23,0x75,0x83,0xbd,0xad, - 0x7a,0x06,0x5b,0xa4,0x7b,0x0c,0x5f,0x05,0xe6,0x87,0xc3,0xc7,0xf1,0x78,0x2c,0x68, - 0x4f,0x75,0xfd,0x4c,0x6f,0x4c,0xc5,0xc8,0xed,0x4f,0xec,0xb4,0x58,0x47,0x2a,0x1b, - 0x05,0x89,0xad,0x1b,0x1b,0x18,0x3e,0x7d,0x4e,0x73,0x8c,0x36,0xb6,0x6c,0x5b,0xcc, - 0xa8,0xaa,0x63,0x2b,0x0d,0xa9,0xb7,0x2e,0x43,0xce,0x01,0xdc,0x30,0x41,0x2f,0x1a, - 0x85,0xab,0x3a,0xe2,0x99,0xe9,0x93,0xbb,0xf6,0x10,0x13,0xb5,0x50,0x46,0x08,0xb5, - 0xfb,0x0f,0xd4,0x42,0xf5,0x29,0x9a,0xfb,0x6a,0x61,0xcd,0x1e,0x52,0x43,0x33,0x26, - 0xa8,0x9d,0xd1,0x00,0x2c,0x6d,0x44,0xa2,0x4c,0x6d,0x82,0x62,0x7b,0x42,0x84,0xb5, - 0xaa,0x03,0x4b,0xc5,0x67,0x72,0x38,0xac,0x0c,0x4e,0x53,0x75,0x52,0x13,0x93,0x7f, - 0x12,0x72,0x47,0xfa,0x4a,0xcc,0x69,0x80,0x34,0xcb,0x5b,0x0d,0xbd,0xd8,0x20,0x82, - 0xdb,0x6f,0xda,0x80,0x57,0x75,0xcb,0x40,0xe6,0x98,0x06,0x9d,0x0b,0xf0,0xd3,0x93, - 0x25,0x6e,0x57,0xb9,0x1e,0x3c,0x44,0x30,0x6c,0xb5,0x2c,0xf1,0xd0,0x07,0x25,0x82, - 0x5b,0x4d,0xf3,0x62,0x48,0xf6,0xf9,0xc1,0xa5,0xf2,0xdd,0x65,0x72,0x07,0xd2,0x93, - 0xad,0x93,0xd2,0x13,0xc1,0xd4,0x05,0xe3,0xe7,0xdc,0x06,0xc7,0x75,0x5c,0x28,0x46, - 0x06,0x3e,0x59,0x99,0xe3,0xe9,0x3f,0x13,0xc5,0x94,0x63,0x15,0xf2,0x79,0x52,0x4a, - 0xe5,0xb5,0x5b,0xf2,0x57,0x4a,0x9b,0x81,0xc4,0x5c,0xc2,0xf0,0xad,0x58,0xa5,0x57, - 0x8b,0xf8,0x4e,0x05,0x35,0xf0,0x47,0x1c,0x1f,0xba,0x26,0x14,0x7a,0x9a,0x53,0x5e, - 0x65,0x97,0x92,0xa5,0xd5,0x48,0x5d,0x19,0x84,0xd3,0x59,0x6d,0xf4,0xe7,0xd9,0x75, - 0xd3,0x98,0x66,0x92,0x5f,0xfa,0x56,0xea,0x62,0xd5,0xce,0x26,0xd9,0x71,0x2e,0x9a, - 0x2d,0x66,0x71,0x1a,0x3b,0x76,0x34,0xaa,0xce,0xd4,0x80,0x86,0x15,0xf4,0xd8,0x74, - 0xac,0x65,0x36,0xb4,0xba,0x4a,0x3d,0xaf,0x4f,0xd7,0x97,0x3c,0x5f,0xbb,0xd0,0x64, - 0xad,0x64,0x6f,0xb2,0xcb,0xfb,0x35,0x9b,0x4e,0xd6,0xad,0x3d,0x16,0xbf,0x6e,0x6e, - 0xa9,0xfe,0x9d,0xb1,0x46,0x13,0x17,0x2a,0x3c,0x71,0x4b,0xd3,0x81,0x71,0x11,0x32, - 0x4c,0xd0,0x4a,0xbc,0xc4,0xde,0x44,0x4b,0x5b,0x72,0x55,0x84,0xaa,0x01,0x3e,0xc1, - 0x4b,0x61,0x47,0xb1,0xcc,0x11,0xe2,0xd2,0x05,0x9a,0x24,0x11,0x7e,0x3e,0x96,0xd3, - 0x0a,0xe0,0x89,0xbd,0x4c,0x32,0xdb,0x89,0x61,0x20,0xc0,0xa0,0xdb,0xff,0xa3,0x34, - 0xdc,0xe1,0xda,0x05,0xb3,0x26,0xa5,0x19,0xf4,0xd1,0xef,0xa0,0x28,0x3c,0x33,0x5e, - 0x07,0x10,0xf0,0x96,0xef,0x5e,0xd8,0x14,0xd0,0xec,0x23,0xa6,0x59,0x6b,0xac,0x7a, - 0x1d,0x5e,0x76,0xf7,0xf3,0xbc,0x26,0x0c,0x30,0x13,0x3d,0x5a,0x12,0xf3,0xa1,0xee, - 0x1d,0x47,0x36,0xf7,0x35,0xb2,0x8e,0xb5,0x97,0x51,0x1e,0xdd,0x55,0xae,0xc2,0x07, - 0xeb,0xc5,0x65,0x41,0x95,0x32,0xc0,0xe2,0xbc,0x54,0xb0,0x66,0x9a,0x69,0xb9,0x1d, - 0x05,0x04,0xc8,0x96,0x90,0x63,0x8b,0xf2,0xbd,0xa5,0xd0,0x60,0xae,0x0b,0xa6,0xb2, - 0xe6,0x00,0x91,0xdb,0x69,0xdd,0x69,0x11,0xca,0x4d,0x2e,0x22,0x10,0x56,0xbd,0x42, - 0x9b,0x08,0x7e,0x71,0x1c,0x25,0x61,0xc3,0xc7,0xf7,0xbb,0x9f,0xd2,0xa7,0xa3,0x0f, - 0x0e,0x19,0xb8,0xa9,0xd9,0x4b,0x04,0x11,0xa3,0xf9,0xf0,0x2d,0x5b,0xa8,0xca,0x30, - 0xa4,0x92,0x75,0x3a,0x61,0xa4,0x09,0xbc,0x1f,0x8b,0x9e,0x38,0xd6,0x28,0xbf,0x8d, - 0xb8,0xb7,0x57,0xdd,0x19,0x92,0xa8,0x98,0xb8,0xe5,0xca,0x9d,0x7d,0xed,0x0b,0xe0, - 0x85,0x49,0x5f,0x4f,0xb7,0xa1,0x0d,0x14,0x22,0x3a,0x37,0x19,0x0d,0xa3,0x82,0x68, - 0xdf,0x0a,0x75,0x4d,0x97,0x20,0x0b,0x6f,0xaf,0x47,0xb2,0x28,0x67,0x61,0x02,0xda, - 0xbd,0xf5,0xb4,0xcb,0xfa,0xfe,0x85,0x87,0x4d,0x3f,0x9e,0x5d,0x2c,0x7a,0xb2,0x04, - 0x8c,0x8e,0xab,0x32,0xfa,0x6e,0x83,0xc9,0xce,0xbf,0x44,0x8f,0xfe,0x6d,0x8b,0x79, - 0x25,0xab,0xb5,0xcb,0xf0,0x89,0xf3,0xfd,0xb3,0x42,0x04,0x0e,0xe8,0x7f,0xab,0x62, - 0x8c,0xed,0x80,0x66,0x12,0xcf,0xe5,0xfd,0xc1,0xcf,0xaa,0xf1,0x08,0xdf,0xa8,0xe3, - 0x45,0x1e,0xb4,0xb4,0x90,0x0e,0x24,0x4e,0xcd,0x5c,0xe2,0xb3,0xd0,0x4e,0x7d,0x8e, - 0x24,0x46,0xfa,0x07,0xb1,0xcd,0xa1,0xc3,0x1b,0x37,0x35,0xd7,0x9a,0xba,0xb9,0xe2, - 0xcd,0x1c,0x52,0x95,0x95,0x28,0xe2,0x95,0x08,0x92,0xe7,0xd5,0xef,0xf8,0xff,0x53, - 0x12,0x1c,0x65,0xde,0xae,0x80,0x74,0x12,0x1d,0xab,0x9c,0xf1,0x05,0x63,0xa0,0xaf, - 0xbd,0xc8,0xad,0x74,0xe5,0x8a,0xb0,0x70,0x9f,0x75,0xf7,0x54,0x6f,0xa5,0xc4,0x45, - 0x92,0xaa,0x9b,0xca,0xb6,0x78,0x95,0x6c,0x67,0x17,0x0a,0x96,0xf4,0x94,0xac,0x11, - 0xe9,0x55,0x12,0xd5,0x30,0x39,0xf1,0xb3,0x60,0x83,0xe3,0x39,0x7e,0xd1,0xb5,0xa0, - 0xd4,0x29,0x98,0xea,0xcb,0x28,0x24,0x57,0x89,0xc7,0x53,0x91,0x7e,0x8a,0x50,0xb5, - 0xa8,0xb2,0xc4,0xfe,0xce,0x5c,0xa7,0x09,0xca,0x86,0x8c,0xbc,0xc6,0xf4,0x97,0x78, - 0x9c,0x3e,0x3f,0x76,0x3a,0x6d,0x68,0xc6,0x94,0xa5,0x62,0xcf,0x0f,0x47,0x1c,0x06, - 0xc2,0xaa,0xb7,0x62,0x34,0x8d,0x20,0x10,0x12,0xc6,0xcd,0x19,0x65,0x3f,0x57,0x03, - 0xa7,0xba,0x26,0xf3,0x1e,0x80,0xb4,0xf7,0xa4,0xd1,0xca,0x2c,0x36,0xa7,0x06,0xec, - 0x2d,0x0c,0x4a,0x2d,0x98,0x3f,0xde,0xa6,0x9a,0x81,0x18,0xa6,0x5f,0x7e,0x52,0xb7, - 0x60,0x0f,0x78,0x96,0x43,0xb4,0x29,0x7a,0x81,0xd8,0xa6,0x10,0x45,0x3c,0x60,0x9e, - 0x56,0x69,0xfd,0x22,0x39,0x77,0xf0,0x82,0x36,0x8b,0x59,0xbd,0x79,0x68,0xa0,0x63, - 0xd0,0x91,0x98,0x5b,0x96,0x57,0x8b,0x93,0x70,0x6f,0x17,0x73,0x74,0x71,0x80,0xed, - 0x03,0x90,0xd5,0x65,0x04,0xae,0x14,0x16,0xc7,0x96,0x98,0x3e,0x66,0xfa,0x86,0x2a, - 0x82,0x93,0x58,0xe5,0x16,0x55,0xa0,0x32,0xb0,0xc6,0xb7,0xcf,0xbb,0x2f,0x16,0x6d, - 0x26,0xe6,0xc9,0xa8,0x26,0x0e,0xb6,0xb7,0x85,0xc9,0x03,0x70,0xe6,0x08,0x61,0xa0, - 0x00,0x85,0x60,0xb7,0xd4,0x24,0x10,0xdd,0xa5,0x4f,0x48,0x56,0xa9,0xa2,0x56,0x66, - 0xcf,0x64,0x0f,0xa7,0xcd,0xb5,0xc5,0x82,0x4f,0xca,0xa8,0x7b,0x2b,0x3e,0xca,0xc7, - 0xa6,0xd3,0xdb,0xb4,0x40,0x09,0x73,0x81,0x44,0xce,0xe2,0xe3,0xfe,0x30,0x11,0xd7, - 0xa7,0x89,0x97,0xcd,0x42,0x3a,0x29,0x8c,0x3c,0xc1,0x88,0x8a,0x68,0xfc,0x9d,0xe8, - 0x90,0xcc,0xaf,0xec,0x9e,0x5f,0x52,0x84,0x01,0xc5,0x50,0xbe,0x94,0x72,0x9e,0x78, - 0x91,0xcd,0x1e,0x6d,0x00,0xa6,0x8e,0x58,0xfa,0xac,0x73,0x2d,0x0e,0xf1,0x82,0x0c, - 0x2d,0x75,0x59,0x7c,0x89,0xa5,0x4a,0x0c,0x6d,0xf5,0xcb,0x1d,0x27,0x1f,0x8a,0x1c, - 0x21,0xee,0xcb,0x5f,0x20,0x20,0x03,0xd4,0xe9,0xcd,0x85,0x77,0xfc,0xba,0x02,0xe4, - 0x43,0xcc,0x49,0x11,0xe7,0x50,0x7a,0x95,0xef,0xcd,0xf3,0x08,0x3f,0xcc,0xcd,0x73, - 0x09,0x9c,0xb4,0x6d,0x1b,0x06,0x7b,0x18,0xad,0xed,0x7a,0x5f,0x89,0x40,0x61,0x8b, - 0x5a,0x9f,0x40,0x79,0x42,0x4b,0x4b,0x80,0x4c,0x39,0xe1,0x90,0x58,0x7f,0x06,0x9c, - 0x45,0xbe,0xd9,0x5b,0x1a,0xb9,0x7d,0xff,0xbb,0x05,0x32,0x38,0x15,0xe6,0x4e,0xf1, - 0x0f,0x11,0x1f,0x1c,0x37,0x60,0x65,0x58,0x40,0x5b,0xca,0xa1,0x81,0xff,0x52,0xae, - 0xcc,0x40,0x13,0x04,0x26,0x6c,0x06,0x02,0xd7,0x7e,0x9c,0x70,0x51,0x05,0xde,0x70, - 0xd8,0x1f,0x65,0xbe,0x21,0xdc,0x5f,0x9b,0x0f,0x96,0xf3,0xef,0xac,0x02,0x81,0x00, - 0x86,0x99,0xcf,0x93,0xb4,0xf3,0x99,0x97,0x8f,0xdc,0x2f,0x46,0x99,0xd3,0xdf,0x4c, - 0x25,0x06,0xc4,0xa4,0x81,0xd1,0x97,0xfd,0xb8,0x7b,0xce,0x84,0x8d,0xfd,0xac,0xfa, - 0xe2,0x34,0x55,0x87,0x94,0x6a,0xd7,0x9c,0xb2,0x29,0x31,0x14,0x97,0x51,0x42,0xc5, - 0x76,0xf2,0xdd,0x17,0x6b,0xc9,0x12,0x12,0x34,0x96,0xa0,0x94,0xdd,0x52,0x78,0x2c, - 0x4e,0x86,0x50,0x8a,0x48,0xb1,0xc0,0xac,0x33,0x12,0x85,0xc3,0x1c,0x16,0x77,0xf9, - 0x10,0x19,0x4a,0xaa,0x0f,0xf3,0xcd,0x5a,0x5c,0x29,0xd6,0xac,0x7b,0xf5,0xbf,0x64, - 0x46,0x6a,0x51,0x1c,0x8b,0x33,0xed,0x49,0xe1,0xd4,0xd8,0x8a,0x7c,0x59,0x25,0x74, - 0x4d,0x39,0x1f,0x71,0xac,0xf7,0x49,0xad,0x8f,0x1f,0xfd,0xb2,0x03,0x94,0x2f,0x88, - 0xd1,0x93,0x97,0x65,0x11,0xb6,0xaf,0x39,0x13,0xd4,0x85,0x4c,0x99,0xff,0xb5,0x8d, - 0x20,0x43,0x6e,0xcc,0xcb,0xb3,0xd1,0xdd,0x85,0x79,0xad,0xee,0x49,0x0a,0xce,0xc0, - 0xa3,0x40,0x2a,0x5b,0x7c,0x4e,0x1f,0xe9,0x11,0x49,0x6d,0x0d,0x03,0x06,0xd8,0x4e, - 0x51,0x2a,0x53,0xb0,0x1d,0x03,0x29,0xd9,0xea,0x92,0x2a,0x3d,0x36,0x3f,0x17,0xfc, - 0x52,0x90,0x8f,0x9b,0x82,0xb0,0x59,0xbb,0x37,0x74,0xd7,0x03,0x33,0xbd,0x16,0x2c, - 0x77,0xf6,0xdd,0x01,0xbd,0x81,0x67,0x31,0xfd,0x46,0x1f,0xd7,0x0d,0xed,0xb9,0x24, - 0x7a,0xe1,0x5c,0xea,0x72,0x2f,0x40,0xa1,0xbc,0x2d,0x74,0xa6,0x30,0x69,0xde,0xd3, - 0x3c,0xe3,0xb9,0xfa,0x8a,0x4f,0x31,0x10,0x61,0x93,0xef,0xfc,0x39,0x9a,0xc9,0x38, - 0xb1,0xd8,0x1e,0xe6,0x15,0xa8,0x7b,0x95,0xc0,0xb3,0x1c,0xc5,0x03,0xc2,0x67,0xdf, - 0x69,0xb2,0x64,0x26,0xe5,0xaf,0x13,0x82,0xc0,0x0c,0x78,0xee,0x82,0xf0,0xf1,0x0e, - 0xde,0x78,0xf2,0xe4,0x93,0x8a,0x7f,0x76,0x93,0x21,0x99,0xb2,0xc1,0x66,0x40,0xb2, - 0x50,0xda,0x91,0x78,0x79,0x62,0x1d,0x91,0xce,0x49,0xf6,0x7e,0xb9,0x12,0xe6,0x4f, - 0x67,0xf3,0x6d,0x37,0xe6,0x2e,0x61,0x8e,0x02,0x25,0x3a,0x8e,0x42,0x1a,0xe5,0xf5, - 0xcb,0x7d,0xe7,0xb0,0xf3,0x4c,0xad,0xef,0x8a,0x53,0x1d,0xdf,0x05,0xc3,0x22,0xe0, - 0xc5,0x4b,0xb2,0xef,0x4b,0x2f,0x2d,0x5c,0x36,0x69,0xa0,0xcf,0x3e,0x6f,0x95,0x27, - 0xec,0xb1,0xbb,0xfe,0x86,0x4f,0x5b,0x20,0x14,0x03,0x49,0x2c,0x58,0x0a,0x9f,0x05, - 0xad,0x47,0xab,0x58,0xfa,0xd4,0x9b,0x08,0x31,0xb0,0xee,0xb9,0x78,0x94,0xf4,0xbb, - 0xe2,0xa7,0x42,0x0b,0x3e,0xd1,0x96,0xed,0x09,0x6c,0xfb,0x5a,0xb8,0x7c,0x6c,0xe4, - 0xdb,0xa9,0x15,0xfc,0x60,0xad,0xe5,0x2a,0x45,0xc7,0x68,0x46,0x4b,0xa8,0x71,0x4d, - 0x0f,0x18,0x9b,0x2f,0xed,0x2a,0x33,0x2d,0x99,0x41,0x61,0xde,0x6a,0xdd,0x9c,0x42, - 0xe0,0x7b,0xb0,0xd9,0xab,0xbb,0xdf,0x5e,0x68,0xfb,0xec,0x80,0xdb,0x61,0x3e,0xc7, - 0xbe,0x6f,0xe3,0x88,0xd1,0x9f,0x6c,0x22,0x65,0x54,0xac,0x74,0xaf,0x7f,0x69,0x7b, - 0xc0,0x07,0x23,0xfb,0xec,0xe5,0xa8,0xd2,0x22,0x8e,0x98,0x56,0xf3,0x39,0x3f,0x0f, - 0x17,0x9f,0xe6,0xdb,0x05,0xee,0x2d,0x71,0x9f,0x5d,0xf5,0xe1,0xdf,0xf9,0x74,0x93, - 0xad,0x51,0x3f,0x8a,0x5d,0x98,0x65,0x33,0xe0,0x31,0x86,0xc7,0x52,0x75,0x40,0x28, - 0x5d,0xd9,0x86,0x9e,0x01,0xdd,0x0a,0x7b,0x72,0xfb,0x7f,0xbb,0x8b,0x88,0x04,0xf1, - 0x40,0xa5,0xcf,0x55,0x35,0xe7,0xf3,0x8b,0xbe,0x81,0xa2,0xc7,0x18,0xf0,0xbe,0xbe, - 0x2f,0xc0,0x05,0x59,0xec,0x35,0x36,0xbf,0x13,0x8a,0x76,0xd3,0x2e,0x93,0xda,0x3b, - 0x06,0xc8,0x4f,0x51,0x83,0xa3,0xef,0xee,0x0f,0xfc,0x5d,0xb3,0x61,0x23,0x82,0x7d, - 0x0a,0xb6,0xb0,0x8e,0x53,0xbd,0x2e,0x78,0x96,0x57,0x1e,0xc5,0xdb,0x1d,0xf1,0xea, - 0xff,0xc6,0x1d,0x86,0xf1,0xc8,0x26,0x68,0xd6,0x56,0xa6,0x6c,0x8e,0x76,0x00,0xfb, - 0x25,0xec,0x85,0xcb,0x2a,0x9e,0x2f,0x79,0x37,0x55,0xef,0x2f,0xfd,0x10,0x35,0x02, - 0x52,0x96,0xa8,0x6c,0x25,0xfb,0x27,0x69,0x12,0x54,0xa7,0x6d,0x02,0x74,0x1c,0xd4, - 0x56,0x03,0x79,0xbc,0x32,0xe4,0x60,0xed,0x01,0xd9,0xf5,0xe3,0xa2,0xd7,0xfe,0xaf, - 0x25,0xa2,0x0e,0x51,0xbe,0x7f,0x7d,0xf7,0xb3,0xf6,0x8e,0x62,0x80,0x86,0xff,0x8e, - 0x7c,0xc1,0xdf,0xdc,0xc5,0x5e,0x53,0xaf,0x78,0x0a,0x72,0xe9,0x7d,0x68,0x15,0x19, - 0xd7,0xb0,0x0c,0x80,0x5a,0x24,0xfa,0xfd,0x6c,0x49,0xdf,0x3f,0x78,0x39,0x4e,0x68, - 0x26,0x6d,0xd8,0x84,0x94,0x08,0x32,0xa6,0x5a,0x8c,0xd0,0x8d,0x5e,0xed,0x84,0x9d, - 0xba,0x0c,0x44,0x32,0x9a,0xa3,0xeb,0xf4,0x43,0xc7,0x80,0x07,0x32,0xee,0xa6,0xa5, - 0x4f,0x0f,0x99,0xd7,0x69,0xad,0x11,0x61,0xe4,0x80,0x5d,0xb8,0xd7,0x62,0xc8,0xfd, - 0x64,0xb5,0x1e,0x16,0x18,0xaf,0xb1,0xf6,0x64,0x49,0x29,0x69,0x2c,0x3f,0xe4,0x84, - 0x94,0x87,0x5f,0x1a,0x37,0xe4,0xd0,0x78,0xca,0xc9,0x98,0xe0,0xaa,0xa5,0x00,0x90, - 0x81,0x70,0xb1,0x41,0xf2,0xac,0xe0,0x90,0x63,0xab,0x54,0x34,0xd4,0x31,0x82,0xb8, - 0xf9,0x86,0x4d,0x63,0x19,0xe7,0x3b,0x76,0x44,0x8e,0x1d,0xe7,0x2a,0xc6,0xf9,0x95, - 0xdb,0x9c,0xb8,0x90,0x55,0x47,0x39,0x4c,0xcf,0xab,0x1b,0x68,0x19,0x6a,0x5f,0x78, - 0x9e,0x97,0xca,0x10,0xda,0x5c,0xc9,0xc8,0xce,0x80,0x0d,0xbe,0x7d,0xd8,0xda,0xc9, - 0x0b,0x08,0xf4,0x8c,0x19,0x3d,0x42,0xb8,0x48,0x93,0xb2,0x9b,0xbc,0xe6,0x18,0xab, - 0x61,0x68,0x45,0xfe,0x56,0xea,0x2b,0x59,0x6f,0xaf,0xb1,0xcf,0xb6,0xec,0x65,0x9f, - 0x81,0x60,0x48,0x04,0x43,0x00,0x43,0xb9,0xc8,0x01,0x2b,0xbd,0xd8,0x81,0xe1,0x2c, - 0xf1,0x8d,0xea,0x4a,0x58,0xed,0x5a,0xa8,0x9a,0x0a,0x8c,0xfd,0x35,0x6a,0xd5,0x1d, - 0x01,0x8b,0x2a,0x66,0xef,0x76,0x1c,0x8b,0x8d,0x8d,0x1d,0x8f,0x85,0xfd,0x5b,0x4f, - 0x0b,0x7e,0x38,0x4c,0xe1,0xa2,0xd4,0xfc,0x2f,0x61,0x73,0x9c,0x08,0x41,0x0e,0x9b, - 0x2c,0x74,0xcf,0xa2,0x1e,0xed,0x05,0xe5,0x24,0x39,0x85,0xe5,0x0a,0x72,0x47,0x78, - 0x00,0x3b,0x4c,0x0c,0x16,0x66,0x54,0xe3,0xe8,0xdd,0x1b,0xd8,0xa9,0xb2,0x3c,0xf0, - 0xda,0x4e,0xc4,0x10,0xc9,0xf0,0x9b,0x86,0x63,0x20,0x68,0x46,0x7d,0xfe,0xbd,0xcb, - 0x26,0x96,0xda,0x7a,0xb4,0xbc,0x7f,0xdc,0x47,0x93,0x21,0x62,0x76,0xfa,0x72,0x92, - 0xc6,0x92,0x05,0xbe,0x5c,0x09,0xb7,0xcc,0x84,0xf3,0x2d,0x70,0xf7,0x06,0xc4,0xb0, - 0x44,0xa2,0x42,0x30,0x05,0x0d,0x24,0x7c,0x9d,0x2f,0x43,0xc2,0xf9,0xf6,0xeb,0xd0, - 0xe0,0xd4,0x5b,0xd7,0xba,0xb9,0xcb,0xd6,0xe5,0xd1,0x94,0xe9,0xf3,0x21,0x1b,0xc4, - 0x5f,0x99,0x1d,0xe3,0x39,0xb4,0x75,0x21,0x65,0x90,0x42,0xe6,0x7b,0xfa,0xca,0xd5, - 0x73,0xf3,0x85,0xc9,0x71,0x43,0x2f,0x91,0x86,0x82,0x59,0xe4,0x7b,0x31,0x31,0x79, - 0xa8,0x15,0xfe,0x9f,0x3a,0x69,0xbd,0xca,0x70,0x75,0xb2,0xe9,0xfd,0xf6,0x16,0xe7, - 0x0e,0xf8,0xe1,0x8d,0x6a,0xb6,0xbe,0x3e,0x73,0x95,0x84,0x4d,0xb7,0x52,0x75,0x89, - 0x47,0xfe,0x6d,0x8d,0x53,0x17,0xa5,0xcb,0x43,0x21,0x14,0x39,0x20,0x1c,0x90,0xa7, - 0x5a,0x2b,0x9d,0x6c,0xe4,0x1a,0x1f,0xc1,0x6a,0x4b,0xdd,0xbb,0x2d,0x2d,0x5e,0x25, - 0x20,0xfe,0x00,0xbc,0xd5,0x1a,0x6e,0xee,0xe3,0x9d,0xd0,0xe8,0xb0,0x41,0xe6,0x17, - 0x8c,0xe0,0x5c,0x2d,0xd3,0x16,0x2f,0xc7,0x84,0x99,0x7e,0x0d,0xb5,0x56,0xa3,0x1b, - 0xa2,0x98,0xb9,0x5d,0xba,0x11,0xa8,0xe3,0xb0,0x55,0xdd,0x3f,0x5d,0x76,0x25,0xce, - 0x2d,0x9c,0xd9,0xd7,0x54,0x3a,0x45,0x4b,0x6f,0x70,0x9d,0xfb,0x2b,0x3a,0xa7,0x37, - 0x6b,0xa5,0x80,0x1f,0xde,0x8b,0x18,0x0f,0x22,0x15,0xa8,0x04,0xf1,0x5f,0xa0,0x9a, - 0x95,0x95,0xea,0x0a,0xf5,0xd5,0x4e,0x34,0x65,0x5d,0x6f,0xc6,0xb0,0x6e,0x81,0xf0, - 0x60,0x42,0xe7,0x08,0x71,0x8d,0xc5,0x1a,0xa6,0xd7,0x4e,0x25,0xf4,0x64,0xac,0x0a, - 0xea,0x77,0x3f,0xe4,0x79,0x43,0xf5,0xb1,0x3d,0x63,0xf9,0x8a,0x6e,0x9e,0xc0,0x50, - 0x98,0xff,0x98,0xd0,0x14,0x75,0x28,0x86,0x52,0xb9,0x50,0x49,0xdf,0xc9,0x68,0x9f, - 0x74,0x21,0x8a,0x48,0x15,0xb4,0x77,0x2a,0xb6,0xd9,0x90,0xe0,0x55,0xd4,0x45,0xc5, - 0x9c,0x4a,0x0a,0x47,0x98,0x27,0xa9,0x45,0x1b,0xbb,0x18,0x22,0x18,0xfc,0x96,0x13, - 0x85,0x85,0x49,0x57,0x8b,0x24,0x99,0x48,0x28,0x3b,0x01,0xd5,0x8f,0xc7,0x43,0xce, - 0x9a,0x0b,0xdc,0x3e,0x10,0x64,0xbe,0x6a,0xcb,0x9c,0xea,0xae,0xa6,0x37,0x62,0xda, - 0x8f,0xfc,0xad,0xed,0x85,0x3b,0x7c,0x3c,0x22,0xcf,0xe7,0x53,0xfa,0x6f,0xe0,0xf2, - 0xf7,0x0a,0xe2,0x03,0x48,0x5e,0xf1,0x36,0x06,0xe1,0xac,0xcf,0x5a,0x9d,0x9b,0x9b, - 0x77,0x96,0x63,0x97,0xbb,0xfd,0x9b,0x4b,0x22,0x8e,0x6c,0xd7,0x30,0x53,0x69,0xa0, - 0x67,0xd1,0x80,0x58,0x1c,0x8e,0xed,0x27,0xdf,0x91,0x12,0x51,0x42,0x68,0x13,0xbc, - 0x0d,0xdf,0x15,0x5c,0x3f,0x2b,0xf6,0x07,0xd5,0xb2,0x1a,0x59,0x95,0x2f,0xbb,0x41, - 0x77,0x41,0xf5,0xc9,0xf6,0x3f,0xfa,0xed,0xb2,0xe1,0x57,0xe9,0xae,0xb1,0x8c,0xdb, - 0x3d,0x85,0x3c,0xaf,0xf8,0x4f,0xe0,0xf7,0x3c,0x23,0x48,0x95,0x7d,0xcf,0x1e,0xb3, - 0x03,0x70,0x24,0x75,0xd0,0xb0,0xa3,0x84,0xfc,0x14,0xec,0xd6,0xdc,0x7f,0x0f,0x6d, - 0x2d,0x53,0x29,0x8f,0x5a,0x45,0x24,0x4e,0xcd,0x5c,0x28,0x44,0x73,0x7e,0xbe,0xf1, - 0x48,0x1b,0x2d,0x0f,0x24,0xa6,0xb4,0xa6,0x4c,0x37,0x21,0x55,0xf9,0x7d,0xc8,0xd7, - 0x23,0x3b,0xce,0x53,0x23,0x30,0x8d,0xaa,0x65,0xc7,0xc4,0xb5,0x82,0x77,0xfb,0x5b, - 0xdd,0xc9,0xdc,0x58,0x41,0x63,0x72,0xf9,0x0f,0xf0,0x6b,0x06,0x56,0xaf,0x2e,0x16, - 0xd6,0x93,0x7f,0xa5,0x35,0x34,0x41,0x18,0xe7,0x9e,0x4e,0x05,0x09,0x64,0x26,0x3f, - 0x2f,0xeb,0x9a,0x6d,0x4e,0xff,0xd6,0x89,0x2a,0x06,0x67,0x18,0xc2,0x0d,0x4d,0x91, - 0x46,0x55,0xcd,0xcb,0xda,0xc3,0x59,0xd5,0x02,0x4c,0xea,0x05,0x03,0x1c,0xa2,0xea, - 0x69,0x38,0x65,0x77,0x47,0x38,0xb2,0x8f,0xc4,0x55,0xc9,0xad,0x47,0x87,0xa9,0x28, - 0xc0,0x32,0x1e,0x1e,0xc7,0xb6,0x8e,0xa3,0xed,0xcd,0x45,0xbc,0x06,0x78,0x7f,0xad, - 0x7c,0x79,0xef,0x4f,0x3e,0xcf,0xee,0x8e,0x49,0x25,0x4e,0x95,0xc3,0x65,0x28,0x7b, - 0x49,0xba,0xd5,0x9c,0x1a,0x3d,0xbb,0xdb,0x1e,0x3e,0x1f,0xb9,0xc1,0x7d,0x51,0x40, - 0x0b,0x7c,0x5c,0x34,0x8c,0x87,0xf6,0x1e,0x4e,0x70,0x16,0xd9,0x1f,0xd8,0xdd,0xcf, - 0x2d,0xac,0x50,0x58,0x1b,0x3d,0xda,0xbb,0x7f,0x7d,0x43,0x14,0x1d,0xd0,0xb0,0xcc, - 0xa6,0x5e,0x14,0xf2,0x8b,0xeb,0x51,0xaa,0xfa,0x72,0x45,0x81,0x32,0x9f,0xc3,0xfd, - 0x2e,0x9d,0x6c,0xa8,0x67,0x26,0x16,0xf9,0x62,0x7f,0xce,0x1b,0xeb,0xd2,0x7a,0xe0, - 0xa7,0xe5,0xdf,0xfb,0x14,0xae,0x4e,0x15,0x2f,0x65,0xc8,0xa4,0x55,0x9d,0xe8,0x3f, - 0x1b,0xc3,0x44,0x96,0xe9,0x81,0x59,0x28,0x95,0x75,0x47,0xcd,0xd7,0xe9,0x59,0x87, - 0xfc,0x8f,0xc9,0x81,0x68,0xe3,0xb0,0xd0,0x24,0x8e,0xeb,0x26,0x77,0xe1,0xba,0xc7, - 0x07,0x8b,0x05,0x55,0x16,0x1e,0x1e,0xc2,0x59,0xd1,0x46,0x55,0xf5,0xee,0xdb,0xa0, - 0xaa,0x79,0x98,0xc4,0xe8,0x6b,0xcf,0xf9,0xb3,0x52,0xf6,0xaa,0x72,0x69,0xa8,0x42, - 0x54,0x85,0xb2,0x87,0xb4,0xa3,0x7c,0x35,0x44,0xf8,0x21,0x43,0xec,0xfa,0x19,0xc1, - 0x30,0x6c,0xbb,0x69,0x35,0xc3,0x79,0x66,0x49,0xc2,0x8a,0x9c,0xe9,0xe4,0x69,0x53, - 0x87,0x0a,0xe1,0x38,0xf4,0x87,0xe9,0x01,0x2c,0xfe,0x39,0x73,0x26,0x9c,0xe6,0x68, - 0x4d,0x89,0x88,0xde,0xbf,0x20,0xda,0xa0,0x6e,0x1e,0xcf,0xd3,0x5c,0xa9,0x52,0x98, - 0xf3,0x14,0xcd,0x16,0xc9,0x6c,0xc9,0x01,0xb7,0x5c,0xef,0xdc,0xf1,0x62,0x5b,0x69, - 0xcd,0x82,0xa2,0xfc,0x56,0x01,0x4c,0x14,0x32,0x1f,0xd3,0x2c,0xdd,0x61,0x13,0xe5, - 0x21,0x86,0x0c,0x28,0xf6,0x0e,0x48,0xf9,0x4e,0x8d,0xef,0xdd,0x71,0x69,0x02,0xe4, - 0x49,0x83,0x9a,0xee,0xe1,0x13,0x2b,0x6d,0xab,0xc5,0xe5,0x82,0xe0,0xd7,0x33,0xf3, - 0xaa,0x12,0xfa,0x3c,0xa4,0x56,0xbc,0x5a,0x87,0xbd,0xe8,0xe3,0xdd,0xee,0xf3,0xcf, - 0xf6,0x21,0x83,0x0f,0x61,0xa3,0x36,0x19,0x31,0x8c,0xf2,0x87,0xde,0xac,0x6a,0x3d, - 0x74,0xe3,0xeb,0x7b,0x76,0x96,0x65,0x68,0x9f,0x06,0x39,0x0d,0x7c,0x8a,0x1c,0x7d, - 0xcd,0x9f,0x53,0x69,0xc9,0xbf,0x0c,0x5d,0x40,0xdd,0x94,0xe6,0x17,0x0f,0x3d,0x61, - 0x43,0x4c,0xd4,0x14,0xcb,0x8e,0xc3,0xc8,0x13,0x0e,0x32,0x4f,0xd8,0xb3,0xf1,0x7d, - 0x59,0x13,0xc5,0x38,0x03,0x0f,0x4e,0x84,0x45,0x23,0xcd,0x5b,0x74,0x09,0x7f,0xa5, - 0x4e,0x30,0x10,0x75,0x37,0x44,0xad,0xdc,0x85,0x53,0x2e,0xbb,0x08,0xf8,0xa4,0x5e, - 0x48,0x8f,0x74,0x37,0x03,0xb0,0x50,0x4a,0x66,0xf0,0xe1,0x00,0x52,0x98,0x94,0x3a, - 0x48,0xda,0x3e,0x26,0x48,0xfa,0x66,0xf2,0x67,0x9d,0x22,0x60,0x35,0x51,0xc3,0x35, - 0x95,0x2f,0xbb,0xaa,0xb6,0xad,0x27,0xe3,0xe3,0x81,0xa8,0x0f,0x1b,0xed,0x34,0xc1, - 0x42,0x8c,0xec,0x27,0x48,0xf8,0x8c,0x97,0xe7,0xd7,0xb6,0x15,0xf1,0x26,0x7c,0xc8, - 0x50,0x37,0xdf,0xfd,0x25,0xb7,0x48,0xac,0x8d,0x8b,0x76,0x2c,0xfc,0x51,0x99,0x9c, - 0xda,0x32,0xaa,0x7c,0x1f,0x46,0x7e,0x85,0x65,0xb5,0x9a,0x92,0xdc,0x7e,0x87,0x7b, - 0x24,0x49,0xc7,0xcf,0x01,0x31,0x49,0xac,0xc8,0xb4,0x8f,0xcf,0xac,0xfc,0xf8,0x9b, - 0x65,0xb0,0xd0,0x1d,0xbc,0x44,0x17,0x79,0x86,0x1d,0xbb,0xae,0x1c,0xf4,0x47,0x3c, - 0xc7,0xb7,0x39,0xe6,0x49,0x79,0x7a,0x44,0x47,0xdc,0x31,0xae,0x72,0x09,0x36,0xc5, - 0x8c,0x18,0x2f,0x89,0x1d,0x0f,0x3c,0x9a,0x3f,0x5f,0x1d,0xbe,0x3f,0x00,0x75,0x35, - 0x51,0x33,0x27,0x46,0x98,0xfc,0x5b,0xd7,0xee,0x23,0xbc,0xcb,0x03,0x92,0x90,0x33, - 0xab,0x32,0x6b,0x5b,0xaf,0xbf,0x67,0x7a,0x8f,0x9f,0x1c,0x00,0xdb,0x04,0x00,0x24, - 0x33,0xeb,0x8c,0xc1,0x01,0xb8,0x4e,0xe2,0x42,0x02,0xca,0xae,0xf3,0x05,0x9b,0x86, - 0x32,0xea,0xdd,0xb5,0x33,0xdb,0x70,0x36,0xc2,0x25,0xf8,0x74,0xbd,0x6c,0xb9,0x11, - 0x27,0x40,0x8f,0xc0,0x9f,0xd8,0x52,0x0a,0x43,0x4c,0xcb,0xa5,0x73,0x23,0xb1,0xd6, - 0x43,0x13,0xdd,0xb5,0xf3,0x00,0x71,0xd3,0x42,0x4e,0x62,0xb7,0xd0,0x86,0x66,0x9f, - 0x7a,0x42,0xa1,0xc0,0x52,0xbe,0x30,0xc0,0x4e,0xcf,0xd0,0x64,0x52,0x64,0x5f,0x74, - 0xe2,0x9a,0x58,0xd0,0x4d,0x33,0x54,0x0e,0xe2,0xcf,0xd8,0x74,0x53,0x65,0xf6,0x7f, - 0xf2,0xf3,0x87,0x94,0xd9,0x8c,0x55,0x83,0xe6,0x40,0xd1,0x65,0xd2,0x66,0x0e,0x2e, - 0xfb,0xa8,0x09,0x45,0xc0,0x76,0x26,0x93,0x41,0x6f,0xd9,0x75,0xd3,0x67,0x0a,0x11, - 0x3b,0x88,0x82,0xe4,0x22,0xf5,0xc2,0xaa,0x49,0xaf,0xaa,0x6b,0x8e,0x04,0xc9,0x45, - 0x0f,0x58,0xea,0x1e,0x40,0x24,0xe8,0x5a,0x0a,0x96,0xba,0x3d,0xd4,0x63,0x59,0x27, - 0x2f,0x48,0x7b,0x05,0x65,0x65,0x29,0xcb,0x4a,0x42,0x74,0x6d,0xd4,0x04,0x8a,0xdf, - 0xcb,0x4a,0xc1,0x18,0x66,0x6a,0x63,0x5b,0x8a,0xbb,0xe3,0x19,0xba,0xc3,0xe2,0x3a, - 0x7c,0xa3,0x73,0x62,0xae,0x6d,0x6d,0x0a,0x0b,0x6c,0xd2,0x6c,0x5a,0x6c,0x75,0xb8, - 0xa0,0xf1,0x4c,0xbe,0xb7,0xa6,0x05,0x3a,0xf7,0xc6,0xda,0x7c,0x5b,0x6d,0xe7,0x2b, - 0xfa,0x91,0xa3,0xf8,0xfe,0xa5,0x2b,0x4d,0xb9,0x6a,0xd3,0x6d,0xda,0x6e,0x70,0x06, - 0xaf,0x8a,0x34,0xbf,0xbf,0xf4,0xea,0x9c,0xb4,0x43,0xdb,0x7d,0xdb,0x6f,0x3c,0xd0, - 0xa0,0x1f,0x6c,0x85,0x14,0x36,0x03,0x9e,0x10,0x10,0x9c,0xc6,0x11,0x25,0x28,0xcc, - 0x80,0x7f,0x77,0x76,0x9d,0x3c,0xe9,0xc2,0xc2,0x57,0xe4,0x90,0xfe,0x8c,0xc5,0xad, - 0xca,0x14,0x89,0xfe,0x11,0xb8,0x85,0xeb,0x62,0x5a,0x8d,0xa0,0x93,0x8d,0x6f,0x91, - 0xa0,0xf3,0xc7,0x6b,0x12,0x56,0x15,0x1f,0x40,0xd9,0xfa,0xcb,0x23,0x7b,0x84,0xfc, - 0xee,0x55,0xce,0xa6,0x73,0xb4,0xc4,0x62,0xe2,0x8c,0xd4,0xe4,0x72,0x74,0x5b,0x51, - 0x00,0x75,0x4e,0x50,0x03,0xa1,0x0c,0xd8,0x67,0xf7,0xdc,0xf4,0x73,0x75,0x85,0xf8, - 0x49,0x54,0xbd,0xe1,0xb4,0xe4,0x6d,0x64,0x64,0x47,0xd5,0xe5,0xf2,0x76,0xcd,0xe8, - 0xae,0xe0,0x5d,0xaa,0xd3,0xd7,0x05,0xd5,0x64,0x97,0xdd,0xf5,0xf3,0x77,0x38,0x51, - 0xa7,0x9e,0xdc,0x91,0x9b,0x3e,0xed,0x4a,0xc9,0xd2,0x10,0xd3,0xa2,0x87,0x19,0xb4, - 0x1a,0xf2,0x0e,0x7e,0x1d,0x57,0x6f,0xc6,0xca,0x3c,0x32,0xc7,0xa7,0x86,0x1d,0xc9, - 0x0b,0x5a,0x8b,0xf3,0x19,0xb2,0x90,0x4b,0x6a,0x52,0x2c,0x37,0x0f,0x3b,0xb5,0x67, - 0x40,0x81,0xcf,0xa2,0xb1,0x57,0xa0,0x5b,0xcd,0x5d,0xa4,0x23,0x0e,0x3a,0x42,0xcd, - 0x2c,0xcd,0x9f,0xdb,0xdd,0x7d,0x96,0x6d,0x87,0xa7,0xd6,0xec,0x7a,0x7c,0xf9,0xd9, - 0xa6,0x11,0xb6,0xf8,0x3b,0x3d,0x4d,0xae,0x8a,0x82,0xde,0xfc,0x7b,0x7d,0xe1,0xed, - 0x25,0x1c,0xa7,0x8d,0x17,0xc3,0x8d,0x15,0xee,0x1e,0xd7,0xed,0xfa,0x7e,0x27,0xd9, - 0xc0,0xfb,0xcf,0xdd,0xbb,0x3f,0xe4,0xc9,0xeb,0x1d,0xdf,0xfd,0xfb,0x7f,0x40,0x00, - 0x05,0x8d,0x0d,0x79,0x89,0xfc,0x3a,0x62,0xe7,0xc6,0xa7,0xd5,0xd0,0x6d,0x30,0x1e, - 0x47,0x88,0xd1,0x32,0x13,0x20,0x8c,0x4d,0xe6,0x80,0x28,0xc6,0x5b,0x50,0x63,0x63, - 0xdc,0x00,0x1a,0x49,0x75,0x9d,0x39,0x91,0x31,0xcd,0xe3,0x8c,0x3f,0x86,0xa8,0x23, - 0x89,0x88,0x1b,0x65,0x7e,0xf9,0xf9,0xaf,0xb3,0x68,0xc7,0x31,0x34,0x60,0x9b,0x73, - 0x55,0x3b,0xc0,0xbb,0x34,0xdf,0xab,0x75,0x42,0x25,0xf0,0x66,0x56,0xe4,0xc4,0xc9, - 0xf6,0x0c,0x7b,0xf1,0x95,0x46,0x18,0x70,0x46,0xc8,0xf8,0x76,0x57,0xe5,0x5b,0xe6, - 0x75,0x7b,0xe0,0xbe,0xdd,0xe6,0x43,0xe7,0xbe,0x41,0xf1,0x67,0xd6,0xe6,0x49,0xb9, - 0xe4,0x83,0xfb,0x25,0x34,0xc2,0x0b,0x5d,0xcb,0x4c,0xf9,0x77,0xd7,0xe7,0xa7,0xcc, - 0x54,0xc9,0x0a,0x06,0x2f,0x43,0x21,0x29,0x27,0x79,0xc7,0xdd,0xd0,0xa9,0xd5,0x9e, - 0x71,0x31,0xea,0xf6,0x6a,0x66,0x88,0x29,0x62,0x3a,0xc0,0x5e,0x09,0xab,0x8b,0x12, - 0xa8,0x07,0x59,0x49,0xd4,0xe6,0x1b,0xd2,0xfc,0x51,0xd3,0x2d,0xdd,0xe7,0xbb,0x99, - 0x05,0x53,0x03,0x13,0x18,0xab,0x1d,0xcb,0xcc,0x3e,0xa8,0x1f,0x5f,0xef,0x03,0x6e, - 0x08,0x3d,0xb8,0xb1,0xbd,0xed,0x8d,0x88,0x6a,0x38,0xf2,0x6e,0x5e,0xec,0x72,0x5f, - 0xf1,0xed,0xed,0x5b,0x19,0x3c,0x62,0x6e,0x51,0x70,0xfa,0x7e,0x5f,0xed,0x1d,0xcf, - 0xf6,0xac,0x23,0xc2,0xd7,0xaf,0xd3,0x75,0x42,0xb3,0xf3,0x6f,0xde,0xee,0xef,0x5f, - 0xf7,0xe7,0xbc,0x7b,0x1d,0xab,0x03,0x5c,0x4f,0x20,0xfb,0x7f,0xdf,0xef,0x87,0x60, - 0x22,0x41,0x8c,0x44,0xb6,0xb8,0x38,0xc5,0xc5,0x58,0xd4,0xe6,0x9a,0x7d,0x67,0xb6, - 0xd8,0xfd,0xcc,0xd6,0x20,0x3c,0xfc,0x8b,0xf5,0xd7,0xc4,0x34,0x74,0x93,0xe2,0xc3, - 0xa8,0x67,0x28,0x77,0xb8,0xbd,0x31,0x41,0x9b,0x5b,0xcd,0x25,0xf5,0x85,0xce,0xd3, - 0xe5,0x6e,0xd5,0x55,0x36,0xf5,0x35,0x66,0x44,0x2c,0x85,0x67,0x2a,0xfc,0x60,0xc2, - 0xa5,0x9a,0xe4,0xc6,0x36,0xb4,0xb3,0xcd,0x90,0xa5,0xf4,0xe6,0x76,0xf4,0xef,0xa0, - 0xcc,0xcf,0xec,0xd6,0x37,0xb5,0xc7,0xc2,0x17,0x97,0xfc,0xf6,0x77,0xf5,0x85,0xfc, - 0x82,0xd8,0xe5,0xc7,0xb6,0xb6,0x8b,0xc7,0x07,0x09,0xf5,0xe7,0xf6,0xf6,0x34,0x26, - 0x40,0x91,0xed,0xd7,0xb7,0xb7,0xba,0xdc,0x11,0xd5,0xfd,0xf7,0xf7,0xf7,0xc5,0x75, - 0x08,0x63,0x11,0xaa,0xbe,0xbb,0x56,0xeb,0xc1,0xd5,0x8e,0x7e,0x82,0xf7,0x06,0x78, - 0xac,0xfd,0xf4,0x14,0x9e,0xdc,0xb0,0x6a,0x57,0xda,0xba,0xf9,0xff,0xf1,0x27,0xaf, - 0x2d,0x97,0xe6,0x2f,0xf4,0xaa,0x7d,0x55,0x4f,0x9b,0x27,0x68,0xfe,0x0f,0x07,0x9d, - 0x2c,0x95,0xf5,0x1d,0x1e,0xfa,0x6f,0x66,0xa8,0x43,0x0d,0xdd,0x16,0x6a,0x6e,0x65, - 0x8d,0x1c,0xe6,0xce,0x3e,0xbc,0x88,0xce,0x19,0xd8,0xf6,0xee,0x7e,0xfc,0x0e,0x7a, - 0x23,0x10,0xee,0xde,0x3f,0xbd,0x25,0xfa,0x69,0xcc,0xfe,0xfe,0x7f,0xfd,0x1f,0x0d, - 0x1a,0xdf,0xe7,0xcf,0xbe,0xbe,0xa8,0xa3,0x95,0xed,0xf7,0xef,0xfe,0xfe,0x17,0x7b, - 0x50,0x20,0xef,0xdf,0xbf,0xbf,0x5c,0xdf,0xe9,0x2d,0xff,0xff,0x80,0xb9, -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_update.c deleted file mode 100644 index 7b4ef42e9c3..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3672 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.2 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - * V2.2: - * 1. multi-system supported - * 2. flashless update no pid vid compare - * By Meta, 2014/01/14 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include - -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_GLINK_LENGTH 0x3000 // 12k -#define FW_GWAKE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -u8 searching_file = 0; -u8 got_file_flag = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 is_950; -extern u8 after_912_1020; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); - -#if GTP_FL_LITTLE_SYSTEM -extern u8 power_is_down; -#endif - -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_gwake_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_ERROR("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->pid, "9158", 4) && !memcmp(update_msg.ic_fw_msg.pid, "915S", 4)) - { - GTP_INFO("Update GT915S to GT9158 directly!"); - return SUCCESS; - } - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} - -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_ERROR("INVALID gtp_default_FW, check your gt9xx_firmware.h file!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - if (update_msg.fw_total_len < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_ERROR("INVALID bin file(size: %d), update aborted.", update_msg.fw_total_len); - return FAIL; - } - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - return FAIL; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - return FAIL; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - if(retry >= MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - burn_length += frame_length; - burn_addr += frame_length; - } - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_INFO("[burn_fw_boot_isp]Begin burn boot_isp firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step9:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_INFO("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_gwake_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_GLINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_gwake_section(client, fw_link, 0x9000, FW_GLINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_GLINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_gwake_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_gwake(struct i2c_client *client) -{ - u8* fw_gwake = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the gwake code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_INFO("[burn_fw_gwake]Begin burn gwake firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_gwake]step1:alloc memory"); - while(retry++ < 5) - { - fw_gwake = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_gwake == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_gwake]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_gwake]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_gwake]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_gwake, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 1 fail."); - goto exit_burn_fw_gwake; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_gwake]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 1 fail."); - goto exit_burn_fw_gwake; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_gwake]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_gwake, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 2 fail."); - goto exit_burn_fw_gwake; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_gwake]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 2 fail."); - goto exit_burn_fw_gwake; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_gwake]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_gwake, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 3 fail."); - goto exit_burn_fw_gwake; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_gwake]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 3 fail."); - goto exit_burn_fw_gwake; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_gwake]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_gwake, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 4 fail."); - goto exit_burn_fw_gwake; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_gwake]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 4 fail."); - goto exit_burn_fw_gwake; - } - - update_msg.fw_burned_len += FW_GWAKE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_gwake: - kfree(fw_gwake); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8*)dir); //20121211 - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 20; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 50; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 60; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_gwake(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 80; - - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 90; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - msleep(100); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_AUTO_UPDATE_CFG && GTP_HEADER_FW_UPDATE) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if(ret <= 0) - { - GTP_ERROR("Update config failed."); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -#if GTP_AUTO_UPDATE -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} -#endif - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define FW_LITTLE_SS51_LENGTH (12 * 0x400) // 12K - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - path_put(&path); - path_put(&root_path); - return FAIL; - } - else - { - path_put(&path); - path_put(&root_path); - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - #if GTP_FL_LITTLE_SYSTEM - if (power_is_down) - { - GTP_DEBUG("System power is down, exit hold ss51 & dsp."); - return FAIL; - } - #endif - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - - after_912_1020 = 0; - if (!memcmp(fw_head->pid, "912", 3)) - { - if (fw_head->vid > 0x1020) - { - after_912_1020 = 1; - GTP_DEBUG("After 912_1020, config length set to 228"); - } - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -#if GTP_FL_LITTLE_SYSTEM -// blocksize: 256Bytes -u8 gup_burn_ss51_block(struct i2c_client *client, s32 block_section, s32 fw_block, u16 *fw_chksum) -{ - s32 ret = 0; - s32 index = 0; - s32 i = 0; - - GTP_DEBUG("Burn big ss51 block%d section%d (size: 256Bytes)", fw_block, block_section); - - switch (fw_block) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - index = FW_HEAD_LENGTH + (8 + fw_block-1)* 1024 * 2 + (block_section-1) * 256; - break; - - case 9: - case 10: - case 11: - index = FW_HEAD_LENGTH + (16 - fw_block) * 1024 * 2 + (block_section-1) * 256; - break; - default: - GTP_ERROR("Invalid firmware block: %d", fw_block); - return FAIL; - } - - ret = i2c_write_bytes(client, GTP_REG_BUFFER + (block_section - 1) * 256, - >p_default_FW_fl[index], 256); - - if (ret < 0) - { - GTP_ERROR("Failed to burn ss51 block%d section%d (size: 256Bytes)!", fw_block, block_section); - return FAIL; - } - - if (block_section == 1) - { - u16 chksum = 0; - - for (i = 0; i < (2 * 1024); i += 2) - { - chksum += ((gtp_default_FW_fl[index + i]) << 8) + (gtp_default_FW_fl[index + i + 1]); - } - *fw_chksum = chksum; - } - return SUCCESS; -} - -u8 gup_burn_ss51_seg_b(struct i2c_client *client, s32 size, u16 *fw_chksum) -{ - s32 ret = 0; - s32 i = 0; - u16 chksum = 0; - - GTP_DEBUG("Burn big ss51 Seg B(size: %dK)", size); - - ret = i2c_write_bytes(client, GTP_REG_SS51_SEG_B, - >p_default_FW_fl[FW_HEAD_LENGTH], size * 1024); - - if (ret < 0) - { - GTP_ERROR("Failed to Burn ss51 Seg B(size: %dK)", size); - return FAIL; - } - - for (i = 0; i < (size * 1024); i += 2) - { - chksum += ((gtp_default_FW_fl[FW_HEAD_LENGTH + i]) << 8) + gtp_default_FW_fl[FW_HEAD_LENGTH + i + 1]; - } - *fw_chksum = chksum; - return SUCCESS; -} - -static u8 gup_download_fw_little_ss51(struct i2c_client *client) -{ - s32 ret = 0; - GTP_INFO("Download little ss51"); - - GTP_DEBUG("Select Bank0."); - - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("Select bank0 fail."); - return FAIL; - } - - // Just write - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH + FW_SS51_LENGTH + FW_DSP_LENGTH], FW_LITTLE_SS51_LENGTH); - - - if (ret < 0) - { - GTP_ERROR("Failed to write little ss51."); - return FAIL; - } - - return SUCCESS; -} - -#endif - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - -#if GTP_FL_LITTLE_SYSTEM - if (GTP_FL_PWR_RESUME_BURN == dwn_mode) - { - return gup_download_fw_little_ss51(client); - } -#endif - - if (GTP_FL_FW_BURN == dwn_mode) - { - GTP_DEBUG("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_DEBUG("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif - -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 __gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode, int len) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_DEBUG("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_DEBUG("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - len); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - len); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - return __gup_download_fw_dsp(client, dwn_mode, FW_DSP_LENGTH); -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - -#if GTP_FL_LITTLE_SYSTEM - if (GTP_FL_PWR_RESUME_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin poweron resume little system download....."); - } -#endif - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - if (!memcmp(fw_head.pid, "950", 3)) - { - is_950 = 1; - GTP_DEBUG("GT9XXF IC Type: gt950"); - } - else - { - is_950 = 0; - } - - if (NULL != dir) - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - return SUCCESS; - -download_fail: - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 72; //80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - -int gup_reload_fw_dsp(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - u8 value = 0; - - if (NULL != dir) { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - if (FAIL == ret) { - GTP_ERROR("[reload_fw_dsp]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) { - ret = __gup_download_fw_dsp(i2c_client_point, dwn_mode, FW_DSP_LENGTH / 2); //reload 2k dsp code - if (FAIL == ret){ - GTP_ERROR("[reload_fw_dsp]burn dsp firmware fail."); - continue; - } - GTP_DEBUG("[reload_fw_dsp]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) { - GTP_ERROR("[reload_fw_dsp]retry timeout,RELOAD FW DSP FAIL."); - goto download_fail; - } - - if (NULL != dir) { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - } - ret = i2c_write_bytes(i2c_client_point, 0x801F, &value, 1); // clear gesture mode reg - if (ret == -1) - return FAIL; - else - return SUCCESS; - -download_fail: - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - } - return FAIL; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/kr076/touchpanel/mtk_tpd.c deleted file mode 100644 index fcc42e86f88..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,578 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) -int gesture_value; -char tpd_firmware_version_val[5]; -int tpd_config_version; -int tpd_x_line; -int tpd_y_line; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -u8 tpd_sensor_id; -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ -EXPORT_SYMBOL(gesture_value); -EXPORT_SYMBOL(tpd_firmware_version_val); -EXPORT_SYMBOL(tpd_config_version); -EXPORT_SYMBOL(tpd_x_line); -EXPORT_SYMBOL(tpd_y_line); -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -EXPORT_SYMBOL(tpd_sensor_id); -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - - - - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - - -static ssize_t hello_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", gesture_value); -} - - -static ssize_t hello_val_store(struct device* dev, struct device_attribute* attr, const char* buf, size_t count) { - int val = 0; - val = simple_strtol(buf, NULL, 10); - gesture_value = val; - return count; -} - -static ssize_t firmware_version_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%s\n", tpd_firmware_version_val); - -} -static ssize_t firmware_version_val_store(struct device* dev, struct device_attribute* attr, char* buf, size_t count) { - - return count; - -} -static ssize_t config_version_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%x\n", tpd_config_version); - -} -static ssize_t config_version_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - - return count; - -} -static ssize_t tpd_x_line_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%d\n", tpd_x_line); - -} -static ssize_t tpd_x_line_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - - return count; - -} -static ssize_t tpd_y_line_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%d\n", tpd_y_line); - -} -static ssize_t tpd_y_line_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - - return count; - -} - -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -static ssize_t sensor_id_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - return snprintf(buf, PAGE_SIZE, "%x\n", tpd_sensor_id); - -} -static ssize_t sensor_id_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - return count; -} -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - -static DEVICE_ATTR(gesture_val, S_IRUGO | S_IWUSR, hello_val_show, hello_val_store); -static DEVICE_ATTR(firmware_version, S_IRUGO | S_IWUSR, firmware_version_val_show, firmware_version_val_store); -static DEVICE_ATTR(cfg_version, S_IRUGO | S_IWUSR, config_version_val_show, config_version_val_store); -static DEVICE_ATTR(tpd_xline, S_IRUGO | S_IWUSR, tpd_x_line_val_show, tpd_x_line_val_store); -static DEVICE_ATTR(tpd_yline, S_IRUGO | S_IWUSR, tpd_y_line_val_show, tpd_y_line_val_store); -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -static DEVICE_ATTR(sensor_id, S_IRUGO | S_IWUSR, sensor_id_val_show, sensor_id_val_store); -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - - - - - - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - -//add by caoyang - if(device_create_file(&pdev->dev, &dev_attr_gesture_val) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_firmware_version) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_cfg_version) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_tpd_xline) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_tpd_yline) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - /*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ - /*MMI test app read sensor id to distinguish the tp manufacturer*/ - if(device_create_file(&pdev->dev, &dev_attr_sensor_id) < 0) { - printk(KERN_ERR"create sensor_id sys file failed!\n"); - } - /*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd.h b/arch/arm/mach-mt8127/kr076/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index a0b849fe5ad..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,431 +0,0 @@ -/* Copyright Statement: - * - * This software/firmware and related documentation ("MediaTek Software") are - * protected under relevant copyright laws. The information contained herein - * is confidential and proprietary to MediaTek Inc. and/or its licensors. - * Without the prior written permission of MediaTek inc. and/or its licensors, - * any reproduction, modification, use or disclosure of MediaTek Software, - * and information contained herein, in whole or in part, shall be strictly prohibited. - */ -/* MediaTek Inc. (C) 2010. All rights reserved. - * - * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES - * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") - * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON - * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE - * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR - * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH - * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES - * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES - * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK - * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR - * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND - * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, - * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, - * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO - * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. - * - * The following software/firmware and/or related documentation ("MediaTek Software") - * have been modified by MediaTek Inc. All revisions are subject to any receiver's - * applicable license agreements with MediaTek Inc. - */ - -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include -#ifdef MT6575 -#include -#include -#include -#endif -#ifdef MT6577 -#include -#include -#include -#endif -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client,u8 *buf,s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); - -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 // driver send config to TP in intilization -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 0 // turn off/on power on suspend/resume - -#define GTP_AUTO_UPDATE 0 // auto updated fw by .bin file -#define GTP_HEADER_FW_UPDATE 0 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 0 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF -#define GTP_FL_LITTLE_SYSTEM 0 // power off/on on suspend/resume, gt9xxf with an interim firwmare for it, - // function together with GTP_COMATIBLE_MODE & GTP_POWER_CTRL_SLEEP -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 1 // esd protection with a cycle of 2 seconds -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect - -#define GTP_WITH_PEN 0 -#define GTP_PEN_HAVE_BUTTON 0 // active pen has buttons, functions together with GTP_WITH_PEN - -#define GTP_GESTURE_WAKEUP 1 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON // report key as coordinate,Vibration feedback -//#define TPD_WARP_X // mirrored x coordinate -//#define TPD_WARP_Y // mirrored y coordinate -#define GTP_DEBUG_ON 1 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -// Sensor_ID Map: -/* sensor_opt1 sensor_opt2 Sensor_ID - GND GND 0 - VDDIO GND 1 - NC GND 2 - GND NC/300K 3 - VDDIO NC/300K 4 - NC NC/300K 5 -*/ -// TODO: define your own default or for Sensor_ID == 0 config here. -// The predefined one is just a sample config, which is not suitable for your tp in most cases. -#define CTP_CFG_GROUP1 {\ -0x54,0x00,0x04,0x58,0x02,0x05,0x34,0x00,0x01,0xCF,0x0F,0x0F,0x4B,0x32,0x03,0x03,\ -0x00,0x00,0x00,0x00,0x01,0x00,0x06,0x15,0x17,0x1C,0x14,0x88,0x08,0x0A,0x43,0x00,\ -0xD3,0x07,0x00,0x00,0x01,0x80,0x03,0x11,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x19,0x66,0x94,0xD5,0x02,0x08,0x00,0x00,0x04,0xC8,0x1D,0x00,0xA8,\ -0x26,0x00,0x8C,0x32,0x00,0x80,0x43,0x00,0x6E,0x59,0x00,0x6E,0x00,0x00,0x00,0x00,\ -0xF0,0x50,0x35,0x88,0x88,0x27,0x20,0x32,0x00,0x11,0x04,0x80,0x0A,0x0A,0x1F,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x28,\ -0x24,0x22,0x20,0x1F,0x1E,0x1D,0x0E,0x0C,0x0A,0x08,0x06,0x05,0x04,0x02,0xFF,0xFF,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x89,0x01\ -} -// TODO: define your config for Sensor_ID == 1 here, if needed -#define CTP_CFG_GROUP2 {\ - } -// TODO: define your config for Sensor_ID == 2 here, if needed -#if 0 -#define CTP_CFG_GROUP3 {\ -0x53,0x00,0x04,0x58,0x02,0x05,0x34,0x00,0x01,0xCF,0x0F,0x0F,0x4B,0x32,0x03,0x03,0x00,0x00,0x00,0x00,0x01,0x00,0x06,0x17,0x19,0x1D,0x14,\ -0x88,0x08,0x0A,0x43,0x00,0xD3,0x07,0x00,0x00,0x01,0x80,0x03,0x1D,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x66,0x94,\ -0xD5,0x02,0x08,0x00,0x00,0x04,0xC8,0x1D,0x00,0xA8,0x26,0x00,0x8C,0x32,0x00,0x80,0x43,0x00,0x6E,0x59,0x00,0x6E,0x00,0x00,0x00,0x00,0xF0,\ -0x50,0x35,0x88,0x88,0x27,0x20,0x32,0x00,0x11,0x04,0x80,0x0A,0x0A,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x28,0x24,0x22,0x20,0x1F,0x1E,0x1D,0x0E,0x0C,0x0A,0x08,0x06,0x05,0x04,0x02,0xFF,0xFF,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x01\ -} -#else -//chenhui change -#define CTP_CFG_GROUP3 {\ -0x56,0x00,0x04,0x58,0x02,0x05,0x34,0x00,0x01,0x0F,0x0F,0x0F,0x55,0x41,0x03,0x03,\ -0x00,0x00,0x00,0x00,0x21,0x21,0x06,0x14,0x14,0x1B,0x14,0x88,0x08,0x0A,0x43,0x00,\ -0xD3,0x07,0x00,0x00,0x00,0x81,0x02,0x1D,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x19,0x66,0x94,0xD5,0x02,0x08,0x00,0x00,0x04,0xC8,0x1D,0x00,0xA8,\ -0x26,0x00,0x8C,0x32,0x00,0x80,0x43,0x00,0x6E,0x59,0x00,0x6E,0x00,0x00,0x00,0x00,\ -0xF0,0x50,0x35,0x88,0x88,0x27,0x20,0x32,0x00,0x11,0x04,0x80,0x0A,0x0A,0x1F,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x00,\ -0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x28,\ -0x24,0x22,0x20,0x1F,0x1E,0x1D,0x0E,0x0C,0x0A,0x08,0x06,0x05,0x04,0x02,0xFF,0xFF,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0xD4,0x01\ -} -#endif - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - -// STEP_2(REQUIRED): Customize your I/O ports & I/O operations here -#define TPD_POWER_SOURCE_CUSTOM MT6323_POWER_LDO_VGP2// define your power source for tp if needed -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -// STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG - #define GTP_MAX_HEIGHT 800 - #define GTP_MAX_WIDTH 480 - #define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1024 - #define GTP_MAX_WIDTH 600 - #define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY - #define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.2.7<2014/12/26>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -// buffer -#define GTP_REG_BUFFER 0xB026 - -#define GTP_REG_SS51_SEG_B 0xC000 -#define GTP_REG_CHECKINFO 0xBF00 - -// State1 -#define GTP_REG_STATE1 0xBF08 -#define BUFFER_FULL 0x01 -#define CHECK_COMPLETE 0x02 -#define CHECK_ERROR 0x03 -#define WAIT_CHECK 0x04 // others: invalid - -// State2 -#define GTP_REG_STATE2 0xBF07 -#define IS_A_SEG 0x01 -#define IS_B_SEG_FIRST 0x02 -#define IS_B_SEG_OTHER 0x03 -#define IS_B_SEG_LAST 0x04 // others: invalid - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 -#define GTP_FL_PWR_RESUME_BURN 0x03 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define GTP_HOPPING_SEND 0 -#define GTP_HOPPING_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_STORE_HOPPING 0x05 -#define GTP_RQST_STORE_BAK_REF 0x06 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - -#define I2C_MASTER_CLOCK 300 -#define I2C_BUS_NUMBER 1 // I2C Bus for TP, mt6572 -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/kr076/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/kr076/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/kr076/vibrator/Makefile b/arch/arm/mach-mt8127/kr076/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/kr076/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/kr076/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/Makefile b/arch/arm/mach-mt8127/kr076_nand/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom.h b/arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/Makefile b/arch/arm/mach-mt8127/kr076_nand/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.c b/arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.h b/arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/kr076_nand/accelerometer/cust_acc.c deleted file mode 100644 index 79fce265ee4..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 4,//huichen@tcl.com change Gsensor direction - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/kr076_nand/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.c b/arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.h b/arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/Makefile b/arch/arm/mach-mt8127/kr076_nand/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/alsps.c b/arch/arm/mach-mt8127/kr076_nand/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/alsps.h b/arch/arm/mach-mt8127/kr076_nand/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/cust_alsps.c b/arch/arm/mach-mt8127/kr076_nand/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/kr076_nand/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/kr076_nand/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/cam_cal/Makefile b/arch/arm/mach-mt8127/kr076_nand/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/kr076_nand/camera/camera/Makefile b/arch/arm/mach-mt8127/kr076_nand/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/kr076_nand/camera/camera/dummyds.c b/arch/arm/mach-mt8127/kr076_nand/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.c deleted file mode 100644 index 0a5189d7ef2..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,622 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - - u32 pinSetIdx = 0;//default main sensor - u32 pinSetIdxTmp = 0; - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - - u32 pinSet[2][8] = - { - //for main sensor - { - GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - { - GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx) - { - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) - { - pinSetIdx = 1; - } - - - //power ON - if (On) - { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx == 1) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_HI708_YUV,currSensorName))) - { - PK_DBG("[CAMERA SENSOR] kdCISModulePowerOn get in---GC2145_YUV sensorIdx:%d; pinSetIdx=%d\n",SensorIdx, pinSetIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800/*VOL_2800*/,mode_name)) //IO - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) //AVDD - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1800,mode_name)) //DVDD no use - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - - //PDN/STBY pin - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) - { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } - - //disable inactive sensor - if(pinSetIdx == 0) //disable sub - { - pinSetIdxTmp = 1; - } - else - { - pinSetIdxTmp = 0; - } -#if 1 - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdxTmp][IDX_PS_CMRST]) - { - if(mt_set_gpio_mode(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - - if(mt_set_gpio_dir(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); //high == power down lens module - } - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } -#endif - //while(1); - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2680_RAW ,currSensorName))) { - //OV5648 Power UP - //First Power Pin low and Reset Pin Low - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable IO power\n"); - goto _kdCISModulePowerOn_exit_; - } - { - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN], GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(10); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST], GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(10); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - } - - msleep(20); - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - goto _kdCISModulePowerOn_exit_; - } - - //if(TRUE != hwPowerOn(PMIC_APP_MAIN_CAMERA_POWER_D, VOL_1500,mode_name)) - // { - // PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - // goto _kdCISModulePowerOn_exit_; - // } - - - // wait power to be stable - mdelay(25); - - -; - } - else if ((pinSetIdx == 0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_S5K5E2YA_MIPI_RAW,currSensorName))) - { - PK_DBG("[CAMERA SENSOR] kdCISModulePowerOn get in---GC2145_YUV sensorIdx:%d; pinSetIdx=%d\n",SensorIdx, pinSetIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800/*VOL_2800*/,mode_name)) //IO - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) //AVDD - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1200,mode_name)) //DVDD no use - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - - //PDN/STBY pin - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) - { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } - - //disable inactive sensor - if(pinSetIdx == 0) //disable sub - { - pinSetIdxTmp = 1; - } - else - { - pinSetIdxTmp = 0; - } -#if 1 - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdxTmp][IDX_PS_CMRST]) - { - if(mt_set_gpio_mode(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - - if(mt_set_gpio_dir(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); //high == power down lens module - } - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } -#endif - //while(1); - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2355_RAW,currSensorName))) - { - PK_DBG("[CAMERA SENSOR] kdCISModulePowerOn get in---GC2145_YUV sensorIdx:%d; pinSetIdx=%d\n",SensorIdx, pinSetIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800/*VOL_2800*/,mode_name)) //IO - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) //AVDD - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1800,mode_name)) //DVDD no use - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - - //PDN/STBY pin - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) - { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); - } - msleep(3); - - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } - - //disable inactive sensor - if(pinSetIdx == 0) //disable sub - { - pinSetIdxTmp = 1; - } - else - { - pinSetIdxTmp = 0; - } -#if 1 - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdxTmp][IDX_PS_CMRST]) - { - if(mt_set_gpio_mode(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_MODE])) - { - PK_DBG("[CAMERA LENS] set gpio mode failed!! \n"); - } - - if(mt_set_gpio_dir(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA LENS] set gpio dir failed!! \n"); - } - - if(mt_set_gpio_out(pinSet[pinSetIdxTmp][IDX_PS_CMPDN],pinSet[pinSetIdxTmp][IDX_PS_CMPDN+IDX_PS_ON])) - { - PK_DBG("[CAMERA LENS] set gpio failed!! \n"); //high == power down lens module - } - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])) - { - PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n"); - } - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)) - { - PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n"); - } - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])) - { - PK_DBG("[CAMERA SENSOR] set gpio failed!! \n"); - } - msleep(3); - } -#endif - //while(1); - } - else{ - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/common/combo_nand.h b/arch/arm/mach-mt8127/kr076_nand/common/combo_nand.h deleted file mode 100644 index 3a7677056c3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/common/combo_nand.h +++ /dev/null @@ -1,2 +0,0 @@ -#define COMBO_NAND_BLOCK_SIZE 4194304 -#define COMBO_NAND_PAGE_SIZE 16384 diff --git a/arch/arm/mach-mt8127/kr076_nand/common/partition_define.h b/arch/arm/mach-mt8127/kr076_nand/common/partition_define.h deleted file mode 100644 index 68e9b1311f9..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/common/partition_define.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0)//(0xa8) - -#ifdef CONFIG_MTK_EMMC_SUPPORT -#define PART_NUM 25 -#else -extern int get_part_num_nand(); - -#define PART_NUM get_part_num_nand() -#endif - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info PartInfo[PART_MAX_COUNT]; -//extern struct excel_info *PartInfo; - - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/common/partition_define_private.h b/arch/arm/mach-mt8127/kr076_nand/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/kr076_nand/common/pmt.h b/arch/arm/mach-mt8127/kr076_nand/common/pmt.h deleted file mode 100644 index 50a1bd4077a..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/common/pmt.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -#define REGION_LOW_PAGE 0x004C4F57 -#define REGION_FULL_PAGE 0x46554C4C -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region *///will be used as download type on L branch. xiaolei - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/kr076_nand/core/Makefile b/arch/arm/mach-mt8127/kr076_nand/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/core/board-custom.h b/arch/arm/mach-mt8127/kr076_nand/core/board-custom.h deleted file mode 100644 index ead77cd2c9e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/core/board-custom.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -//#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#define CFG_DEV_MSDC1_CORRECTION //[PLATFORM]Added by SZTCT.leo.guo 04.18.2015, Fixed TF card hotplug issue. -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/kr076_nand/core/board.c b/arch/arm/mach-mt8127/kr076_nand/core/board.c deleted file mode 100644 index d2edca3461f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/core/board.c +++ /dev/null @@ -1,846 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mtk_nand_host_hw mtk_nand_hw = { -//struct mt6575_nand_host_hw mt6575_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/core/logger_custom.h b/arch/arm/mach-mt8127/kr076_nand/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/kr076_nand/dct/dct/Makefile b/arch/arm/mach-mt8127/kr076_nand/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/dct/dct/codegen.dws b/arch/arm/mach-mt8127/kr076_nand/dct/dct/codegen.dws deleted file mode 100755 index d4bebc55cbe64e7f0b763f13e3f81c2c059e3fd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23252 zcmeHP$#SGd5N+>!g!knWe3N=2>^TksBoS($4YbB{;^MFI#h+~FD|l2=DumPxh`_OX7jadpU9Rs&(F8NZ~hS#W;94_|9Tqy+Kj$#2E(_Lprvt< zSJ&dxO({+s#=(yG??hhhv$EaiS=^>s(X{)lFm89JM)@*{dsGejy7@?9b*yG7+)pL3 z59=W|)QmV^y=&nj7dPg2YlYp^q$F%?zIuttafo$s83Uh=Lm$o9JUcxOaV{>$x^b|h z{V1DRdC?(hlc;I)vd)fOd`O}TKmy%7^$&!*V_h6GR=_C#FWj{jU%>4SZQvpBpf7h} zJ%sfT)&p;R_71w%dBOWDB=5nv*J@q&VMkv#Tcy?3suy{6&8)+%*B8UsA4D+^L1lB* z%A3jU#i5>h1_BN?;%f;!ok#2Np$(7vH~XZ$iOb#DDVf|1?0Ykv`!c;Rp&Ui|*g5?y z7z2MtZ!-+b31{Nuh7t~yGXb+NFs^+N_>;+)-6#l@sB&tY<+oWcX~ z$em9TU;8i)cG!lCa}>u(+T43((HK76mkT!L8Wv;R>{m@>3UPLvG>btWjT7m5_JEk- zH1^Vg973RA0~UuYiAzk#rE!Tz$y}TqCGC*L=Gno7jaaTUL;4u4i^;TMfn?kGyseYS zciUl-1rx=yiBO(9o37?=#w?09N;6B(j`1!g`lGSZF~e!>r3cc)&EXP@aSrTJM-~`s z;%e-N*2|iv_ywl+JrtL`>9N#_!5G#}JEXCBb{vBk;!zIc`tbqRo^#+vHxIR=^8&Ht zl@c~`s*eNgY;(B8(h_5j!CmWd?5W}MSU_rCweI7WHt?_SC}*$hjv|SUyQ5%ctR7P9 zm<^h-d3HKpGeliuX}v=|9(SmTwGptF--|SFAcsiaJ`UBNiT6dB<+C)FttAlYr|h#B z;iPINQfV0IIt6td<4g6E1ejUrmt^n6G!k@X&{D_vvfX_puWIj`90qgqC4&u(NhmvO zxBp6nnc6PSTgl_DxV0`L$nMrdlDf*Q-;JaH8&SH$B5xQI93hstQ7AdlBaB0#Pc_E467k07?ABV90k@+&@DO;=XI@wjVLj;ez#nwrvW$(l zJ1xy6yZ2L$Kix9OIo^ zmy1g*H*O9WevHw0T8H25!^URv`gRiVHsNXxpkw}&(0vpbTkmtnPxXQICgHN4rRxp2 z9ixE3eLwJ}hk`E^N>r%7e!6>2D+MDesBo z$j9%mLe{C+KHPvw)*ml@e8M(|`j*>0`XYVhA?<@ULHX0_gvH9QReEgL>l7cqLHhNGQTf3(GA=hHtm>4%sS z)Sw9@nk5_~umOx_1prlHPec;{@;_G%F73t0t1V0a3U)En@(!&<17P<50w`bdD z=HEgLN0|8+Npcbhr|f_{&TKf9ode=A6BlwmngEcCMkBpyi()HWsGrFeUsrA2M2&H+ zMS;duR}p8b%kpR@WOr-w7_ehYbg#V|oZupw#97hGpN^$*vw0zXE_N(*{4VLCzL*X; ziYE7d@VR6eei3uXk2=)JCcRNRD)R_IIsqhhDG8i-o=d|zc~{p7URKO~KI{S!xK=)i zb?}Q6+F!FEbPML#P!l-m8JJiQ;llScPW2~oJ$h|L;*&rwf1!wf61q9-dfUE-k8on`}Q`cQsi%-;o*vk1g8j24Ku;c7>T!@3qoTUz=nL{_s=jPB|dfC`X z00V$=S~T+0mEp8w4OMn^t-_fjE{n^o%Exsx!$lO|SR~Anp7F(nU^36KLlJYQppKNm V{K)!Q$e09kxQlq7AEefC`wz@8^lShC diff --git a/arch/arm/mach-mt8127/kr076_nand/eeprom/Makefile b/arch/arm/mach-mt8127/kr076_nand/eeprom/Makefile deleted file mode 100755 index 6ec6676af91..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/eeprom/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_eeprom.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.c b/arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.c deleted file mode 100644 index faafd31f13b..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Driver for EEPROM - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/Makefile b/arch/arm/mach-mt8127/kr076_nand/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/kr076_nand/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/kr076_nand/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/kr076_nand/hdmi/Makefile b/arch/arm/mach-mt8127/kr076_nand/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/kr076_nand/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/kr076_nand/headset/Makefile b/arch/arm/mach-mt8127/kr076_nand/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.c b/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.h b/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076_nand/keypad/Makefile b/arch/arm/mach-mt8127/kr076_nand/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd.h deleted file mode 100644 index 68cd85c239f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -/*[BUG-FIX]-MOD-BEGIN BY TCTSZ huichen@tcl.com pr971671 long press powerkey */ -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ -/*[BUG-FIX]-MOD-END BY TCTSZ huichen@tcl.com pr971671 long press powerkey */ -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/kr076_nand/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/kr076_nand/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/kr076_nand/lcm/Makefile b/arch/arm/mach-mt8127/kr076_nand/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/kr076_nand/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/kr076_nand/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/kr076_nand/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/kr076_nand/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/kr076_nand/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/kr076_nand/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/kr076_nand/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/kr076_nand/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/leds/Makefile b/arch/arm/mach-mt8127/kr076_nand/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/Makefile b/arch/arm/mach-mt8127/kr076_nand/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/dummy_lens.c b/arch/arm/mach-mt8127/kr076_nand/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/kr076_nand/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/Makefile b/arch/arm/mach-mt8127/kr076_nand/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.c b/arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.h b/arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/kr076_nand/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/kr076_nand/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.c b/arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.h b/arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter.h b/arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter.h deleted file mode 100644 index c2359514566..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 2834 -#define Q_MAX_POS_25 2834 -#define Q_MAX_POS_0 2834 -#define Q_MAX_NEG_10 2834 - -#define Q_MAX_POS_50_H_CURRENT 2771 -#define Q_MAX_POS_25_H_CURRENT 2771 -#define Q_MAX_POS_0_H_CURRENT 2771 -#define Q_MAX_NEG_10_H_CURRENT 2771 - -/*[BUGFIX]-Add-BEGIN by TCTSZ.pingao.yang, 4/15/2015, pr-975290, change fg integration way */ -/* Discharge Percentage */ -#define OAM_D5 0 // 1 : D5, 0: D2 -/*[BUGFIX]-Add-end by TCTSZ.pingao.yang, 4/15/2015*/ - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 40 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 90 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 30 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 1800 //30 * 60 = 30 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -/*[BUGFIX]-Add-BEGIN by TCTSZ.pingao.yang, 4/15/2015, */ -#define MAX_SUSPEND_CURRENT 420 // 42 mA -#define MIN_SUSPEND_CURRENT 0 // 0 mA -#define DEFAUL_SUSPEND_CURRENT 120 //12mA -#define SUSPEND_CURRENT_SETP 30 //3mA -#define SLEEP_AFTER_FG_DIFF 3 // diff about 3% -#define UI_REDUCE_CURRENT 180 //18mA -#define SLEEP_REDUCE_CURRENT 60 //6mA -/*[BUGFIX]-Add-END by TCTSZ.pingao.yang */ - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter_table.h deleted file mode 100644 index e4e80ee0c05..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/power/cust_battery_meter_table.h +++ /dev/null @@ -1,947 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} - -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} - -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0 ,4174}, - {2 ,4151}, - {4 ,4131}, - {6 ,4113}, - {8 ,4096}, - {10 ,4080}, - {11 ,4065}, - {13 ,4048}, - {15 ,4030}, - {17 ,4013}, - {19 ,3998}, - {21 ,3984}, - {23 ,3972}, - {25 ,3961}, - {27 ,3950}, - {29 ,3938}, - {30 ,3927}, - {32 ,3917}, - {34 ,3907}, - {36 ,3897}, - {38 ,3887}, - {40 ,3874}, - {42 ,3858}, - {44 ,3840}, - {46 ,3828}, - {48 ,3819}, - {50 ,3811}, - {51 ,3805}, - {53 ,3800}, - {55 ,3794}, - {57 ,3790}, - {59 ,3785}, - {61 ,3782}, - {63 ,3778}, - {65 ,3776}, - {67 ,3775}, - {69 ,3773}, - {71 ,3770}, - {72 ,3767}, - {74 ,3763}, - {76 ,3757}, - {78 ,3748}, - {80 ,3740}, - {82 ,3729}, - {84 ,3713}, - {86 ,3695}, - {88 ,3687}, - {90 ,3684}, - {91 ,3681}, - {93 ,3677}, - {95 ,3662}, - {97 ,3594}, - {98 ,3481}, - {99,3450}, - {100,3420} - -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {153,4174}, - {153,4151}, - {155,4131}, - {158,4113}, - {160,4096}, - {162,4080}, - {167,4065}, - {170,4048}, - {172,4030}, - {173,4013}, - {177,3998}, - {177,3984}, - {182,3972}, - {185,3961}, - {187,3950}, - {188,3938}, - {190,3927}, - {193,3917}, - {195,3907}, - {198,3897}, - {200,3887}, - {195,3874}, - {185,3858}, - {172,3840}, - {167,3828}, - {165,3819}, - {163,3811}, - {167,3805}, - {168,3800}, - {170,3794}, - {173,3790}, - {173,3785}, - {177,3782}, - {178,3778}, - {182,3776}, - {187,3775}, - {190,3773}, - {192,3770}, - {193,3767}, - {195,3763}, - {193,3757}, - {192,3748}, - {195,3740}, - {197,3729}, - {195,3713}, - {193,3695}, - {193,3687}, - {203,3684}, - {220,3681}, - {240,3677}, - {258,3662}, - {255,3594}, - {293,3481}, - {305,3382}, - {255,3353}, - {233,3338}, - {215,3329}, - {210,3323}, - {202,3318}, - {198,3316}, - {193,3314}, - {188,3313}, - {188,3311}, - {187,3312}, - {185,3310}, - {187,3310}, - {187,3309}, - {185,3307}, - {182,3308}, - {183,3307}, - {182,3307}, - {183,3307}, - {185,3307}, - {187,3306}, - {185,3306}, - {185,3306}, - {183,3305}, - {188,3304}, - {187,3303}, - {188,3302}, - {185,3301}, - {185,3301}, - {187,3301}, - {185,3300}, - {187,3300}, - {167,3300} -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/kr076_nand/power/cust_charging.h b/arch/arm/mach-mt8127/kr076_nand/power/cust_charging.h deleted file mode 100644 index 1b4b1f01eb0..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/power/cust_charging.h +++ /dev/null @@ -1,129 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 55 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 50 //47 Fixed to 50 degree for according to standard -#define MIN_CHARGE_TEMPERATURE 2 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 4 //6 Fixed to 2 degree accoding to TCL standard -#define MAX_LIMIT_CHARGE_TEMPERATURE 45 -#define MIN_LIMIT_CHARGE_TEMPERATURE 43 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 230 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_1000_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_1000_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -/* [PLATFORM]-Add-BEGIN by TCTSZ.leo.guo, 04/15/2015, modify ntc temperature function */ -#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -/* [PLATFORM]-Add-END by TCTSZ.leo.guo */ -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 -/* [PLATFORM]-Add-BEGIN by TCTSZ.leo.guo, 04/15/2015, modify ntc temperature function */ -#define MTK_BATTERY_PROTECT_FEATURE -/* [PLATFORM]-Add-END by TCTSZ.leo.guo */ -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/kr076_nand/power/cust_diso.h b/arch/arm/mach-mt8127/kr076_nand/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/power/cust_pe.h b/arch/arm/mach-mt8127/kr076_nand/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/kr076_nand/power/cust_pmic.h b/arch/arm/mach-mt8127/kr076_nand/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/kr076_nand/rtc/rtc-mt.h b/arch/arm/mach-mt8127/kr076_nand/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/sound/Makefile b/arch/arm/mach-mt8127/kr076_nand/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/kr076_nand/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/kr076_nand/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/kr076_nand/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/kr076_nand/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/kr076_nand/ssw/Makefile b/arch/arm/mach-mt8127/kr076_nand/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/ssw/inc/ssw.h b/arch/arm/mach-mt8127/kr076_nand/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/kr076_nand/ssw/sim_switch.c b/arch/arm/mach-mt8127/kr076_nand/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/Makefile b/arch/arm/mach-mt8127/kr076_nand/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/goodix_tool.c deleted file mode 100644 index d38808f13e7..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/goodix_tool.c +++ /dev/null @@ -1,620 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * V2.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - * V2.2:2014/01/14, compatible with Linux 3.10 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - * V2.2.7 - * Special edition for GT910 flashless - * 1. modified to support gesture wakeup module - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include - -#include "tpd_custom_gt9xx.h" -extern int gtp_autotool_setting; - -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag£¬0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif - -static struct proc_dir_entry *goodix_proc_entry; - -static ssize_t goodix_tool_read(struct file *, char __user *, size_t, loff_t *); -static ssize_t goodix_tool_write(struct file *, const char __user *, size_t, loff_t *); -static const struct file_operations tool_ops = { - .owner = THIS_MODULE, - .read = goodix_tool_read, - .write = goodix_tool_write, -}; - -//static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -//static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data ); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; -static void tool_set_proc_name(char * procname) -{ - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode"); - //sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); - //memset(procname, 0, 20); - //sprintf(procname, "goodix_tool"); - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); - //goodix_proc_entry = create_proc_entry(procname, 0666, NULL); - goodix_proc_entry = proc_create(procname, 0666, NULL, &tool_ops); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - //goodix_proc_entry->write_proc = goodix_tool_write; - //goodix_proc_entry->read_proc = goodix_tool_read; - } - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -//static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -ssize_t goodix_tool_write(struct file *filp, const char __user *buff, size_t len, loff_t *off) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - - GTP_DEBUG("[Operation]wr: %02X", cmd_head.wr); - GTP_DEBUG("[Flag]flag: %02X, addr: %02X%02X, value: %02X, relation: %02X", cmd_head.flag, cmd_head.flag_addr[0], - cmd_head.flag_addr[1], cmd_head.flag_val, cmd_head.flag_relation); - GTP_DEBUG("[Retry]circle: %d, times: %d, retry: %d, delay: %d", (s32)cmd_head.circle, (s32)cmd_head.times, - (s32)cmd_head.retry, (s32)cmd_head.delay); - GTP_DEBUG("[Data]data len: %d, addr len: %d, addr: %02X%02X, buffer len: %d, data[0]: %02X", (s32)cmd_head.data_len, - (s32)cmd_head.addr_len, cmd_head.addr[0], cmd_head.addr[1], (s32)len, buff[CMD_HEAD_LENGTH]); - - if (1 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return -EPERM; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return -EPERM; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - } - else if (3 == cmd_head.wr) //Write ic type - { - gtp_autotool_setting = 1; - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - return -EPERM; - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - } -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return -EPERM; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - memcpy(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return -EPERM; - } - } - -#endif - - return len; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -//static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data ) -ssize_t goodix_tool_read(struct file *file, char __user *page, size_t size, loff_t *ppos) -{ - s32 ret = 0; - - GTP_DEBUG_FUNC(); - - if (*ppos) // ADB call again - { - //GTP_DEBUG("[HEAD]wr: %d", cmd_head.wr); - //GTP_DEBUG("[PARAM]size: %d, *ppos: %d", size, (int)*ppos); - //GTP_DEBUG("[TOOL_READ]ADB call again, return it."); - return 0; - } - - if (cmd_head.wr % 2) - { - return -EPERM; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return -EPERM; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= len; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return -EPERM; - } - - //memcpy(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - ret = simple_read_from_buffer(&page[loc], size, ppos, &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret < 0) - { - return ret; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - return cmd_head.data_len; - } - else if (2 == cmd_head.wr) - { - ret = simple_read_from_buffer(page, size, ppos, IC_TYPE, sizeof(IC_TYPE)); - return ret; - } - else if (4 == cmd_head.wr) - { - u8 progress_buf[4]; - progress_buf[0] = show_len >> 8; - progress_buf[1] = show_len & 0xff; - progress_buf[2] = total_len >> 8; - progress_buf[3] = total_len & 0xff; - - ret = simple_read_from_buffer(page, size, ppos, progress_buf, 4); - return ret; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - ret = simple_read_from_buffer(page, size, ppos, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - return ret; - } - - return -EPERM; -} diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_driver.c deleted file mode 100644 index f345e4482d0..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,4127 +0,0 @@ -/* Copyright Statement: - * - * This software/firmware and related documentation ("MediaTek Software") are - * protected under relevant copyright laws. The information contained herein - * is confidential and proprietary to MediaTek Inc. and/or its licensors. - * Without the prior written permission of MediaTek inc. and/or its licensors, - * any reproduction, modification, use or disclosure of MediaTek Software, - * and information contained herein, in whole or in part, shall be strictly prohibited. - * - * MediaTek Inc. (C) 2012. All rights reserved. - * - * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES - * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") - * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON - * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE - * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR - * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH - * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES - * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES - * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK - * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR - * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND - * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, - * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, - * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO - * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. - * - * The following software/firmware and/or related documentation ("MediaTek Software") - * have been modified by MediaTek Inc. All revisions are subject to any receiver's - * applicable license agreements with MediaTek Inc. - */ - -/* - * Version: V2.0 - * Release Date: 2013/08/28 - * Contact: andrew@goodix.com, meta@goodix.com - * Revision Record: - * V1.4: - * 1. New Heartbeat/ESD-protect Mechanism(external watchdog) - * 2. doze mode, sliding wakeup - * 3. config length verification & 3 more config groups(GT9 Sensor_ID: 0 ~ 5) - * 4. charger status switch - * By Meta, 2013/03/11 - * V1.6: - * 1. pen/stylus support - * 2. slide wakeup, new esd optimization - * By Meta, 2013/04/18 - * V1.8: - * 1. read double check & fixed config support - * 2. other optimizations - * By Meta, 2013/06/08 - * V2.0: - * 1. compatible with GT9XXF - * 2. I2C DMA support - * By Meta, 2013/08/28 - * V2.2: - * 1. update gt9xx_config to compatible with Linux 3.10 - * 2. gesture wakeup - * 3. pen separate input device, active-pen button support - * 4. coordinates & keys optimization - * 5. no longer support GT915S - * By Meta, 2014/01/14 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - * V2.2.7 - * Special edition for GT910 flashless - * 1. modified to support gesture wakeup module - */ - -#include "tpd.h" -#include "tpd_custom_gt9xx.h" -#include - -#ifndef TPD_NO_GPIO -#include "cust_gpio_usage.h" -#endif -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif - -extern int gesture_value; -extern char tpd_firmware_version_val[5]; -extern int tpd_config_version; -extern int tpd_x_line; -extern int tpd_y_line; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -extern u8 tpd_sensor_id; -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - -int gtp_autotool_setting; -EXPORT_SYMBOL(gtp_autotool_setting); -extern struct tpd_device *tpd; - -static int tpd_sleep_flag = 0; -static int tpd_flag = 0; -int tpd_halt = 0; -static struct task_struct *thread = NULL; -static DECLARE_WAIT_QUEUE_HEAD(waiter); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); - -#if GTP_CHARGER_SWITCH - #ifdef MT6573 - #define CHR_CON0 (0xF7000000+0x2FA00) - #else - extern kal_bool upmu_is_chr_det(void); - #endif - static void gtp_charger_switch(s32 dir_update); -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = GTP_KEY_TAB; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -static s32 force_reset_guitar(s32); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -u8 esd_running = 0; -spinlock_t esd_lock; -extern unsigned char gtp_default_FW_fl[]; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; - -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; - -#if GTP_WITH_PEN -struct input_dev *pen_dev; -#endif - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -/*change counter data type to u16, because GTP_CHK_FS_MNT_MAX is 300 */ -u16 gtp_ref_retries = 0; -u16 gtp_clk_retries = 0; -static u16 is_data_mounted = 0; -/*[PLATFORM]-Add-NED by falin.luo@tcl.com 2015/4/29*/ -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 rqst_processing = 0; -u8 is_950 = 0; -u8 after_912_1020 = 0; - - -//add by caoyang for ·À¶¶ -//static struct timer_list buttons_timer; -//static DECLARE_WAIT_QUEUE_HEAD(button_waitq); -//end - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern int gup_reload_fw_dsp(void *dir, u8 dwn_mode); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); - -#if GTP_COMPATIBLE_MODE -u8 gtp_hopping_buf[16] = {0}; -#endif - -#if GTP_FL_LITTLE_SYSTEM -u8 power_is_down = 0; -u8 little_fw_mode = 0; -u8 fw_block = 0; // 0: not started, 1 ~ 11/12 ss51 seg a/b each 2K, 13: ss51 seg b, 10K/12K -u8 block_section = 1; // 1 ~ 8, 2K total, 256 Bytes each - -char symbolic_state1[][20] = {"OTHERS", "BUFFER_FULL", "CHECK_COMPLETE", "CHECK_ERROR", "WAIT_CHECK", "OTHERS", "OTHERS", "OTHERS"}; -char symbolic_state2[][20] = {"OTHERS", "IS_A_SEG", "IS_B_SEG_FIRST", "IS_B_SEG_OTHER", "IS_B_SEG_LAST", "OTHERS", "OTHERS", "OTHERS"}; - -static void tpd_up(s32 x, s32 y, s32 id); -extern u8 gup_burn_ss51_block(struct i2c_client *client, s32 block_section, s32 fw_block, u16 *fw_chksum); -extern u8 gup_burn_ss51_seg_b(struct i2c_client *client, s32 size, u16 *fw_chksum); -#endif - -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static ssize_t gt91xx_config_read_proc(struct file *, char __user *, size_t, loff_t *); -static ssize_t gt91xx_config_write_proc(struct file *, const char __user *, size_t, loff_t *); - -static struct proc_dir_entry *gt91xx_config_proc = NULL; -static const struct file_operations config_proc_ops = { - .owner = THIS_MODULE, - .read = gt91xx_config_read_proc, - .write = gt91xx_config_write_proc, -}; - -#define VELOCITY_CUSTOM -#ifdef VELOCITY_CUSTOM -#include -#include -#include - -#ifndef TPD_VELOCITY_CUSTOM_X -#define TPD_VELOCITY_CUSTOM_X 10 -#endif -#ifndef TPD_VELOCITY_CUSTOM_Y -#define TPD_VELOCITY_CUSTOM_Y 10 -#endif - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -int g_v_magnify_x = TPD_VELOCITY_CUSTOM_X; -int g_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &g_v_magnify_x, sizeof(g_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &g_v_magnify_y, sizeof(g_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "gt9xx_touch", - .fops = &tpd_fops, -}; - -//********************************************** -#endif - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - - -static ssize_t gt91xx_config_read_proc(struct file *file, char __user *page, size_t size, loff_t *ppos) -{ - char *ptr = page; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i; - - if (*ppos) // CMD call again - { - return 0; - } - - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - *ppos += ptr - page; - return (ptr - page); -} - -static ssize_t gt91xx_config_write_proc(struct file *filp, const char __user *buffer, size_t count, loff_t *off) -{ - s32 ret = 0; - - GTP_DEBUG("write count %d\n", count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%d]\n", GTP_CONFIG_MAX_LENGTH, count); - return -EFAULT; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d\n", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - //if (retry == 20) - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - return ret; - } - //#endif - } - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - if (little_fw_mode) - { - // do nothing - GTP_INFO("Little fw enabled, no esd reset."); - } - else - #endif - { - gtp_recovery_reset(client); - } - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d\n", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - //if (retry == 20) - if (retry == 5) - { - //dump_stack(); - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - return ret; - } - //#endif - } - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - if (little_fw_mode) - { - // do nothing - GTP_INFO("Little fw enabled, no esd reset."); - } - else - #endif - { - gtp_recovery_reset(client); - } - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_INFO("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - sprintf(tpd_firmware_version_val,"%02x%02x",buf[7], buf[6]); - tpd_firmware_version_val[4] = '\0'; - printk(KERN_ERR"caoyang test tpd_firmware_version_val:%s",tpd_firmware_version_val); - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - tpd_config_version= send_cfg_buf[sensor_id][0]; - /*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ - /*MMI test app read sensor id to distinguish the tp manufacturer*/ - tpd_sensor_id = sensor_id; - /*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - gtp_get_info(client); - return 0; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (is_950) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - if ((cfg_len == 186) && after_912_1020) - { - GTP_DEBUG("Firmware after 912_1020, set config length to 228."); - - cfg_len = 228; - - config[GTP_ADDR_LENGTH + 226] = config[GTP_ADDR_LENGTH + 184]; - - memset(&config[GTP_ADDR_LENGTH + 184], 0x00, 228 - 186); - - config[GTP_ADDR_LENGTH + 227] = 0x01; - - } - tpd_x_line = driver_num; - tpd_y_line = sensor_num; - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(50); -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - -#ifdef MT6573 - // power on CTP - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ONE); - -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - -#endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = gup_fw_download_proc(NULL, GTP_FL_FW_BURN); - - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return -1; - } - } - - ret = gtp_fw_startup(client); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Startup fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return -1; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - } - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (/*gup_check_fs_mounted("/data") == FAIL*/!is_data_mounted)/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - msleep(100);/*[PLATFORM]-ADD by falin.luo@tcl.com 2015/4/29*/ - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (is_950) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("Failed to allocate memory for reference buffer!"); - return FAIL; - } - memset(refp, 0, ref_len); - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0666); - if (IS_ERR(flp)) - { - GTP_ERROR("Failed to open/create %s.", GTP_BAK_REF_PATH); - if (GTP_BAK_REF_SEND == mode) - { - goto default_bak_ref; - } - else - { - goto exit_ref_proc; - } - } - - switch (mode) - { - case GTP_BAK_REF_SEND: - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("Read ref file failed, send default bak ref."); - goto default_bak_ref; - } - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; if_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - break; - - default: - GTP_ERROR("Invalid Argument(%d) for backup reference", mode); - ret = FAIL; - goto exit_ref_proc; - } - - ret = SUCCESS; - goto exit_ref_proc; - -default_bak_ref: - for (j = 0; j < ref_grps; ++j) - { - memset(&refp[j * ref_seg_len], 0, ref_seg_len); - refp[j * ref_seg_len + ref_seg_len - 1] = 0x01; // checksum = 1 - } - ret = i2c_write_bytes(client, GTP_REG_BAK_REF, refp, ref_len); - if (flp && !IS_ERR(flp)) - { - GTP_INFO("Write backup-reference data into %s", GTP_BAK_REF_PATH); - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char*)refp, ref_len, &flp->f_pos); - } - if (ret < 0) - { - GTP_ERROR("Failed to load the default backup reference"); - ret = FAIL; - } - else - { - ret = SUCCESS; - } -exit_ref_proc: - if (refp) - { - kfree(refp); - } - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -u8 gtp_fw_startup(struct i2c_client *client) -{ - u8 wr_buf[4]; - s32 ret = 0; - - //init sw WDT - wr_buf[0] = 0xAA; - ret = i2c_write_bytes(client, 0x8041, wr_buf, 1); - if (ret < 0) - { - GTP_ERROR("I2C error to firmware startup."); - return FAIL; - } - //release SS51 & DSP - wr_buf[0] = 0x00; - i2c_write_bytes(client, 0x4180, wr_buf, 1); - - //int sync - gtp_int_sync(25); - - //check fw run status - i2c_read_bytes(client, 0x8041, wr_buf, 1); - if(0xAA == wr_buf[0]) - { - GTP_ERROR("IC works abnormally,startup failed."); - return FAIL; - } - else - { - GTP_DEBUG("IC works normally,Startup success."); - wr_buf[0] = 0xAA; - i2c_write_bytes(client, 0x8041, wr_buf, 1); - return SUCCESS; - } -} - - -static void gtp_recovery_reset(struct i2c_client *client) -{ -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - force_reset_guitar(0); -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif -} - -static u8 gtp_check_clk_legality(u8 *p_clk_buf) -{ - u8 i = 0; - u8 clk_chksum = p_clk_buf[5]; - - for(i = 0; i < 5; i++) - { - if((p_clk_buf[i] < 50) || (p_clk_buf[i] > 120) || - (p_clk_buf[i] != p_clk_buf[0])) - { - break; - } - clk_chksum += p_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_DEBUG("Valid main clock data."); - return SUCCESS; - } - GTP_ERROR("Invalid main clock data."); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - u8 gtp_clk_buf[6] = {0}; - struct file *flp = NULL; - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_clk_retries);/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - if (/*gup_check_fs_mounted("/data") == FAIL*/!is_data_mounted)/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - msleep(100);/*[PLATFORM]-ADD by falin.luo@tcl.com 2015/4/29*/ - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0666); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(gtp_clk_buf); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(0); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("Invalid main clock: %d", clk_cal_result); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - - if (flp && !IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -u8 gtp_verify_hopping_buf(struct i2c_client *client) -{ - u16 checksum = 0; - s32 i = 0; - - for (i = 0; i < 6; i += 2) - { - checksum += (gtp_hopping_buf[i] << 8) + gtp_hopping_buf[i+1]; - } - if ((checksum + ((u16)(gtp_hopping_buf[6] << 8) + (u16)gtp_hopping_buf[7])) & 0xFFFF) - { - GTP_ERROR("Wrong checksum for hopping buffer, get hopping data from config instead!"); - goto get_config_hopping; - } - - for (i = 0; i < 8; i++) - { - if (gtp_hopping_buf[i] != gtp_hopping_buf[i+8]) - { - GTP_ERROR("Hopping buffer is not identical, get data from config instead!"); - goto get_config_hopping; - } - } - GTP_DEBUG("Hopping buffer is okay"); - return SUCCESS; - -get_config_hopping: - memcpy(gtp_hopping_buf, &config[2 + 0x8065 - GTP_REG_CONFIG_DATA], 4); - gtp_hopping_buf[4] = 0xAA; - gtp_hopping_buf[5] = 0x55; - - checksum = 0; - for (i = 0; i < 6; i += 2) - { - checksum += (gtp_hopping_buf[i] << 8) + gtp_hopping_buf[i+1]; - } - checksum = 0 - checksum; - gtp_hopping_buf[6] = (u8)(checksum >> 8); - gtp_hopping_buf[7] = (u8)(checksum & 0xFF); - - for (i = 0; i < 8; i++) - { - gtp_hopping_buf[i+8] = gtp_hopping_buf[i]; - } - return SUCCESS; -} - -u8 gtp_hopping_proc(struct i2c_client *client, s32 mode) -{ - s32 ret = 0; - - GTP_DEBUG("Store hopping data, wait for /data mounted."); - /*[PLATFORM]-MOD-BEGIN by falin.luo@tcl.com 2015/4/29*/ -// ret = gup_check_fs_mounted("/data"); - ret = is_data_mounted ? SUCCESS : FAIL; - /*[PLATFORM]-MOD-END by falin.luo@tcl.com 2015/4/29*/ - - if (FAIL == ret) - { - GTP_DEBUG("/data not mounted."); - return FAIL; - } - GTP_DEBUG("/data Mounted!"); - - if (GTP_HOPPING_SEND == mode) - { - gtp_verify_hopping_buf(client); - - ret = i2c_write_bytes(client, 0x8030, gtp_hopping_buf, 16); - if (ret < 0) - { - return FAIL; - } - else - { - return SUCCESS; - } - } - else - { - ret = i2c_read_bytes(client, 0x8030, gtp_hopping_buf, 16); - - if (ret < 0) - { - GTP_ERROR("Failed to read hopping data from hopping buffer, get from config instead."); - return FAIL; - } - return gtp_verify_hopping_buf(client); - } -} - -#if GTP_FL_LITTLE_SYSTEM -s32 gtp_resume_timeout(void *none) -{ - s32 timeout = 0; - GTP_DEBUG("Resume timeout thread kicks off."); - - while (timeout++ < (10 * 10)) - { - msleep(100); - if (!little_fw_mode) - { - GTP_DEBUG("Resume timeout thread terminated while counting."); - return 0; - } - } - - if (little_fw_mode) - { - GTP_INFO("Download big ss51 firmware timeout, process esd reset."); - little_fw_mode = 0; - gtp_recovery_reset(i2c_client_point); - } - - return 0; -} - -u8 gtp_get_state1(struct i2c_client *client) -{ - u8 state1 = 0; - s32 ret = 0; - - ret = i2c_read_bytes(client, GTP_REG_STATE1, &state1, 1); - - if (ret < 0) - { - GTP_ERROR("Failed to get state1!"); - return 0xFF; - } - return state1; -} - -u8 gtp_get_state2(struct i2c_client *client) -{ - u8 state2 = 0; - s32 ret = 0; - - ret = i2c_read_bytes(client, GTP_REG_STATE2, &state2, 1); - - if (ret < 0) - { - GTP_ERROR("Failed to get state2!"); - return 0xFF; - } - return state2; -} - -// size: k in unit -u8 gtp_send_check_info(struct i2c_client *client, u16 fw_chksum) -{ - s32 ret = 0; - u8 checksum = 0; - u8 bank = 0; - u8 state1 = 0x00; - u8 state2 = 0x00; - u16 start_addr = 0x0000; - u8 checkinfo_buf[10] = {0}; - - - switch (fw_block) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - bank = 0x01; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = (0xC000 + (fw_block - 1) * 1024 * 2); - break; - - case 9: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = 0xF800; - break; - - case 10: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = 0xF000; - break; - - case 11: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_B_SEG_FIRST; - start_addr = 0xE800; - break; - - case 12: - bank = 0x00; - state1 = WAIT_CHECK; - state2 = IS_B_SEG_LAST; - start_addr = 0xC000; - break; - - default: - GTP_ERROR("Invalid firmware block(%d) for checkinfo.", fw_block); - return FAIL; - } - - checkinfo_buf[3] = bank; - checkinfo_buf[4] = (u8)(start_addr >> 8); - checkinfo_buf[5] = (u8)(start_addr & 0xFF); - checkinfo_buf[7] = state2; - checkinfo_buf[8] = state1; - - GTP_DEBUG("fw_block: %d, fw_chksum: 0x%04X", fw_block, fw_chksum); - if (fw_block == 12) - { - checkinfo_buf[6] = 80; - } - else - { - checkinfo_buf[6] = 16; - } - - checkinfo_buf[0] = (u8)(fw_chksum >> 8); - checkinfo_buf[1] = (u8)(fw_chksum & 0xFF); - - checksum = 0; - for (ret = 0; ret < 6; ret++) - { - checksum += checkinfo_buf[3 + ret]; - } - checkinfo_buf[2] = 1 - checksum; - - ret = i2c_write_bytes(client, GTP_REG_CHECKINFO, checkinfo_buf, 9); - if (ret < 0) - { - GTP_ERROR("Failed to send checkinfo!"); - return FAIL; - } - else - { - GTP_DEBUG("Send checkinfo successfully!"); - } - return SUCCESS; -} - - - -u8 gtp_resume_fw_startup(struct i2c_client *client) -{ - u8 buf; - u32 retry = 0; - s32 ret = 0; - - GTP_INFO("Big ss51 firmware startup."); - - while (retry++ < 10) - { - buf = 0x0C; - ret = i2c_write_bytes(client, 0x4180, &buf, 1); // hold ss51 & dsp - if (ret < 0) - { - GTP_ERROR("Failed to hold ss51 & dsp."); - return FAIL; - } - - buf = 0x00; - ret = i2c_read_bytes(client, 0x4180, &buf, 1); - if (ret < 0) - { - GTP_ERROR("Failed to get hold ss51 & dsp status."); - return FAIL; - } - - if (buf == 0x0C) - { - GTP_DEBUG("SS51 & Dsp confirm hold!"); - break; - } - } - - if (retry >= 10) - { - GTP_ERROR("Hold ss51 & dsp retry exhausted."); - return FAIL; - } - - buf = 0x03; - i2c_write_bytes(client, 0x4048, &buf, 1); // select bank3 - - buf = 0x00; - i2c_write_bytes(client, 0x4049, &buf, 1); - - return gtp_fw_startup(client); -} - -u8 gtp_download_seg_b(struct i2c_client *client) -{ - s32 ret = 0; - u16 fw_chksum = 0; - u8 state1 = 0; - - if (block_section != 10) - { - state1 = 0x00; - i2c_write_bytes(client, 0x4048, &state1, 1); // select bank0 - - ret = gup_burn_ss51_seg_b(client, 10, &fw_chksum); - - if (FAIL == ret) - { - GTP_ERROR("Failed to burn ss51 seg B, process reburn."); - return FAIL; - } - - ret = gtp_send_check_info(i2c_client_point, fw_chksum); - if (FAIL == ret) - { - GTP_ERROR("Send checkinfo failed, process resend."); - return FAIL; - } - } - msleep(1); - - state1 = gtp_get_state1(client); - - if (CHECK_COMPLETE == state1) - { - GTP_INFO("Burn ss51 Block12 successfully"); - } - else if (CHECK_ERROR == state1) - { - GTP_DEBUG("Big SS51 Seg B check error, process reburn!"); - return FAIL; - } - else - { - GTP_ERROR("Big SS51 Seg B check imcomplete(state1:%s), process recheck.", symbolic_state1[state1&0x07]); - block_section = 10; - return FAIL; - } - ret = gtp_resume_fw_startup(client); - - little_fw_mode = 0; - if (FAIL == ret) - { - GTP_ERROR("Big ss51 firmware startup failed, process esd reset."); - if (!tpd_halt) - { - gtp_recovery_reset(i2c_client_point); - } - } - else - { - GTP_INFO("Switch to big ss51 firmware successfully!"); - } -#if GTP_ESD_PROTECT - if (!tpd_halt) - { - gtp_esd_switch(client, SWITCH_ON); - } -#endif - return SUCCESS; -} - - -u8 gtp_download_big_ss51(struct i2c_client *client) -{ - u8 state1, state2; - s32 ret = 0; - s32 i = 0; - static u16 fw_chksum = 0x0000; - - //GTP_DEBUG("Block: %d, Block Section: %d", fw_block, block_section); - if (!little_fw_mode) - { - GTP_ERROR("Download big ss51 timeout!"); - return FAIL; - } - - if (block_section == 10) // one firmware block burned - { - if (fw_block == 11) - { - mdelay(3); - } - - state1 = gtp_get_state1(i2c_client_point); - state2 = gtp_get_state2(i2c_client_point); - - GTP_DEBUG("state1: %02X (%s), state2: %02X (%s)", state1, symbolic_state1[state1&0x07], state2, symbolic_state2[state2&0x07]); - - if (CHECK_COMPLETE == state1) - { - block_section = 1; - GTP_DEBUG("Burn ss51 Block%d successfully!", fw_block); - if (fw_block == 11) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); - #endif - tpd_up(0, 0, 0); // release all - input_sync(tpd->dev); - GTP_DEBUG("Release touch manually."); - fw_block = 12; - for (i = 0; i < 5; i++) - { - if (!little_fw_mode || (fw_block != 12)) - { - GTP_ERROR("Download big ss51 timeout!"); - return FAIL; - } - ret = gtp_download_seg_b(client); - - if (SUCCESS == ret) - { - break; - } - } - return SUCCESS; - } - } - else if (CHECK_ERROR == state1) - { - GTP_ERROR("Block%d check error, process reburn.", fw_block); - block_section = 1; - fw_block--; - } - else - { - GTP_DEBUG("Block%d check incomplete, process recheck.", fw_block); - block_section = 10; - } - } - if (block_section < 9) - { - ret = gup_burn_ss51_block(i2c_client_point, block_section, fw_block+1, &fw_chksum); - if (FAIL == ret) - { - GTP_ERROR("Burn block%d section%d failed, reburn block%d", fw_block+1, block_section, fw_block+1); - } - else - { - block_section++; - } - if (block_section == 9) // one firmware block downloaded - { - fw_block++; - block_section = 10; - ret = gtp_send_check_info(i2c_client_point, fw_chksum); - } - } - return ret; -} -#endif - -#endif -//************* For GT9XXF End **********************// - -#if GTP_WITH_PEN -static void gtp_pen_init(void) -{ - s32 ret = 0; - - pen_dev = input_allocate_device(); - if (pen_dev == NULL) - { - GTP_ERROR("Failed to allocate input device for pen/stylus."); - return; - } - - pen_dev->evbit[0] = BIT_MASK(EV_SYN) | BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) ; - pen_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); - - set_bit(BTN_TOOL_PEN, pen_dev->keybit); - set_bit(INPUT_PROP_DIRECT, pen_dev->propbit); - //set_bit(INPUT_PROP_POINTER, pen_dev->propbit); - -#if GTP_PEN_HAVE_BUTTON - input_set_capability(pen_dev, EV_KEY, BTN_STYLUS); - input_set_capability(pen_dev, EV_KEY, BTN_STYLUS2); -#endif - - input_set_abs_params(pen_dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_PRESSURE, 0, 255, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_TRACKING_ID, 0, 255, 0, 0); - - pen_dev->name = "mtk-pen"; - pen_dev->phys = "input/ts"; - pen_dev->id.bustype = BUS_I2C; - - ret = input_register_device(pen_dev); - if (ret) - { - GTP_ERROR("Register %s input device failed", pen_dev->name); - return; - } -} - -static void gtp_pen_down(s32 x, s32 y, s32 size, s32 id) -{ - input_report_key(pen_dev, BTN_TOOL_PEN, 1); - input_report_key(pen_dev, BTN_TOUCH, 1); - input_report_abs(pen_dev, ABS_MT_POSITION_X, x); - input_report_abs(pen_dev, ABS_MT_POSITION_Y, y); - if ((!size) && (!id)) - { - input_report_abs(pen_dev, ABS_MT_PRESSURE, 100); - input_report_abs(pen_dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(pen_dev, ABS_MT_PRESSURE, size); - input_report_abs(pen_dev, ABS_MT_TOUCH_MAJOR, size); - input_report_abs(pen_dev, ABS_MT_TRACKING_ID, id); - } - input_mt_sync(pen_dev); -} - -static void gtp_pen_up(void) -{ - input_report_key(pen_dev, BTN_TOOL_PEN, 0); - input_report_key(pen_dev, BTN_TOUCH, 0); -} -#endif - - -static s32 tpd_i2c_probe_next(struct i2c_client *client) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; - - - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_ERROR(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - - return 0; -} - -static ssize_t cfg_load_enable_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - tpd_i2c_probe_next(i2c_client_point); - return count; -} -static ssize_t cfg_load_enable_show(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static DEVICE_ATTR(cfg_load_enable, S_IRUGO|S_IWUSR, cfg_load_enable_show, cfg_load_enable_store); - -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -/*sys interface to get and set the data partition mount status*/ -#ifdef GTP_COMPATIBLE_MODE - -static ssize_t data_is_mount_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - GTP_INFO("enter %s", __func__); - - - is_data_mounted = ((buf[0] == '1') ? 1 : 0); - - GTP_INFO("is_data_mount = %d, buf = %s", is_data_mounted, buf); - - return count; -} -static ssize_t data_is_mount_show(struct device *dev, - struct device_attribute *attr, - char *buf, size_t count) -{ - return snprintf(buf, PAGE_SIZE, "is_data_mounted = %d\n", is_data_mounted); -} - -static DEVICE_ATTR(data_is_mount, 0644, data_is_mount_show, data_is_mount_store); - -#endif - -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/4/29*/ - - -static struct miscdevice cfg_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "tp_cfg", - // .fops = &tpd_fops, -}; - -#if 0 -static void buttons_timer_function(unsigned long data) -{ - printk(KERN_ERR"caoyang1\n"); - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - tpd_sleep_flag = 1; - -} -#endif - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; -//add by caoyang for ·À¶¶ -//do not use the timer because it cause bug -#if 0 - init_timer(&buttons_timer); - buttons_timer.function = buttons_timer_function; - add_timer(&buttons_timer); -#endif -#if 0 - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } -#endif -#ifdef VELOCITY_CUSTOM - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#if 0 - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } -#endif - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0666, NULL, &config_proc_ops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - else - { - GTP_INFO("create proc entry %s success", GT91XX_CONFIG_PROC_FILE); - } -#if 0 -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_ERROR(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } -#endif - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); - -#if GTP_WITH_PEN - gtp_pen_init(); -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - -#if 1 - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - -#endif - -#if 0 - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif -#endif -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif -#if 0 -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; -#endif - misc_register(&cfg_misc_device); -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -#ifdef GTP_COMPATIBLE_MODE - device_create_file(cfg_misc_device.this_device, &dev_attr_data_is_mount); -#endif -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/4/29*/ - - device_create_file(cfg_misc_device.this_device, &dev_attr_cfg_load_enable); - tpd_load_status = 1; - return 0; -} - - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -static s32 force_reset_guitar(s32 resume) -{ - s32 i = 0; - s32 ret = 0; - - if (!resume) - { - GTP_INFO("Force_reset_guitar"); - } - else - { - GTP_INFO("Download little system."); - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -#ifdef MT6573 - //Power off TP - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ZERO); - msleep(30); - //Power on TP - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ONE); - msleep(30); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - -#endif - - for (i = 0; i < 5; i++) - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - //check code ram - if (resume) // poweroff resume - { - ret = gup_fw_download_proc(NULL, GTP_FL_PWR_RESUME_BURN); - if (FAIL == ret) - { - GTP_ERROR("Failed to download little system."); - continue; - } - } - else - #endif - { - ret = gup_fw_download_proc(NULL, GTP_FL_ESD_RECOVERY); - } - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - //startup fw - ret = gtp_fw_startup(i2c_client_point); - if(FAIL == ret) - { - if (resume) - { - GTP_ERROR("Failed to startup little system."); - } - else - { - GTP_ERROR("GT9XXF start up failed."); - } - continue; - } - break; - } - else - #endif - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - msleep(50); - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - - if (i >= 5) - { - if (resume) - { - GTP_ERROR("Failed to download little system."); - } - else - { - GTP_ERROR("Failed to reset guitar."); - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; - } - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - if (resume) - { - little_fw_mode = 1; - fw_block = 0; - block_section = 1; - - msleep(1); - gtp_main_clk_proc(i2c_client_point); - gtp_hopping_proc(i2c_client_point, GTP_HOPPING_SEND); - gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - } - else - { - little_fw_mode = 0; - fw_block = 0; - block_section = 0; - } - } -#endif - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work_sync(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - -static s32 gtp_check_fw(void) -{ - u8 versionBuff[4] = {0}; - s32 ret,retry = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - - return 1; - } - - GTP_ERROR("Check running fw version error!"); - return 0; -} - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[3] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3 || !gtp_check_fw()) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - esd_buf[0] = 0x01; - esd_buf[1] = 0x01; - esd_buf[2] = 0x01; - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, 3); - msleep(50); - force_reset_guitar(0); - } - } - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif - -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_EM_PRINT(x, y, x, y, id, 1); - -#if (defined(MT6575)||defined(MT6577)) - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - input_report_key(tpd->dev, BTN_TOUCH, 0); - input_mt_sync(tpd->dev); - TPD_EM_PRINT(x, y, x, y, id, 0); - -#if (defined(MT6575) || defined(MT6577)) - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - -#ifdef MT6573 - chr_status = *(volatile u32 *)CHR_CON0; - chr_status &= (1 << 13); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - chr_status = upmu_is_chr_det(); -#endif - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - u8 pen_active = 0; - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - u8 proximity_status; //add by caoyang - u8 doze_buf[3] = {0x81, 0x4B}; - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - - while (tpd_halt) - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - break; - } - //#endif - } - tpd_flag = 0; - msleep(20); - } - - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - TPD_DEBUG_SET_TIME; - set_current_state(TASK_RUNNING); - - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - if(gesture_value > 0){ - //#if GTP_GESTURE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if ((doze_buf[2] == 'a') || (doze_buf[2] == 'b') || (doze_buf[2] == 'c') || - (doze_buf[2] == 'd') || (doze_buf[2] == 'e') || (doze_buf[2] == 'g') || - (doze_buf[2] == 'h') || (doze_buf[2] == 'm') || (doze_buf[2] == 'o') || - (doze_buf[2] == 'q') || (doze_buf[2] == 's') || (doze_buf[2] == 'v') || - (doze_buf[2] == 'w') || (doze_buf[2] == 'y') || (doze_buf[2] == 'z') || - (doze_buf[2] == 0x5E) /* ^ */ - ) - { - if (doze_buf[2] != 0x5E) - { - GTP_INFO("Wakeup by gesture(%c), light up the screen!", doze_buf[2]); - } - else - { - GTP_INFO("Wakeup by gesture(^), light up the screen!"); - } - - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if ( (doze_buf[2] == 0xAA) || (doze_buf[2] == 0xBB) || - (doze_buf[2] == 0xAB) || (doze_buf[2] == 0xBA) ) - { - char *direction[4] = {"Right", "Down", "Up", "Left"}; - u8 type = ((doze_buf[2] & 0x0F) - 0x0A) + (((doze_buf[2] >> 4) & 0x0F) - 0x0A) * 2; - - GTP_INFO("%s slide to light up the screen!", direction[type]); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xCC == doze_buf[2]) - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - //#endif - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - continue; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - continue; - } - switch (rqst_data[2]) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - rqst_processing = 1; - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - #if GTP_POWER_CTRL_SLEEP - { - ret = gtp_hopping_proc(i2c_client_point, GTP_HOPPING_SEND); - if (FAIL == ret) - { - GTP_ERROR("Failed to send hopping data."); - goto exit_work_func; - } - else - { - GTP_INFO("Send hopping data success."); - } - } - #endif - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - - case GTP_RQST_RESET: - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) { - u8 reg_data[3] = {(u8)(0x801F >> 8), (u8)(0x801F & 0xFF), 0}; - gtp_i2c_write(i2c_client_point, reg_data, 3); - gtp_recovery_reset(i2c_client_point); - gtp_enter_doze(i2c_client_point); - } - }else - //#endif - { - gtp_recovery_reset(i2c_client_point); - } - GTP_INFO("Request Reset."); - goto exit_work_func; - - #if GTP_POWER_CTRL_SLEEP - case GTP_RQST_STORE_HOPPING: - GTP_INFO("Request store hopping data."); - ret = gtp_hopping_proc(i2c_client_point, GTP_HOPPING_STORE); - if (FAIL == ret) - { - GTP_ERROR("Failed to store hopping data."); - } - else - { - GTP_INFO("Hopping data stored."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - - case GTP_RQST_STORE_BAK_REF: - GTP_INFO("Request store backup reference."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_STORE); - if (FAIL == ret) - { - GTP_ERROR("Failed to store backup reference data."); - } - else - { - GTP_INFO("Backup reference data stored."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - #endif - - default: - GTP_INFO("Undefined request code: 0x%02X", rqst_data[2]); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - break; - } - } - #endif - - if (finger == 0x00) - { - continue; - } - - if ((finger & 0x80) == 0) - { - goto exit_work_func; - } -if((gtp_autotool_setting == 1) && !(point_data[GTP_ADDR_LENGTH] & 0x40)){ - gtp_autotool_setting = 0; -} - //add by caoyang -if(gesture_value > 0){ - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - if(tpd_sleep_flag == 1){ - goto exit_work_func; - } - if (proximity_status & 0x40) //proximity or large touch detect,enable hwm_sensor. - { - printk(KERN_ERR"caoyang0 test for xipin\n"); - //mod_timer(&buttons_timer, jiffies+HZ/50); - if(gtp_autotool_setting == 1){ - gtp_autotool_setting = 0; - goto exit_work_func; - } -#if 1 - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - tpd_sleep_flag = 1; -#endif - goto exit_work_func; - } - //end -} - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - - #if (GTP_HAVE_TOUCH_KEY || GTP_PEN_HAVE_BUTTON) - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - #if GTP_PEN_HAVE_BUTTON - if (key_value == 0x40) - { - GTP_DEBUG("BTN_STYLUS & BTN_STYLUS2 Down."); - input_report_key(pen_dev, BTN_STYLUS, 1); - input_report_key(pen_dev, BTN_STYLUS2, 1); - pen_active = 1; - } - else if (key_value == 0x10) - { - GTP_DEBUG("BTN_STYLUS Down, BTN_STYLUS2 Up."); - input_report_key(pen_dev, BTN_STYLUS, 1); - input_report_key(pen_dev, BTN_STYLUS2, 0); - pen_active = 1; - } - else if (key_value == 0x20) - { - GTP_DEBUG("BTN_STYLUS Up, BTN_STYLUS2 Down."); - input_report_key(pen_dev, BTN_STYLUS, 0); - input_report_key(pen_dev, BTN_STYLUS2, 1); - pen_active = 1; - } - else - { - GTP_DEBUG("BTN_STYLUS & BTN_STYLUS2 Up."); - input_report_key(pen_dev, BTN_STYLUS, 0); - input_report_key(pen_dev, BTN_STYLUS2, 0); - if ( (pre_key == 0x40) || (pre_key == 0x20) || - (pre_key == 0x10) - ) - { - pen_active = 1; - } - } - if (pen_active) - { - touch_num = 0; // shield pen point - //pre_touch = 0; // clear last pen status - } - #endif - #if GTP_HAVE_TOUCH_KEY - if (!pre_touch) - { - for (i = 0; i < GTP_MAX_KEY_NUM; i++) - { - input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - } - touch_num = 0; // shiled fingers - } - #endif - } - #endif - pre_key = key_value; - - GTP_DEBUG("pre_touch:%02x, finger:%02x.", pre_touch, finger); - - if (touch_num) - { - for (i = 0; i < touch_num; i++) - { - coor_data = &point_data[i * 8 + 3]; - - id = coor_data[0] & 0x0F; - input_x = coor_data[1] | coor_data[2] << 8; - input_y = coor_data[3] | coor_data[4] << 8; - input_w = coor_data[5] | coor_data[6] << 8; -//chenhui add start -// input_y=abs_y_max-input_y; -// input_x=abs_x_max-input_x; -// s32 temp_input_x=input_x; -// input_x=input_y; -// input_y=temp_input_x; - -//chenhui add end - - input_x = TPD_WARP_X(abs_x_max, input_x); - input_y = TPD_WARP_Y(abs_y_max, input_y); - - #if GTP_WITH_PEN - id = coor_data[0]; - if ((id & 0x80)) // pen/stylus is activated - { - GTP_DEBUG("Pen touch DOWN!"); - pre_pen = 1; - //id &= 0x7F; - id = 0; - GTP_DEBUG("(%d)(%d, %d)[%d]", id, input_x, input_y, input_w); - gtp_pen_down(input_x, input_y, input_w, id); - pen_active = 1; - } - else - #endif - { - GTP_DEBUG(" (%d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - } - else - { - if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - gtp_pen_up(); - pre_pen = 0; - pen_active = 1; - } - else - #endif - { - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - } - } - pre_touch = touch_num; - - #if GTP_WITH_PEN - if (pen_active) - { - pen_active = 0; - input_sync(pen_dev); - } - else - #endif - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_ERROR("I2C write end_cmd error!"); - } - } - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - if (little_fw_mode) - { - if ((fw_block == 0) && (block_section == 1)) - { - GTP_INFO("Begin downloading big ss51 firmware"); - } - gtp_download_big_ss51(i2c_client_point); - } - } - #endif - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_ERROR("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_ERROR("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_ERROR("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH - 1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_DEBUG("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); - - GTP_DEBUG("Entering gesture mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("Failed to set gesture flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_INFO("Gesture mode enabled."); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send gesture cmd failed."); - return ret; -} - -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if (GTP_COMPATIBLE_MODE && !GTP_POWER_CTRL_SLEEP) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - -#ifdef MT6573 - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ZERO); - msleep(30); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if GTP_POWER_CTRL_SLEEP - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - power_is_down = 0; - little_fw_mode = 1; - kthread_run(gtp_resume_timeout, (void*)NULL, "resume_timeout"); - - ret = force_reset_guitar(1); - if (FAIL == ret) - { - little_fw_mode = 0; - gtp_recovery_reset(client); - } - if (!gtp_check_fw()) { - little_fw_mode = 0; - gtp_recovery_reset(client); - } - return 0; - } - #endif // end compatible mode & fl little system - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else // esle PowerCtrlSleep - while (retry++ < 5) { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_WAKEUP != doze_status) - { - GTP_INFO("Powerkey wakeup."); - } - else - { - GTP_INFO("Gesture wakeup."); - } - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - ret = gup_reload_fw_dsp(NULL, GTP_FL_READ_REPAIR); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - if (ret == FAIL) { - GTP_ERROR("[gtp_wakeup_sleep]Reload dsp code failed."); - continue; - } - ret = gtp_fw_startup(client); - if (ret == FAIL) { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - if (!gtp_check_fw()) { - gtp_recovery_reset(client); - } - return 0; // succeed - //#else // else gesture wakeup - }else{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); //wake up by int gpio - msleep(5); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) { - u8 opr_buf[2] = {0}; - - ret = gtp_i2c_test(client); - if (ret >= 0) { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(0); - retry = 0; - break; - } - //#endif // end compatible mode - } - ret = gtp_i2c_test(client); - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - //#if (!GTP_GESTURE_WAKEUP) - if(!(gesture_value > 0)) - { - gtp_int_sync(25); - } - //#endif - return ret; - } - gtp_reset_guitar(client, 20); - #endif // end gesture wakeup - } - - if (retry >= 5) { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(0); - } -#endif // end PowerCtrlSleep - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - - GTP_INFO("System suspend."); - -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - little_fw_mode = 0; - power_is_down = 1; -#endif - - tpd_halt = 1; -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif -//#if GTP_GESTURE_WAKEUP -if(gesture_value > 0){ - ret = gtp_enter_doze(i2c_client_point); -//#else -}else{ - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); -//#endif -} - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } - // to avoid waking up while not sleeping, delay 48 + 10ms to ensure reliability - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - GTP_INFO("System resume."); - -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif - tpd_sleep_flag = 0; - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - - tpd_halt = 0; -//#if GTP_GESTURE_WAKEUP -if(gesture_value > 0){ - doze_status = DOZE_DISABLED; -//#else -}else{ - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); -//#endif -} - -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - if(g_boot_mode == KERNEL_POWER_OFF_CHARGING_BOOT || g_boot_mode == LOW_POWER_OFF_CHARGING_BOOT) //add by zero - return 0; - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#ifdef I2C_BUS_NUMBER - i2c_register_board_info(I2C_BUS_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_firmware.h deleted file mode 100644 index f174dbce8f6..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,3108 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ - //TODO:Puts your update firmware data here! -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]910 -*[VID]1020 -*[GENERATED]2013/09/06 10:03:05 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { - - 0x00,0x90,0x06,0x00,0x39,0x31,0x30,0x00,0x00,0x00,0x00,0x00,0x10,0x50,0x80,0x00, - 0x55,0x40,0xa0,0x99,0xb1,0xa7,0x69,0xf0,0x0c,0xc1,0x9a,0x46,0x11,0xe0,0x88,0xc4, - 0x3c,0x41,0x33,0x76,0x52,0xfe,0x32,0xe0,0x1d,0xc9,0xc2,0x24,0xf2,0x67,0x01,0x8d, - 0x05,0x02,0x8b,0x81,0x12,0x0a,0x12,0x6b,0x4d,0x21,0xe9,0xa7,0xd3,0x86,0x09,0x0d, - 0x87,0x03,0xf1,0x32,0xf2,0xd3,0x09,0x7b,0x4d,0x4b,0xd1,0x23,0x72,0x65,0xb8,0x48, - 0xa5,0xab,0x99,0xdb,0xb5,0x22,0xe1,0xe2,0xc2,0xfc,0x68,0xfa,0x51,0x54,0x36,0x81, - 0x74,0xe2,0x4f,0xbc,0xf3,0x6a,0x8f,0xf5,0xc5,0xd7,0x20,0x06,0x25,0x77,0x89,0xa9, - 0x6a,0x49,0xe1,0x9c,0x33,0xac,0x69,0xe4,0xcc,0xcc,0x6e,0x55,0xd0,0x76,0x96,0x38, - 0xbc,0x94,0x71,0xb5,0x9f,0xac,0x39,0x73,0xe0,0x4a,0x21,0x9d,0x8c,0x25,0x47,0xac, - 0x2c,0x48,0xfa,0x8e,0x11,0xf5,0x10,0xda,0x0f,0x4c,0x1a,0x80,0xb9,0x67,0x9a,0x3c, - 0x2f,0x49,0xb0,0x9e,0x91,0x78,0x20,0x3a,0x55,0x69,0x41,0x26,0x26,0x1a,0xda,0xef, - 0x0f,0xba,0xbb,0x5d,0x9c,0x25,0x17,0x7d,0x2f,0xb4,0x27,0x3d,0x7b,0x28,0x1a,0x19, - 0x0c,0xfb,0xf3,0x9f,0x11,0x73,0x9b,0x29,0xd9,0x49,0x5b,0xc0,0xed,0xc0,0x1d,0xb7, - 0x0c,0xd7,0xc0,0xaa,0x98,0x28,0x96,0xee,0x22,0x4a,0x14,0x4a,0x69,0xd6,0x3c,0xb5, - 0x79,0xb6,0x32,0xde,0x9b,0xa7,0x3d,0x9e,0xee,0x23,0x39,0xbc,0x13,0xb0,0xdf,0xb5, - 0x6c,0xf5,0x8f,0x2f,0xa9,0xaa,0x73,0x31,0x6b,0x55,0x6b,0xf2,0xc8,0x23,0xb4,0xdd, - 0xfc,0x66,0xf3,0xae,0xb6,0x29,0x39,0x68,0xca,0x2f,0x23,0x75,0x26,0x20,0x04,0x80, - 0x78,0xf8,0xa4,0x19,0x91,0xb7,0x2c,0xc0,0xd0,0x58,0xf4,0xe5,0x30,0x7f,0xde,0xb0, - 0x26,0xe9,0x84,0x64,0x7c,0x3e,0xe5,0xc2,0xef,0x34,0x9b,0x54,0x6d,0x8e,0x4f,0x28, - 0x82,0x11,0x8f,0x04,0x32,0x16,0x64,0xd3,0x6e,0x37,0x55,0xf8,0x8a,0x7b,0x02,0x1d, - 0x24,0xe6,0x39,0x65,0xf8,0x3c,0x64,0xc3,0x6f,0x36,0x66,0x31,0x8a,0x53,0xbc,0x28, - 0x0c,0x9f,0x0b,0xb6,0x95,0x24,0x72,0x86,0x9d,0xd4,0x4c,0x86,0x31,0x86,0x45,0xb2, - 0xa1,0x31,0xec,0x66,0x92,0xbf,0x05,0x2c,0xc4,0x53,0x96,0x69,0x98,0xcc,0xc1,0x27, - 0x20,0x12,0x9f,0x25,0x15,0x30,0xae,0xb3,0xa1,0x59,0xab,0x9d,0x5e,0x7b,0xc7,0x33, - 0x21,0x13,0x4a,0xb5,0xa7,0x75,0x7d,0xac,0x42,0xdb,0x69,0x97,0xb0,0x87,0xc6,0x74, - 0xba,0xb3,0x32,0x7c,0x37,0x37,0x3f,0xfb,0xec,0x44,0xac,0x53,0x8f,0x3a,0x79,0x69, - 0x1a,0x1c,0x5a,0xf3,0xbc,0xcc,0x66,0x9f,0xf8,0xf5,0x48,0x3e,0xf9,0x8b,0x37,0x37, - 0xc3,0xf1,0x33,0x9d,0x1b,0x78,0xbe,0xfa,0x64,0x06,0x4e,0x7b,0xdc,0x36,0x51,0xed, - 0xc6,0xb0,0x4f,0x61,0x2b,0x79,0xbf,0xf3,0x7c,0xf7,0xa7,0x4e,0x81,0xf6,0x4b,0xaa, - 0xa8,0x38,0x04,0x6f,0x01,0x35,0x1c,0xf5,0x2a,0x47,0xa8,0x35,0xf8,0x78,0xc7,0xba, - 0xa9,0x39,0x32,0x34,0x68,0xb0,0x44,0xf9,0x4a,0xfd,0x1f,0xdb,0xda,0x38,0xc9,0x2b, - 0x28,0x1a,0x3b,0xbe,0x19,0x0c,0xb4,0x0f,0x4f,0xe1,0x4f,0x8f,0xd4,0x38,0x46,0x3b, - 0x29,0x1b,0x37,0xd5,0xd8,0x33,0x60,0x3e,0x35,0x57,0xe1,0x7b,0xf1,0x79,0xb0,0xa6, - 0x22,0xc0,0xfa,0xf9,0xb7,0xe2,0x20,0x62,0xc4,0xc6,0xc1,0x3e,0xd3,0xf5,0x28,0x12, - 0x05,0xc1,0x6f,0x74,0xf7,0x29,0x3c,0xb5,0x64,0x56,0xbc,0xd4,0xd0,0x34,0xee,0xd4, - 0x84,0x82,0xfb,0xc2,0x16,0xa6,0xe8,0x66,0x25,0x19,0xd1,0x67,0x73,0x69,0x29,0x32, - 0x85,0x83,0x2f,0xff,0xb9,0xee,0x8d,0xcc,0x86,0x30,0x51,0x18,0x52,0x76,0xbb,0xfc, - 0x79,0x50,0xc0,0x83,0xb7,0x0b,0x2a,0x73,0xe1,0xc2,0xca,0x8e,0xfa,0xab,0xa8,0xae, - 0x2a,0x5e,0x10,0x5e,0x74,0xad,0xff,0x9a,0x8f,0x8a,0xa3,0x74,0x2c,0x4b,0xbc,0x5e, - 0x67,0x39,0xad,0xaf,0x52,0x2b,0x51,0x3e,0x67,0x4c,0x2a,0xc8,0xa9,0x2f,0x9a,0xae, - 0xac,0xfc,0x11,0xd5,0x17,0xc0,0xc1,0x8c,0xe4,0x47,0x24,0x3f,0xd1,0x0c,0x22,0x0a, - 0x0c,0xc8,0xb8,0xdf,0x3d,0xd8,0x62,0x59,0x54,0x42,0xd2,0x6f,0x10,0x63,0x2a,0x1a, - 0x0d,0xc9,0x31,0xfc,0x2e,0xc8,0x8e,0x5a,0x45,0x19,0x38,0xdc,0xdf,0xc1,0x23,0x2f, - 0x8c,0x8a,0xc3,0x0d,0xc2,0x21,0xf4,0xd5,0x2d,0xac,0x31,0xcd,0x5e,0xc2,0xf1,0xcb, - 0x8d,0x8b,0xf1,0x45,0x3a,0xad,0x94,0xeb,0x4c,0x6a,0xbd,0xcf,0x81,0xe4,0xe5,0x38, - 0xf5,0xce,0xda,0x9e,0x42,0xa5,0x70,0x8c,0xce,0xbc,0x5c,0x92,0xa8,0x17,0x70,0x26, - 0x2e,0xcd,0xb7,0x49,0xb0,0x00,0x72,0x6b,0x7c,0x69,0x0c,0x93,0x7f,0xaf,0xb8,0x2e, - 0x67,0x3f,0x62,0xcb,0xd8,0x89,0xcc,0xac,0x0c,0x0e,0x21,0x97,0x5e,0x55,0x4f,0x50, - 0xbc,0x2f,0x93,0xd6,0x30,0xb4,0x21,0x6f,0x68,0xd4,0x25,0x28,0x5d,0xeb,0x01,0x82, - 0x4f,0xb4,0xf9,0xc3,0xe8,0x19,0x90,0xec,0xbb,0xed,0xed,0xb8,0x93,0xbc,0xac,0x92, - 0x94,0x1c,0xb2,0x74,0x99,0xbc,0x63,0xfa,0x1a,0xf1,0x0c,0x50,0xf0,0xc3,0xda,0x87, - 0xa4,0xf7,0xc5,0x85,0xe2,0x1f,0xde,0xd4,0x64,0x05,0xa7,0x61,0xb6,0xe9,0xc9,0xb4, - 0x16,0x1e,0xdf,0xeb,0xad,0xf1,0xfd,0x52,0x37,0x5e,0x15,0xa7,0x70,0x53,0xe9,0xa0, - 0xa4,0xb0,0x1c,0x44,0xb6,0x33,0x76,0x0a,0xb0,0x09,0x81,0x21,0x15,0xf0,0xb3,0x8a, - 0x18,0x1e,0xf4,0xce,0x96,0x3f,0x44,0xc3,0xc6,0x74,0xc2,0x8f,0x1f,0x6c,0x68,0x21, - 0xd1,0xb2,0xdd,0x95,0xf5,0x46,0x8d,0x61,0x66,0xdc,0x8d,0xc7,0xfc,0xa6,0x57,0x28, - 0xa1,0x4c,0x95,0xe6,0x16,0x8c,0x45,0x00,0xce,0xb9,0x83,0x8f,0x16,0x58,0xc2,0xad, - 0x2d,0xf8,0xa6,0x12,0x1e,0x48,0x56,0xa8,0x65,0xd7,0x1e,0xaf,0x0b,0x1f,0x2f,0x45, - 0xce,0x9d,0x90,0xef,0x55,0xb4,0xc1,0x58,0x8c,0xbc,0xe1,0x41,0x7b,0x22,0xdd,0x89, - 0xa4,0xd5,0x23,0x0b,0xd2,0xa5,0x57,0xa9,0xe1,0x51,0x68,0x9c,0xc3,0xa0,0x3a,0xe9, - 0x23,0xfe,0xd1,0xee,0x3f,0xbf,0x47,0x9c,0x4e,0xdd,0x23,0xcd,0xce,0xfe,0xfa,0x4e, - 0x41,0x41,0xa9,0x29,0xdf,0xdf,0x14,0xaa,0x6f,0xbc,0xe9,0x0c,0xfc,0xf8,0x24,0x98, - 0xd0,0x6a,0x2e,0x4b,0x9b,0xa6,0x5e,0x3a,0xce,0x51,0x3a,0x2e,0x21,0x52,0x07,0xc9, - 0xd5,0x93,0xa2,0x28,0x8d,0x7a,0x29,0x8a,0xef,0xd8,0x6c,0x8d,0x01,0x9c,0x4f,0xde, - 0xa9,0xdc,0xf7,0xb9,0x61,0xad,0xbb,0x7e,0xac,0xbf,0xe6,0xdf,0xe9,0xdd,0x3e,0x78, - 0x8f,0xa6,0x1f,0x90,0x23,0xfa,0x2a,0xc9,0x90,0x2f,0x8d,0x64,0x5e,0xcd,0x13,0x12, - 0x05,0xf4,0x6b,0xe4,0x19,0x6e,0xe4,0xb2,0xc1,0x79,0x9f,0x42,0xae,0xcc,0x1e,0x41, - 0xc0,0xf7,0xdb,0x85,0x37,0x39,0x28,0x10,0x61,0x70,0x04,0xb6,0xe9,0x6a,0x16,0x0e, - 0xb0,0x07,0xd0,0x88,0x36,0x25,0x21,0xcf,0x43,0x47,0x08,0xf2,0x0f,0x69,0xcc,0x9f, - 0x04,0x6f,0x1e,0x26,0x21,0x50,0xaf,0x32,0x01,0xb4,0x6f,0x49,0xed,0xb9,0xf8,0xdc, - 0xe2,0x66,0x49,0x94,0x17,0xee,0xf4,0xe2,0x0b,0x4f,0xde,0xc4,0x55,0x7e,0x32,0xc5, - 0xb7,0x9d,0x3b,0x33,0x1f,0xa0,0x08,0x41,0x65,0x0b,0x00,0x8b,0x2e,0xe5,0xb6,0xd3, - 0x39,0x69,0xd3,0x13,0x91,0x6b,0xdd,0x81,0x8b,0x08,0x81,0x6a,0xfd,0xea,0x83,0x7b, - 0x39,0x66,0xa2,0x3e,0xb9,0xa9,0x1b,0x4a,0xb3,0x95,0x94,0x5f,0x64,0x9e,0x54,0x70, - 0x03,0xa4,0xd3,0x35,0xbc,0x32,0x1b,0xde,0xcb,0x4d,0xa2,0x3e,0x15,0x2b,0x61,0x88, - 0x89,0x6a,0x85,0xe5,0xa0,0x65,0x4a,0xfd,0x6f,0xf7,0x9b,0x3c,0xde,0xb1,0x10,0x5e, - 0x43,0xb2,0x0d,0xfb,0xf2,0x24,0x96,0x5b,0x3e,0x4d,0x04,0x79,0xda,0x2b,0x7a,0x15, - 0xf5,0x17,0x42,0x8a,0xe6,0x6e,0x32,0x6a,0x3d,0x41,0xaf,0x86,0xa9,0xd3,0x9e,0x88, - 0x8a,0xf5,0x71,0xba,0x0b,0xd0,0x4c,0x1a,0x78,0xce,0x83,0x69,0x5d,0x9d,0xd6,0x2f, - 0x4b,0x6d,0x18,0x9f,0xa9,0x2e,0x19,0x74,0xa2,0x43,0x28,0xe9,0x82,0xe0,0x45,0x28, - 0x74,0x4a,0x33,0x79,0x47,0xbe,0xa3,0xfb,0x4b,0x4b,0x5b,0x33,0x2e,0x33,0xfc,0x04, - 0x3d,0x89,0x6c,0x94,0xb2,0x34,0xec,0xe6,0x9c,0x1c,0x21,0x20,0x36,0x47,0x77,0xe3, - 0x72,0xb5,0x09,0x34,0x2d,0xfb,0x7c,0xb2,0x8b,0x5c,0x64,0xbc,0x98,0x40,0x3f,0x7e, - 0xa6,0xd9,0xda,0xe7,0x9e,0x74,0xd0,0x25,0xbb,0x7a,0xcc,0x2d,0x19,0x63,0x42,0x73, - 0x41,0xb7,0xed,0x97,0xcd,0x3e,0x7d,0x1f,0xc5,0x5c,0x65,0x4a,0x05,0x62,0x73,0xa8, - 0xde,0x0d,0xd8,0x54,0x70,0x9b,0x56,0xe8,0xe0,0x03,0x78,0x77,0x14,0x7e,0x32,0xac, - 0x25,0xae,0xaa,0xbd,0xd8,0x36,0x41,0x16,0x8a,0xe4,0x82,0x60,0x86,0xda,0x85,0x38, - 0x55,0x9b,0x17,0x82,0x5b,0xb5,0x44,0x83,0x6f,0xf0,0x11,0xda,0xd0,0x34,0x3e,0xa2, - 0xdb,0x9e,0x93,0x64,0x4c,0xba,0x2f,0x8c,0xa7,0x54,0x09,0xb2,0x39,0xd4,0x7e,0x55, - 0xc3,0x11,0xfc,0x73,0xba,0x3c,0x2e,0x57,0x46,0x1e,0x56,0x45,0x9c,0x7e,0xe2,0xeb, - 0x08,0x9f,0x0d,0xfe,0x37,0x7f,0x66,0x58,0x65,0xd2,0xe6,0x1c,0x73,0xc9,0x09,0x54, - 0x89,0x6a,0x14,0xef,0xc5,0x31,0x91,0xd6,0xab,0xa1,0xc7,0xa4,0x11,0x2b,0x0f,0xea, - 0xf6,0x9d,0xca,0x3d,0xa3,0xdb,0xe0,0x5b,0x6b,0x0c,0xff,0x1d,0xa5,0xd6,0xdd,0x28, - 0x45,0x1f,0xb8,0xf1,0xd3,0xcd,0xd3,0xed,0x6c,0xce,0x9e,0xf8,0xb2,0x1f,0x15,0xba, - 0xea,0x7f,0x4e,0xbf,0xec,0x90,0x85,0xca,0x8a,0x46,0xd8,0xc1,0x33,0x7e,0xc2,0x39, - 0x28,0x1a,0x6b,0x5e,0x90,0x36,0x3f,0x9b,0x15,0x1c,0x81,0xfe,0xd8,0x3d,0x8b,0x09, - 0xa7,0x04,0xd8,0xec,0xc7,0x7d,0x78,0x0f,0xd8,0xbb,0xe3,0x39,0xfd,0x76,0x28,0x13, - 0xcc,0x19,0x77,0x34,0xeb,0x75,0x10,0x6e,0xe5,0x7f,0x58,0x93,0x52,0x22,0x37,0x2a, - 0xec,0x10,0xc8,0x56,0xfb,0x2a,0x07,0x3a,0xe2,0xc7,0xc6,0x1f,0x75,0x02,0x32,0x01, - 0x88,0x26,0xd9,0x83,0xab,0xb3,0x8a,0xcb,0xd3,0x8d,0x4a,0xd4,0xe4,0x5f,0x3f,0x7b, - 0xc7,0x2c,0xad,0xf5,0x17,0xab,0x19,0xef,0x64,0xd8,0xbe,0xb3,0xa2,0xee,0xe1,0x30, - 0x28,0x5b,0xc7,0x7f,0x8a,0x75,0x48,0xe0,0xfc,0xf9,0x5d,0x19,0xcb,0x90,0xe7,0xbd, - 0xff,0x3f,0xf0,0x9c,0xb6,0x0a,0xf9,0xb2,0x4b,0x4e,0xa6,0xd3,0xa8,0xa7,0x4b,0xe6, - 0xc5,0x8b,0xbb,0x98,0xea,0xe4,0x09,0x01,0x4b,0x40,0x25,0x09,0xf7,0x86,0xde,0x3b, - 0x81,0x5c,0xbb,0xa6,0xbd,0x57,0x86,0x91,0xc1,0x2c,0xe1,0x99,0x76,0x18,0x31,0x19, - 0x3d,0x87,0x57,0x7c,0xbf,0xe4,0x5a,0xcc,0xe0,0xc5,0xd2,0x2c,0x35,0xe5,0x14,0x62, - 0x65,0x30,0xd2,0x9c,0x9d,0x12,0x02,0xd2,0xca,0x86,0xc4,0x13,0x22,0x60,0x01,0xe3, - 0x02,0x45,0x12,0x8d,0xbe,0xca,0x6a,0xe8,0x6b,0xaf,0xcd,0x03,0x70,0xe7,0x55,0xc3, - 0xbe,0xca,0x93,0xbf,0x78,0xeb,0x8f,0x59,0xfe,0xa5,0x60,0x3f,0xdb,0x90,0x11,0x38, - 0x2e,0xae,0xbb,0x62,0xbb,0x2e,0xe0,0xee,0x1c,0xc2,0xcc,0xcb,0xd1,0x1a,0x25,0xa1, - 0x8f,0x4d,0x8a,0xf5,0x46,0xa0,0x35,0xdd,0x7c,0x7c,0x03,0x0d,0x71,0xe2,0xe5,0xb8, - 0x9b,0xfb,0xfd,0x77,0xbd,0x6e,0xb3,0x36,0x25,0x8c,0xfb,0x7b,0xd8,0xe7,0x15,0x17, - 0x33,0x35,0x95,0xfe,0x12,0xed,0x21,0x84,0x68,0xcc,0xc5,0xdf,0xfe,0xfd,0xa0,0xc2, - 0x68,0x6b,0x9c,0x79,0xb9,0xd2,0xa4,0xc0,0x24,0xd6,0x21,0x44,0xf6,0xf3,0x20,0xc6, - 0xa7,0x95,0x8c,0x32,0x94,0x1e,0x42,0xde,0x56,0x93,0xb9,0xa5,0x41,0x80,0xa1,0x07, - 0xfb,0x0b,0x61,0x01,0xfc,0xb4,0xc4,0x82,0x47,0x5f,0xb2,0xd5,0x57,0xf6,0x27,0xf1, - 0xe4,0x83,0x3c,0xb0,0x14,0x1c,0xc5,0x40,0x84,0xc8,0xdd,0x17,0xad,0x78,0xf6,0x24, - 0x87,0x1e,0xfc,0xb8,0x97,0x6b,0x8e,0xea,0x81,0xcf,0xcc,0x84,0x89,0x59,0xd4,0x23, - 0x84,0xf5,0x57,0x98,0x04,0x04,0x25,0xe8,0x80,0x99,0x7e,0x72,0x56,0xf8,0xb2,0x2b, - 0xcc,0xd9,0x51,0xa5,0x09,0xea,0x57,0x15,0xf6,0x19,0xa3,0x20,0x28,0xfe,0x5f,0x22, - 0x04,0x37,0x55,0x28,0x5e,0xb4,0xbe,0xb5,0xc3,0xd1,0xc3,0x46,0x54,0xe2,0x5e,0xf9, - 0x77,0x87,0x33,0x0c,0xbc,0xe3,0xf1,0x4c,0xee,0xdc,0xb2,0x4c,0x4f,0x79,0x17,0xab, - 0x8c,0xab,0x96,0x76,0xa7,0x76,0x2c,0xab,0x5e,0xe8,0xa8,0xcd,0x41,0xb6,0x1d,0x62, - 0x38,0xf5,0x9f,0x7c,0x85,0xdf,0xfd,0xc9,0xaf,0x2a,0x89,0x83,0x5b,0xe1,0xd3,0xe8, - 0xfe,0x84,0x91,0xb3,0x30,0x1d,0xc7,0xc8,0x95,0x5c,0x7f,0xd3,0x38,0xb9,0x44,0x48, - 0x98,0xed,0x4a,0x51,0x3f,0xfe,0x56,0x1e,0xcf,0xc7,0x65,0x98,0xf1,0x5a,0x56,0x0a, - 0x73,0x86,0xbc,0xb8,0x5f,0xad,0x1c,0xf2,0x6c,0x9d,0x01,0xda,0x9b,0x5e,0x1f,0x49, - 0x2e,0x25,0xf7,0x46,0xe2,0xa5,0x52,0x1d,0x0b,0xb2,0xa1,0x2f,0xf2,0x05,0xbf,0x3d, - 0x03,0x92,0x10,0xad,0x91,0x60,0xa5,0xdb,0x6d,0xdb,0x48,0x5b,0xdb,0xff,0xdb,0x3b, - 0x7f,0xd8,0xa0,0x44,0x49,0x3b,0x2e,0x09,0xcf,0xe6,0x9c,0x15,0xb9,0x51,0x2e,0xcd, - 0x0c,0xa5,0xb6,0xb4,0x79,0x2c,0x0d,0x23,0x1a,0x4e,0x67,0x0a,0xf2,0xcc,0x5a,0xa3, - 0xfb,0xc3,0x23,0x73,0xb1,0x10,0xdc,0xe1,0xe5,0xef,0xb7,0xfc,0x73,0xe7,0x11,0x41, - 0xbe,0x01,0x76,0x66,0xed,0x40,0x2b,0x0f,0x62,0xd8,0xd0,0xd9,0xd1,0x92,0x80,0x00, - 0x46,0xa0,0x0b,0xc0,0x58,0x79,0x45,0xf1,0x15,0x06,0xd8,0x61,0x14,0x60,0x18,0x23, - 0x61,0xa4,0x03,0xd0,0x68,0xf6,0xb4,0xe3,0x77,0x4d,0x22,0x7c,0xb4,0x29,0x95,0x7c, - 0x4a,0x85,0xff,0x69,0x31,0xd3,0x17,0x16,0x63,0xb9,0x53,0x17,0xe1,0x22,0x99,0xa2, - 0xa5,0xaa,0xcc,0x74,0x84,0x4b,0xd9,0x6e,0xf7,0xcc,0x1e,0xf7,0x53,0xbf,0xdb,0x2a, - 0x0e,0x71,0x79,0x4b,0xe5,0x33,0x12,0x19,0x5b,0xe7,0xec,0x10,0xed,0xbb,0x55,0xe7, - 0x0f,0x82,0x90,0x1e,0xaa,0xf4,0x0d,0x2b,0x5a,0x18,0x0b,0x4f,0x6d,0x07,0xe2,0x8d, - 0xce,0x86,0x27,0x9b,0x8a,0xe7,0x80,0x53,0xbe,0xe5,0xed,0x14,0x10,0x70,0x29,0xf4, - 0xe3,0xa0,0x91,0x1f,0x0b,0x23,0x25,0x15,0x46,0xed,0xfd,0xf4,0xd8,0x2b,0x96,0xf9, - 0x20,0xa3,0xfc,0x99,0xd0,0xf6,0x2e,0x59,0x72,0x0e,0xea,0x3e,0x19,0x9c,0xd9,0x2b, - 0x7f,0x06,0x0a,0xc9,0xbf,0xa0,0x22,0x47,0x73,0x0f,0x99,0xfe,0xdb,0x66,0x17,0x58, - 0xbe,0xae,0xbd,0x60,0xa9,0x2a,0x15,0x07,0x23,0x1f,0xc3,0x0f,0xde,0x22,0xcb,0x48, - 0xf3,0x2e,0x2c,0xa2,0x7a,0xf9,0x04,0xc5,0xa8,0x15,0xe3,0x82,0x56,0x0d,0x83,0x7c, - 0xce,0xeb,0x05,0x6c,0xe8,0xfd,0x6a,0xa7,0xc1,0x8f,0xf3,0x64,0x22,0xfb,0x1a,0xf2, - 0x49,0x1c,0x4c,0x61,0x02,0xcd,0xe3,0xc3,0x4f,0x82,0x5a,0x61,0xd0,0xd8,0x18,0x05, - 0xee,0x27,0xe7,0x81,0xb3,0x52,0xa1,0xc3,0x88,0xd1,0x95,0x94,0x80,0x30,0xf0,0x6c, - 0x62,0xc8,0xb0,0xca,0x31,0x73,0xe6,0xce,0x89,0x10,0x8c,0x55,0xa1,0xf8,0x03,0x44, - 0x64,0xd1,0x9c,0xa6,0x3c,0x56,0x80,0x1e,0x64,0xf6,0x6b,0x61,0xf4,0xd5,0x5f,0x90, - 0x63,0xe1,0x09,0x3c,0xef,0xf5,0xe7,0x74,0x29,0x22,0x96,0x0a,0xd0,0x39,0x7d,0x3e, - 0x2d,0xb0,0x8f,0x78,0x92,0x3b,0xeb,0x83,0x6d,0xa0,0xb5,0xe7,0xbb,0x7b,0x5e,0xca, - 0x93,0xaa,0x77,0x12,0x71,0x57,0x55,0x4d,0x02,0x4c,0x4d,0xb3,0xa5,0xda,0xe1,0x0c, - 0x47,0xf4,0x59,0x91,0x3e,0x13,0x68,0x0c,0x9d,0xfb,0x1b,0x9d,0x08,0x3a,0xb4,0x67, - 0x90,0x75,0xb4,0x77,0x80,0x55,0x0d,0xa9,0x5d,0xf9,0xe6,0xbe,0x39,0xd9,0x3d,0x62, - 0x9b,0xae,0x1b,0x84,0xb0,0xf0,0x43,0x5a,0xc2,0xfa,0x55,0x86,0x59,0xfa,0xe8,0xd9, - 0xad,0x3a,0xe9,0x48,0xb8,0x7b,0x8c,0xca,0x9d,0x50,0x8c,0xbf,0x2e,0xd6,0x1e,0xb6, - 0xc3,0x4d,0xce,0x58,0x09,0xd8,0x74,0x1e,0x83,0x0d,0x1d,0x0c,0x2e,0x12,0xca,0xcb, - 0x1f,0x8c,0xbf,0x1a,0x1f,0x3b,0xf2,0x6b,0x0d,0xf0,0x12,0x76,0x7a,0xdd,0xab,0x5a, - 0x87,0x16,0x1d,0xc0,0xaa,0xf5,0x09,0x0b,0xee,0xdb,0x17,0x79,0x43,0xd7,0x15,0xd9, - 0xc3,0x0e,0xef,0x8c,0x1a,0xb7,0x09,0x89,0x6b,0x40,0xe5,0x02,0xfd,0x84,0xf7,0x3f, - 0xfc,0x89,0xf2,0xc1,0xfd,0xa3,0x7d,0xe2,0x41,0x82,0xbc,0x07,0x37,0xf1,0xf3,0x30, - 0x03,0x78,0x12,0x66,0x95,0xbe,0xaf,0xc1,0xc1,0x4a,0xe2,0x1d,0x3f,0x50,0x12,0xde, - 0xfb,0x80,0xf8,0x00,0x52,0xb0,0xf7,0xf0,0xa7,0x1a,0xa7,0x1b,0x3f,0xa6,0xda,0x97, - 0xcb,0xeb,0x97,0x2a,0xf4,0xa7,0x0e,0xb7,0x83,0x81,0xc7,0x30,0x74,0x4c,0x05,0x53, - 0x3e,0xa5,0x1b,0x81,0xeb,0x02,0x66,0x4a,0x40,0x26,0xe0,0x04,0x52,0xa8,0x0a,0xad, - 0xee,0x74,0x73,0xdc,0x16,0xb6,0xb8,0xe7,0x18,0x68,0x3a,0xfe,0x74,0xc5,0x3c,0x84, - 0x6f,0x85,0x7d,0xb7,0x16,0xb9,0xfe,0x10,0xb6,0xc9,0xe7,0x8f,0x46,0x2b,0x73,0x51, - 0x45,0x83,0xd7,0x8b,0xf7,0x87,0x6c,0x91,0x47,0x5d,0x3b,0x9f,0x47,0x2a,0x2a,0x1e, - 0x3f,0xbc,0xc3,0x4e,0x50,0xb3,0x3a,0x3e,0x84,0xab,0xa3,0x5e,0x00,0xe1,0x10,0xe9, - 0x5a,0x24,0x18,0xbe,0xf4,0x38,0x60,0xba,0x31,0x66,0xa2,0x92,0xbc,0x46,0x99,0xe3, - 0x5c,0x45,0x03,0x39,0xe0,0xba,0xa4,0x38,0xae,0xc9,0xab,0x5c,0xec,0x65,0xe5,0xfb, - 0x89,0xa2,0x47,0x8d,0x85,0xa3,0x9b,0xcb,0x6d,0x18,0xa8,0x4c,0xad,0x87,0x6a,0x5b, - 0x65,0xdd,0x22,0xdb,0xc1,0xee,0x4c,0x46,0xc1,0x6a,0xb3,0x3a,0x7d,0x5d,0x3a,0x76, - 0xf6,0x84,0xd4,0x8b,0x7e,0x8d,0xea,0xbe,0xa6,0xe7,0x01,0xfb,0x51,0x67,0x9c,0x49, - 0x82,0x2a,0xa5,0xe0,0x9d,0x8c,0xef,0xab,0x80,0xcf,0x93,0x6d,0x87,0xe3,0xb7,0x29, - 0x64,0x1e,0xb3,0x6b,0x1d,0xab,0x6d,0x1e,0x30,0x42,0x2c,0xfa,0x59,0x7d,0x6d,0x72, - 0x33,0xa1,0xb8,0x9b,0x5f,0xbf,0xc1,0xb3,0x1c,0xd4,0xa7,0xdf,0x57,0xf2,0x54,0xf9, - 0x4d,0x9c,0xc6,0x65,0xb1,0x1c,0x1c,0x75,0x8c,0xd2,0x7a,0x63,0x9c,0xe0,0xe5,0x16, - 0xf9,0x1f,0xa7,0xec,0x54,0x33,0xc3,0xb2,0xdc,0xf2,0xef,0xa7,0x8c,0xb0,0x3b,0xf1, - 0xc5,0xde,0xd5,0x27,0x6b,0xf1,0x5b,0xd6,0x86,0xd7,0xc5,0x33,0xb3,0x36,0xa4,0x57, - 0x69,0x99,0xe0,0x24,0xb6,0x34,0x4a,0x00,0x07,0xd0,0x60,0x95,0x21,0xff,0xac,0x47, - 0x7a,0x98,0xfc,0xf2,0x6b,0x6e,0xed,0xb5,0xad,0xff,0xdc,0xe6,0x96,0xee,0x1b,0xeb, - 0xc6,0xcc,0xdf,0x2f,0x6a,0x79,0x14,0x23,0xf2,0x7b,0xf3,0x0f,0x36,0x36,0x92,0xa0, - 0xd7,0xf9,0x1b,0x2a,0x8e,0xcc,0x35,0xf6,0xc7,0x96,0xdf,0x01,0xf1,0x15,0x58,0x8c, - 0xcd,0x1b,0xe0,0x68,0x3a,0x5a,0x4f,0xdb,0x10,0xce,0xec,0xaf,0xdf,0x48,0xee,0x0f, - 0xb0,0x36,0xbb,0xed,0x05,0xd7,0xee,0x28,0x6d,0x74,0xfe,0x83,0x96,0xbd,0x51,0x0f, - 0xe6,0xd5,0x0a,0x74,0x74,0xe0,0x3f,0x67,0x63,0x77,0x77,0x3a,0x37,0x71,0x3c,0x88, - 0xba,0xaa,0xc9,0x52,0xbc,0xfb,0x6b,0xcb,0x6d,0x5d,0xe5,0x9d,0xfb,0x39,0x81,0x0a, - 0x2a,0xb5,0xb5,0x37,0xfd,0x27,0xb3,0x6e,0x24,0x31,0x7a,0xae,0x78,0x51,0xd1,0xba, - 0x3f,0xdf,0xca,0x53,0x0c,0x79,0xef,0xba,0x6b,0x29,0x38,0x21,0x79,0x5f,0x64,0xd8, - 0xf9,0xaf,0x00,0x4b,0xd1,0x52,0x4f,0x14,0x61,0x78,0x3c,0xdf,0xfa,0xbc,0xa9,0x06, - 0x0e,0x30,0x55,0x18,0x7d,0xbf,0xee,0x0b,0x44,0x7e,0x0a,0xbf,0xbb,0xb1,0xc3,0xe8, - 0xc4,0xcb,0xba,0x43,0xca,0x9f,0x80,0xe0,0x44,0xad,0xa8,0x00,0x53,0x50,0x51,0x03, - 0xe4,0x08,0xd8,0x63,0x5b,0x66,0xa4,0x14,0xd9,0x05,0x3a,0xd6,0x41,0xac,0x43,0x12, - 0xd7,0xe8,0xbb,0x9f,0x63,0xff,0x81,0x8e,0x37,0x02,0xac,0x14,0x54,0x7d,0x8a,0x60, - 0xce,0x0a,0xe7,0x67,0x1c,0xd5,0xb8,0x36,0x20,0x25,0x09,0x9a,0x26,0x33,0x16,0xa2, - 0xf1,0x79,0xb8,0x60,0xa3,0x2d,0x84,0x9a,0xff,0x27,0x34,0x43,0x9b,0x00,0x7d,0xb2, - 0xbe,0xf1,0xb3,0x2f,0x1d,0x9a,0x3d,0x30,0x03,0x38,0xf1,0x27,0xd7,0x79,0xe2,0xa3, - 0x62,0xd9,0x46,0x3f,0x1f,0x44,0xac,0xe1,0x0d,0x26,0xff,0x87,0x1b,0x02,0x31,0x63, - 0x5e,0xab,0x72,0xd0,0x64,0xda,0x3c,0x9e,0x9f,0x59,0xa1,0x52,0x1a,0x03,0x83,0xe0, - 0x80,0xc5,0x7d,0x7e,0xce,0xf7,0x82,0x57,0x90,0x47,0xaf,0x1d,0xdc,0x77,0x8a,0x0c, - 0x2d,0x84,0xb0,0x87,0xe2,0xa4,0x39,0xda,0xa9,0x58,0x22,0x18,0xb0,0x0d,0xaf,0x9b, - 0x84,0x00,0x43,0x15,0x34,0x46,0x21,0x03,0x6b,0xb6,0x2b,0xde,0x7b,0x7a,0x52,0x1a, - 0x6e,0x10,0xe8,0xe7,0x19,0x4b,0xb0,0x22,0x6a,0xce,0x0a,0xce,0x55,0x56,0x3a,0x74, - 0xd3,0x3f,0x06,0xb3,0x89,0x03,0x6c,0x1a,0xf1,0x13,0xfc,0x8e,0x93,0x08,0xf3,0x6a, - 0x73,0xd1,0x75,0x1b,0x35,0xd2,0xcd,0x87,0xbe,0x2e,0x4a,0x4e,0x33,0x29,0xb8,0x3b, - 0xf8,0x91,0x53,0x27,0xbb,0xde,0xc3,0x81,0xd8,0xb3,0xfa,0x3e,0x5e,0x72,0x1d,0xbb, - 0x70,0x82,0x70,0xf8,0x6c,0x92,0xa0,0x02,0xe5,0xf0,0xa5,0x7b,0x32,0x60,0x12,0xe2, - 0x48,0x1d,0xbc,0x2c,0x93,0x71,0xaf,0x3b,0x91,0x46,0x34,0xee,0x97,0x60,0xd7,0xab, - 0x5e,0xc9,0x2c,0x9a,0xbd,0x3c,0x7b,0x4e,0x3d,0xff,0x67,0xbd,0xc8,0xd0,0xf8,0x05, - 0xcf,0xfe,0x70,0x84,0xa4,0x06,0x1d,0xb0,0x13,0x8f,0x27,0x47,0xd4,0x05,0x56,0x33, - 0xda,0xd2,0xf3,0x77,0x1d,0x3e,0x65,0xda,0x00,0x8f,0x3d,0xff,0x56,0xde,0xe4,0x4a, - 0x23,0x84,0xfe,0x43,0xc1,0xbf,0x14,0x9f,0x1e,0xab,0xea,0x18,0xd1,0x11,0xb7,0xab, - 0xb5,0xaa,0x4c,0x53,0xc4,0xbe,0x88,0x0b,0xb2,0x36,0xb9,0x09,0xf0,0xd8,0x3b,0xc7, - 0x57,0x60,0xc1,0x42,0x49,0xbd,0xee,0x44,0x15,0xeb,0xeb,0x18,0x51,0xad,0x76,0x5a, - 0x50,0xe7,0x49,0x52,0x4c,0x76,0x76,0xbb,0xcd,0x4b,0x89,0xc5,0xfb,0xc8,0xb3,0xe8, - 0x9c,0xe2,0x16,0x4c,0x7c,0xdc,0x69,0x8c,0x91,0x47,0xee,0xa4,0xdf,0x39,0x57,0x82, - 0xce,0x02,0x1e,0x33,0xce,0xd9,0x0e,0x7e,0x3b,0x86,0xb5,0xb3,0xda,0xfc,0xc7,0xf4, - 0x5b,0x97,0xff,0x84,0x55,0x08,0x69,0x4b,0x1d,0xde,0xae,0xb2,0x5b,0xff,0x2d,0xef, - 0x26,0x00,0x33,0x6e,0x1a,0x0b,0x28,0x5b,0x82,0x54,0x8c,0x47,0x40,0xaf,0x28,0x2a, - 0xed,0x91,0xfd,0x3a,0x2a,0x81,0x16,0x3f,0x26,0x2a,0xec,0x5d,0x58,0xe3,0xb7,0xaa, - 0xfa,0x22,0xcf,0xa3,0xdc,0x7c,0x56,0xf4,0x92,0x2b,0x84,0xfd,0xa5,0xc2,0xec,0x26, - 0x4b,0xa2,0x3d,0xc5,0x4f,0xf1,0x6c,0x67,0x5b,0x68,0x17,0x08,0xa8,0x12,0x7e,0xdf, - 0x8f,0x08,0xf4,0x3f,0x17,0x82,0x20,0x83,0x7d,0xc0,0xe5,0x63,0x08,0xd2,0x03,0x74, - 0xfb,0xec,0x60,0x1e,0xb8,0xa3,0xa3,0xdc,0x60,0x57,0x54,0xd5,0xf7,0x85,0x2d,0x6d, - 0x88,0x07,0x4f,0xe9,0xf4,0x77,0x2d,0x4d,0x9d,0xce,0x4d,0x37,0x5f,0x4c,0x78,0x08, - 0x42,0x88,0xcf,0x12,0x19,0x2f,0x31,0x2e,0x32,0xc2,0x8c,0xa0,0xf0,0xfd,0x28,0x53, - 0xfb,0x80,0x52,0x33,0x5c,0xac,0x1b,0xcc,0x3d,0xcc,0x19,0x1e,0x3e,0xa7,0x33,0xb8, - 0x22,0x2f,0x34,0xbd,0xe7,0xc7,0x4b,0xc7,0xb5,0xf8,0xa6,0x61,0xbd,0x80,0x68,0x2d, - 0x7b,0x7a,0x52,0xac,0x07,0x68,0x7e,0xfd,0xfe,0x93,0x86,0xd6,0x47,0xa8,0x19,0x4b, - 0xed,0xc2,0x9a,0x8d,0x3d,0xe7,0xa5,0x28,0xc4,0x28,0x61,0x8f,0xd2,0xab,0xd2,0xf6, - 0x70,0x3b,0x96,0x5f,0x72,0x78,0x71,0x66,0x36,0xb1,0x87,0xd6,0x9f,0x1c,0xe1,0xb2, - 0x3f,0x3c,0xdb,0x29,0xbd,0xb9,0xa2,0x58,0x9d,0xd7,0x8c,0x29,0x6a,0x47,0xf5,0x7c, - 0x7e,0x6e,0x94,0x18,0x57,0xed,0xad,0xc5,0xb8,0xaa,0xc2,0x19,0xfe,0xa8,0x91,0xd7, - 0xfb,0x2d,0xdb,0x5c,0x3f,0xb5,0x6d,0xc9,0xdc,0x37,0x17,0x45,0x7f,0x47,0x74,0x72, - 0x64,0x51,0xf3,0x1b,0xd7,0xcf,0xc0,0x41,0xe3,0x54,0xf3,0x36,0x64,0x4a,0xb6,0x11, - 0xdf,0xef,0xe3,0x38,0xe1,0xed,0x09,0x01,0xd8,0xf3,0xcc,0x93,0x7d,0xac,0x44,0x5c, - 0x91,0x30,0x95,0x79,0xbe,0x72,0x57,0x94,0xae,0x51,0xec,0x1c,0xa0,0x40,0x48,0x18, - 0x0a,0xed,0xdb,0xb5,0x32,0xa3,0xf4,0xa1,0x6f,0x43,0xf5,0x93,0x37,0xcd,0x8a,0x21, - 0x15,0x22,0x5f,0x3d,0x60,0xee,0x86,0x5f,0xa4,0xc0,0xab,0xfb,0xda,0x9d,0x81,0x14, - 0x25,0x20,0x18,0x0f,0x10,0x84,0x35,0xdd,0x18,0x2f,0xcc,0x94,0x04,0x6f,0xd3,0x16, - 0x5a,0xf0,0x48,0x65,0x96,0x3a,0xba,0x38,0x66,0x11,0xaf,0x4c,0xc0,0x25,0x1f,0x6b, - 0x64,0x5d,0x05,0x89,0x38,0x3f,0x0a,0x06,0x1f,0xda,0x14,0x45,0x0d,0x77,0x0d,0x96, - 0x96,0x07,0xa9,0x10,0x91,0xc4,0x53,0x51,0x42,0x92,0xc5,0x85,0x2c,0xe6,0x64,0x81, - 0x9c,0x94,0x9c,0xe1,0xc3,0xbb,0x4d,0x69,0xd5,0x24,0xa0,0xd7,0xd7,0x0b,0x57,0xdd, - 0x84,0x11,0xdd,0xd0,0xff,0xd1,0x53,0x1d,0x86,0x49,0xa6,0x30,0x0b,0x5a,0x28,0x6d, - 0xa6,0x27,0x51,0xb8,0x15,0xf7,0x1b,0x01,0x71,0x5b,0xcb,0x47,0xd8,0x29,0xc2,0x8d, - 0x7e,0x08,0x95,0x15,0x3b,0xb9,0x84,0x81,0x76,0xe8,0x5d,0x07,0x6d,0x24,0xa4,0x62, - 0xb8,0x55,0xa2,0x0e,0xd5,0xfc,0x9a,0x20,0x97,0x28,0xce,0xa1,0xdf,0x7d,0xdb,0x9b, - 0x69,0xad,0x0a,0x32,0xd6,0xdd,0x96,0x69,0x9c,0xda,0xc6,0x45,0xc4,0x0d,0x3f,0x8a, - 0xea,0xdb,0xb2,0x7c,0x38,0x17,0x59,0x49,0x59,0x9b,0xa0,0xf5,0xce,0x5b,0x8f,0x95, - 0x21,0x96,0x97,0x6c,0x1e,0xde,0x81,0xb2,0x4b,0x75,0xc7,0x8d,0x8d,0x47,0x58,0x28, - 0xb3,0xa3,0x46,0x4a,0x62,0x47,0xe6,0x85,0xb0,0x73,0x88,0xe9,0x8f,0xf3,0x91,0xa4, - 0x01,0x42,0x69,0x23,0x39,0x4d,0x06,0x91,0xb5,0x95,0xde,0xae,0xde,0x75,0x3e,0x43, - 0x53,0x6f,0x27,0xd2,0xc1,0xfc,0x0f,0x85,0x38,0x96,0x43,0x94,0x5d,0xf8,0x50,0x7e, - 0x54,0x02,0x30,0xad,0x90,0x32,0x07,0x91,0x3d,0x77,0xdf,0x1d,0xdb,0xff,0x3a,0xf3, - 0x74,0xff,0xba,0x9b,0xef,0xad,0x14,0x22,0x06,0xdd,0x80,0x18,0x35,0x7b,0x76,0x2d, - 0xe8,0x88,0xee,0xc4,0xf8,0x4b,0x0a,0x21,0xba,0x9c,0xfe,0x08,0x50,0xa1,0x3f,0x64, - 0x0d,0x60,0x62,0xfb,0x1d,0xdf,0x4f,0xc3,0x88,0xc7,0x76,0x53,0x2f,0x0c,0x11,0x00, - 0xea,0xd2,0x49,0x51,0xeb,0x29,0xf5,0xaa,0xc0,0x71,0x26,0xa6,0xa5,0xac,0x10,0x68, - 0x4a,0x05,0xbe,0xf4,0xfb,0x9e,0x70,0xea,0x43,0x74,0xe9,0x94,0xad,0xcb,0x11,0xcf, - 0xe6,0xfa,0x93,0x54,0x15,0xb5,0xbf,0x84,0x85,0x41,0x88,0xc6,0x43,0x65,0xd4,0x45, - 0x8b,0xeb,0x3c,0xa9,0x92,0x99,0x91,0x25,0x8b,0x5d,0x07,0x96,0xe0,0xcb,0xa5,0xc2, - 0xf7,0x0f,0xb0,0x4a,0xbd,0xf2,0x4c,0xb6,0x3a,0xe1,0xd1,0x71,0x5b,0xda,0x06,0xf5, - 0x0c,0xa5,0x80,0x32,0x17,0xdd,0x4b,0xf7,0xed,0xc1,0xb2,0x3c,0xb9,0x73,0x6a,0x1a, - 0x57,0x04,0x86,0xf3,0x1a,0x6b,0x9a,0xde,0x5b,0x04,0x20,0xdc,0x5d,0x27,0x9c,0xa9, - 0x69,0xd8,0xc9,0xe5,0x79,0x68,0x17,0x49,0xdc,0xc1,0x74,0xdb,0xeb,0x9c,0x79,0x64, - 0xc7,0x61,0x30,0xfb,0x89,0xd6,0x0d,0x05,0x6e,0x4f,0xcf,0x9d,0xf3,0x62,0xc0,0x37, - 0xc0,0xdd,0x94,0x73,0x7c,0x90,0xc5,0x98,0xca,0x53,0xb2,0xe9,0x9c,0xcd,0x13,0xc7, - 0xec,0xf8,0x0a,0x44,0xa8,0x99,0x9a,0x3c,0x02,0x56,0xc6,0x32,0x72,0x22,0xb9,0x4b, - 0xca,0x83,0x7e,0x16,0xe9,0x2e,0x48,0xe3,0xcb,0x7e,0xeb,0x88,0xf3,0xab,0xd7,0xa5, - 0x8b,0x61,0x1b,0xfd,0xcd,0x7d,0xbc,0x8d,0x9d,0x4b,0xff,0xe9,0x53,0xec,0x5d,0x53, - 0x85,0xa6,0xe6,0x85,0x31,0x12,0x1c,0xb0,0xe7,0xa1,0xa8,0xc2,0x08,0x3f,0x0c,0x76, - 0x12,0x9f,0x8f,0x10,0x47,0xd3,0xd9,0x58,0xb6,0x1c,0xde,0xf3,0x90,0xd7,0xfd,0x09, - 0x05,0x94,0xbf,0x63,0x92,0x23,0x2f,0x47,0xc2,0xa3,0xd4,0xc3,0x82,0x76,0xb5,0x99, - 0x83,0xfe,0xc5,0x80,0x82,0x36,0x0b,0x8d,0x46,0xfe,0x0a,0x31,0xf4,0xf0,0xa8,0x53, - 0x56,0x1c,0x04,0xdc,0x81,0xc0,0x6a,0x30,0xa8,0x3d,0xea,0x50,0x0e,0xdb,0xb6,0xd2, - 0x63,0x98,0xca,0x8b,0x8e,0xc9,0x9d,0xb7,0x82,0xf3,0xda,0x54,0x9a,0xcf,0xc7,0xba, - 0x68,0xc7,0xd2,0x3d,0xb2,0x8d,0x95,0xa5,0x9a,0x5c,0x84,0x9b,0x72,0x37,0x14,0x4e, - 0x44,0x0c,0x16,0xd5,0xb5,0xa7,0xc1,0x75,0xea,0xd8,0xcf,0x0a,0x0c,0xfa,0x46,0x28, - 0x50,0x58,0x5c,0x9c,0xbd,0x9b,0x58,0xc8,0x6c,0xd5,0xde,0x2c,0xf5,0x63,0x57,0x4a, - 0x4a,0x39,0x82,0x9c,0x1b,0x48,0xf2,0x2a,0x79,0x51,0x66,0x34,0xdc,0xff,0xef,0xb1, - 0x2f,0xab,0x17,0xad,0x88,0x7a,0xef,0x41,0x3f,0x17,0xab,0xcb,0x32,0x8b,0xf7,0x91, - 0xca,0x8a,0x0f,0xdc,0xb9,0x79,0x99,0xcb,0x4e,0x40,0x9f,0x5b,0xca,0x8d,0xa1,0xbe, - 0x09,0x5c,0xa2,0x35,0x2a,0x7e,0x1e,0x69,0x59,0x11,0x84,0x13,0x7c,0xe6,0xd4,0xab, - 0x60,0x16,0x97,0xfb,0x9e,0x36,0xe6,0xbf,0xa9,0xfd,0x96,0x68,0x92,0xc7,0xaf,0x68, - 0x88,0x3d,0xc4,0x27,0x66,0xef,0xef,0xd8,0x9e,0x11,0x4d,0x69,0xa9,0x59,0x4e,0xf9, - 0xf5,0xbf,0x4e,0x35,0x7b,0x72,0x57,0xf0,0xd8,0x5a,0xcd,0x03,0x04,0xd2,0xbf,0x7d, - 0xe5,0x9b,0x58,0xa6,0x24,0xf0,0x75,0x50,0x77,0x3e,0x70,0x62,0x40,0xfb,0xf2,0x84, - 0x36,0xcc,0xae,0x92,0x10,0xad,0x7c,0xda,0x92,0x8c,0x00,0xcd,0xd8,0x1c,0xca,0xe5, - 0xb7,0x74,0x61,0xbb,0xda,0xa8,0xc9,0xab,0x63,0xc6,0x89,0x41,0x27,0xf2,0xd1,0x55, - 0xb9,0xcd,0x89,0x37,0xa6,0xde,0xc2,0xf4,0x1b,0xcb,0xde,0xc8,0x20,0x75,0x5e,0x92, - 0xd8,0xc6,0xb9,0x5d,0xf3,0xc8,0x36,0x8a,0xe7,0x86,0xd4,0x1b,0xde,0x52,0xc4,0x20, - 0xcd,0xec,0xb7,0x42,0x11,0x3f,0x1e,0x17,0x41,0x8d,0x24,0x05,0x04,0x67,0xe9,0x7a, - 0x85,0x04,0x83,0x43,0x95,0xe4,0xf9,0x7b,0x4b,0x4b,0xd5,0xd8,0xd0,0x7c,0x16,0x21, - 0x45,0x87,0x18,0xae,0x87,0xe5,0x2b,0xb3,0x8b,0x85,0x86,0x04,0xf9,0x8b,0xb1,0xfb, - 0x78,0x4e,0xf8,0x0a,0xbb,0xac,0x34,0x54,0x92,0x87,0x49,0x15,0x20,0x73,0xae,0xba, - 0x39,0x59,0xf3,0x71,0xb8,0x08,0xd1,0xdc,0x7e,0x17,0xe0,0x3c,0xee,0x30,0xfc,0x9d, - 0xae,0x3b,0xb3,0x8b,0x99,0xa6,0x13,0x3b,0x2d,0xd1,0xb3,0xe8,0x21,0x5c,0x15,0x27, - 0x76,0xe7,0x38,0xf9,0x38,0xc5,0x83,0xfc,0x0f,0x9b,0xda,0x7f,0xc9,0xf0,0x19,0x0d, - 0x3d,0xa8,0xe1,0xa4,0xc2,0x1d,0xfa,0x3b,0x7d,0x3a,0x95,0xae,0x14,0x41,0x66,0xa5, - 0x0c,0xef,0xca,0x43,0x64,0x4d,0xc0,0x9a,0x0f,0xdd,0xc4,0xdb,0xd2,0x5b,0xdb,0xd0, - 0x7f,0xcc,0xb8,0x4f,0xe5,0xce,0xa9,0x67,0xfd,0x38,0xb8,0x5f,0x29,0x51,0x32,0xc4, - 0x6a,0x30,0x2b,0x87,0x29,0x1f,0xa1,0x7f,0xeb,0xa3,0xf3,0x7b,0x57,0x52,0xdc,0xa2, - 0x58,0x5a,0x2c,0xae,0x35,0xf0,0x04,0x56,0x6c,0x91,0x6e,0x3a,0x47,0x06,0x72,0x70, - 0x6d,0x14,0x16,0x13,0x3b,0x3b,0x6c,0xb7,0x45,0xc0,0x49,0x32,0x70,0xa1,0x7c,0x4b, - 0x01,0x4d,0xb1,0xec,0x87,0x97,0x25,0x8e,0xa0,0xd3,0x0f,0x47,0xee,0xda,0x3f,0x82, - 0x5e,0x88,0x7a,0x68,0x4e,0xdd,0x24,0x37,0xb0,0x97,0xe4,0x94,0x10,0x9f,0xa4,0x86, - 0x16,0x9c,0x1b,0xb5,0x71,0xda,0xae,0xe7,0x42,0x59,0x24,0xa1,0xa8,0xfc,0x54,0xb4, - 0xd4,0x85,0x7f,0x91,0x39,0x1a,0x42,0x96,0x44,0x95,0xb7,0xa5,0x1d,0x56,0xe5,0xc1, - 0xbb,0x8d,0x02,0x87,0xf2,0x1b,0x2c,0x85,0x41,0x97,0x75,0xe4,0x0f,0xb4,0xd5,0x28, - 0x2a,0x3a,0x7e,0xa4,0xcf,0xd5,0x49,0xed,0xe1,0x4c,0x83,0x42,0x7f,0x4a,0x3a,0xec, - 0xdf,0xf6,0x98,0x5e,0xe6,0xfa,0x08,0x7b,0x4f,0xf0,0x72,0x55,0xf1,0x05,0xc1,0xfc, - 0xa2,0x1f,0x02,0xec,0xe3,0xfb,0x3f,0xdc,0x92,0x04,0x25,0x34,0x7e,0x79,0x40,0xcb, - 0xfc,0x81,0x2f,0xb6,0xbf,0xca,0x6e,0xa9,0x49,0x05,0xd0,0x5f,0x7c,0xe5,0x2b,0x5b, - 0x89,0x10,0xa3,0x6d,0xbc,0xdb,0x6f,0xcc,0xa1,0xb7,0xe6,0x20,0x9a,0x3d,0x2c,0x51, - 0xd5,0x31,0x22,0x1e,0x40,0x13,0x60,0xf4,0x04,0x28,0xf0,0x4e,0x97,0x46,0x51,0x45, - 0xda,0x14,0xd0,0x7e,0xb2,0x3b,0x00,0xfc,0x0c,0x18,0x3e,0x26,0x16,0x50,0xab,0x51, - 0x5d,0xf0,0x70,0xbd,0x55,0xbd,0xa5,0x1b,0xde,0x2f,0xe5,0xee,0x01,0x73,0x4f,0x31, - 0x5e,0x16,0xee,0x9f,0xbb,0x97,0xac,0x08,0x63,0xd2,0x2b,0x9f,0xb5,0x91,0x62,0x01, - 0x03,0x40,0xbe,0xa5,0x9f,0xd6,0x5b,0xb0,0xbf,0xed,0xf6,0x19,0x51,0xa0,0x6e,0xc9, - 0xea,0x12,0x70,0x37,0x60,0x8c,0xd8,0xb4,0x12,0x05,0xde,0x2b,0x19,0x62,0x25,0x7a, - 0x69,0xc1,0x89,0x00,0x79,0x01,0xc5,0x66,0x1e,0x48,0x51,0xfd,0xc3,0x20,0x37,0xa0, - 0x43,0x03,0xdd,0xd2,0x5b,0xd2,0xb5,0x42,0xa7,0xe5,0x85,0xdd,0xf5,0xe8,0x09,0x44, - 0x5e,0x0e,0xd9,0x26,0xe5,0x22,0x0b,0x26,0xbf,0x05,0x40,0xe6,0xe8,0x5a,0xb5,0x17, - 0xfa,0x73,0x73,0x70,0x9c,0x23,0x23,0x57,0xe2,0xfa,0xb1,0x16,0x85,0x24,0x3f,0x46, - 0x23,0x39,0xe1,0x30,0x33,0x99,0x31,0xd7,0x9c,0x4b,0xe9,0xfa,0x50,0x51,0x13,0x53, - 0x30,0x9e,0xbc,0x82,0x32,0xd1,0xc9,0x93,0xb4,0x63,0xb9,0xde,0x08,0x6a,0x7c,0xbd, - 0x80,0xb5,0x8a,0xe4,0xf1,0x3b,0x5d,0xdb,0x7e,0xe5,0x96,0xce,0xa4,0xab,0x18,0xe7, - 0xf6,0x84,0x5c,0xee,0x38,0x19,0x4f,0x1b,0x25,0xe9,0x6d,0x18,0xa6,0xbc,0x05,0xa9, - 0x61,0xb0,0xf9,0xed,0x94,0x87,0x45,0xbb,0xc8,0xe5,0x20,0x9c,0xde,0xd3,0x59,0xe6, - 0x7e,0x49,0x4b,0xc5,0x3d,0x86,0x4b,0x4a,0x92,0xf4,0x8e,0x2c,0xe1,0xe0,0x23,0x6c, - 0x7c,0xa3,0xa2,0xe7,0xdd,0x21,0x8d,0x2a,0xb2,0x45,0x35,0xee,0xe0,0xf2,0xfe,0x3a, - 0xe0,0x8e,0xbf,0x93,0xba,0x9b,0xe8,0x81,0x7b,0xb1,0x2b,0x50,0xfa,0x92,0xe7,0x2b, - 0x61,0x6d,0x20,0x69,0x15,0x28,0x60,0xb4,0xee,0xd5,0xeb,0xf3,0xfe,0x68,0xa7,0xca, - 0xa9,0xa2,0xab,0xf6,0x0c,0x22,0x64,0x26,0x1e,0xd2,0x82,0x5c,0x7e,0x03,0xc3,0x7f, - 0xad,0xbd,0xba,0x34,0xbf,0xc6,0xef,0x91,0x06,0xff,0xf5,0x80,0x13,0xb9,0xcc,0x48, - 0x0e,0xbc,0x60,0x0a,0x30,0xe2,0x4a,0x43,0x0b,0xfc,0xce,0x1b,0x9a,0x15,0x12,0x1e, - 0x4b,0xa3,0x8d,0xd5,0x59,0xb1,0xc7,0x51,0x1f,0xf1,0x02,0x56,0x74,0xff,0xdd,0xf1, - 0xf7,0xbe,0x36,0x10,0x46,0xce,0xcd,0x51,0xe5,0x76,0xa5,0x85,0xf1,0xcc,0x12,0xc6, - 0xea,0x97,0x96,0x73,0x16,0x5a,0x04,0x6d,0xc1,0x15,0xec,0x17,0x4c,0x35,0xf7,0x36, - 0x33,0xe8,0x96,0xd6,0x80,0x9c,0xe9,0x90,0xd7,0xaf,0xa5,0x92,0x57,0xf8,0xe1,0xe5, - 0x91,0x52,0xfb,0x71,0x78,0x1c,0x8e,0xca,0x9d,0x47,0x8f,0x81,0x9a,0x67,0xb5,0x53, - 0x23,0xaf,0x9b,0x5f,0x97,0x98,0xcd,0x82,0xd3,0xf6,0xa3,0xc8,0x18,0x74,0x4d,0x18, - 0xd3,0xb5,0x2a,0x09,0x4c,0x97,0xb7,0xdb,0x46,0x53,0xac,0x1c,0x5e,0xe7,0x4c,0x1c, - 0x7a,0xb5,0x86,0x3c,0x3f,0xa3,0x55,0xeb,0x03,0xfa,0x3e,0xa6,0xf5,0x38,0xd3,0xce, - 0x72,0x10,0xd3,0x4a,0x72,0xeb,0x97,0x8a,0x7c,0x18,0xa8,0xdd,0xf4,0xd5,0x59,0x28, - 0x42,0xf8,0x28,0xdd,0xef,0x20,0x61,0x0c,0x9e,0x5b,0x5b,0x38,0xba,0x88,0x7e,0x18, - 0x26,0xe3,0x66,0xbe,0x58,0xdb,0x6e,0xd8,0x36,0xf3,0xa8,0x4d,0x91,0x3f,0x66,0x34, - 0xcf,0x66,0x6e,0xae,0x59,0xda,0x20,0xff,0x4f,0xf0,0xe6,0x03,0x92,0xcc,0xd7,0x35, - 0x22,0xe5,0xb9,0xca,0x9e,0x91,0xf7,0x9b,0x88,0xb9,0x47,0x9e,0x8e,0xdf,0x5e,0xca, - 0xf4,0x77,0xb1,0xda,0x9f,0xb4,0x4e,0xc8,0x4a,0xde,0x0b,0x03,0xdf,0x80,0x6b,0xf7, - 0xed,0xc3,0xf4,0xc1,0xca,0xa8,0x6b,0x22,0x2c,0xcd,0xb8,0x1a,0xbf,0xa4,0x2c,0xd2, - 0x01,0xa5,0xe3,0xde,0xb4,0x28,0x26,0x41,0x6b,0xc8,0x1c,0x12,0xa1,0xa2,0x39,0x1b, - 0x0b,0x04,0xbf,0x24,0x54,0xe0,0xce,0x59,0xc2,0x58,0x8b,0x97,0x5c,0x4d,0x16,0x97, - 0xd6,0xc7,0xad,0x77,0x8a,0xe1,0x79,0xb7,0x96,0xe4,0x0e,0x92,0x48,0x1e,0xf7,0x32, - 0x86,0x9b,0x83,0x62,0x94,0x63,0xdb,0x4d,0x67,0x91,0x17,0x42,0xf3,0x3b,0x09,0x76, - 0xa6,0x7a,0xd0,0xad,0x33,0x2e,0x6f,0x81,0xc3,0x48,0x68,0x2d,0xaa,0x59,0x5f,0xe6, - 0xe7,0x82,0xb6,0x25,0x65,0xc3,0xbe,0x47,0xa5,0xbe,0xf0,0x01,0x29,0x8a,0x53,0xa9, - 0x7c,0x58,0xf2,0x6b,0x7c,0xe3,0x2b,0xc4,0x2c,0xa3,0xd2,0x09,0x06,0xa6,0x06,0x71, - 0x44,0x8b,0xe9,0x28,0x7f,0xb9,0x7a,0x27,0x4a,0x52,0x1f,0x60,0xa9,0xb4,0x54,0x27, - 0xe4,0x38,0xf0,0x28,0x77,0x9a,0x44,0x96,0xbc,0xcd,0x56,0xa5,0xac,0x60,0x1d,0x32, - 0x01,0xe8,0xb5,0xa3,0x77,0xee,0x93,0x58,0xaa,0x7b,0x89,0xc4,0x6f,0xab,0xef,0x9e, - 0x83,0x01,0xd5,0x18,0x3c,0x74,0xaa,0x2a,0xef,0x40,0x9b,0xd5,0xbe,0xef,0xbf,0x88, - 0x39,0x6c,0xd8,0xfe,0xf0,0x03,0xe2,0x08,0x0d,0x3c,0xab,0xf2,0xf9,0xea,0x00,0x24, - 0x2b,0x52,0xd2,0x6f,0xbe,0x2c,0xea,0xf8,0xcf,0x74,0x82,0x5a,0xb4,0x89,0x1e,0xa1, - 0x88,0x3e,0x47,0x2d,0xba,0x0f,0x2d,0x89,0xee,0x4b,0x86,0x10,0x7d,0x8b,0xab,0x47, - 0xd0,0x2b,0xf6,0xac,0x1b,0x22,0x43,0xab,0x93,0xc9,0xc3,0x8c,0xe9,0x8a,0x88,0xf1, - 0x42,0x66,0x85,0xe0,0xcb,0x1d,0x0a,0x16,0x0c,0x6a,0xa6,0xa7,0x8f,0x7d,0xcf,0x61, - 0x1f,0xb4,0x28,0xe5,0x1f,0xfe,0x6a,0x41,0x5f,0xd5,0xc0,0x9f,0x9e,0xb5,0x5b,0x2f, - 0x4d,0x31,0xf1,0x40,0x6a,0xba,0x4b,0x0f,0x11,0x71,0x61,0x5d,0xd0,0x79,0xbb,0x82, - 0x87,0x18,0xab,0x43,0xb3,0x29,0xec,0x37,0xb6,0xc9,0x87,0x07,0x13,0x5c,0x42,0xa2, - 0x67,0x2f,0xb9,0xf7,0x06,0x1b,0x63,0x11,0xe2,0x59,0xce,0x43,0x81,0x9a,0x54,0x95, - 0x29,0x6a,0x92,0xd1,0x13,0xaa,0xec,0x81,0x24,0x73,0x6c,0x07,0x78,0xf1,0x4d,0x3b, - 0x6a,0xd7,0x45,0xb5,0xd4,0x71,0x27,0x54,0x0d,0xb2,0xcb,0xca,0x28,0x2b,0xb6,0xd3, - 0x25,0xc0,0x55,0x28,0xa7,0xfa,0xe1,0x03,0x67,0xc8,0xa3,0x27,0xf7,0xec,0xa6,0xbb, - 0x4a,0x37,0xef,0x0a,0x76,0x4c,0x0e,0xda,0x64,0xd3,0x12,0x8a,0x97,0x9c,0x50,0x2b, - 0x2b,0x03,0x6e,0x77,0xf8,0xbd,0x75,0xa5,0x6c,0x29,0xc1,0x99,0xdc,0x26,0xf5,0xf9, - 0xc6,0x39,0x10,0x3b,0x48,0x19,0xb7,0x88,0x78,0x98,0x8f,0x55,0x50,0xf7,0x5b,0x5b, - 0xff,0x36,0xa8,0xec,0x97,0xd5,0x66,0xb1,0x48,0x24,0x0b,0xdd,0x02,0xe0,0xfe,0xa8, - 0xdd,0xf9,0x49,0x2c,0x92,0x41,0xe6,0xb0,0x9b,0x40,0xd6,0x1e,0x01,0xb3,0x0a,0x26, - 0xaf,0x66,0x34,0xcf,0xba,0x2d,0x85,0xf3,0xc2,0xc6,0xc4,0x16,0x56,0xb2,0x5f,0x30, - 0xaa,0x0e,0x9f,0xeb,0x8d,0xc8,0x58,0x94,0x37,0xb3,0xf6,0x1f,0x01,0xb1,0xe1,0x22, - 0x02,0xdd,0xd5,0x37,0x3d,0x70,0xff,0xdf,0x6d,0xdb,0xa6,0x37,0x58,0xbe,0x60,0xb6, - 0x5e,0x0d,0x3a,0xe4,0x1c,0xdf,0x69,0x46,0x61,0x00,0xd8,0xb1,0x56,0x32,0x76,0x2c, - 0x83,0xc6,0x24,0x91,0x79,0x2c,0x38,0x5a,0x61,0xb3,0x5a,0xd7,0x84,0x0d,0x7f,0x38, - 0x2c,0x0f,0xa1,0xb9,0x79,0x5b,0x31,0x81,0x88,0x53,0x0f,0xcc,0x4c,0x20,0x5e,0x73, - 0x6a,0xf2,0xf7,0x3d,0x78,0x5a,0x9f,0x42,0x8a,0x2d,0x5d,0x6b,0xdf,0x7d,0x5a,0x45, - 0x21,0xcc,0xf7,0x69,0x6d,0xaa,0xe8,0x9e,0x52,0x09,0x7b,0x42,0xbf,0x06,0x88,0xc5, - 0x8b,0x0d,0x73,0xd0,0x25,0x93,0xf4,0x54,0x28,0xc6,0xa7,0x07,0x2b,0xb0,0x81,0xcd, - 0xc9,0x68,0x1a,0xda,0x94,0x2d,0xae,0xe5,0xf5,0xc3,0x7a,0xe0,0x41,0x79,0x5c,0xd5, - 0x95,0xee,0x92,0xca,0xec,0xa9,0xeb,0x80,0xa9,0x56,0xca,0x5f,0xef,0x77,0xb6,0x6a, - 0xe3,0x0b,0xc0,0x6c,0x16,0xaa,0x70,0x29,0x49,0x08,0xef,0xd3,0xd7,0xd5,0x9b,0x18, - 0xe0,0x93,0x8d,0x2c,0x15,0x20,0x00,0x39,0x68,0xa9,0x90,0x4e,0xb2,0x78,0x5d,0x20, - 0x8c,0xa1,0x9b,0x04,0xda,0x23,0x33,0x09,0x21,0xe0,0x74,0x57,0x0e,0x62,0x19,0xe6, - 0x76,0xf6,0x0b,0x5c,0x8c,0xde,0x42,0x27,0x2c,0x40,0xc2,0xb2,0x3c,0xea,0xae,0xcc, - 0x44,0x98,0x19,0xd3,0x1c,0xd5,0x68,0x9b,0x7a,0xe1,0xf2,0x78,0x8f,0x29,0x5b,0xb0, - 0x1d,0x40,0xca,0x2e,0xe0,0xd6,0x52,0x7c,0xc3,0xdb,0xb3,0x96,0xa4,0x01,0x4b,0x69, - 0x6b,0xa1,0x47,0xa0,0x9f,0x75,0x42,0x2e,0x00,0xd4,0x6d,0xe8,0x0f,0x0c,0x1b,0x2b, - 0x87,0xa4,0x8b,0xa1,0x3b,0x6d,0x65,0xa0,0x30,0xd4,0xb9,0x3d,0xda,0x2f,0x97,0x68, - 0xb6,0xdf,0x88,0xc8,0xcc,0x49,0x4d,0x81,0xc5,0xdf,0x25,0xa6,0x32,0x6b,0x1a,0xf2, - 0x49,0x1c,0x98,0x64,0xce,0x7e,0x45,0x22,0x84,0xf0,0x1f,0x45,0x41,0x04,0xba,0x70, - 0xd4,0x12,0x45,0xf5,0x5a,0x29,0x4d,0xa5,0xe9,0x0a,0x54,0xc3,0xd2,0x5f,0x73,0xa8, - 0x92,0x87,0x81,0xd9,0x50,0x35,0x25,0x4f,0x6c,0xfe,0xbd,0xbc,0xc2,0x21,0x41,0x38, - 0xd4,0xaf,0xfe,0x57,0x46,0x9b,0x63,0xdd,0x92,0x85,0x90,0x60,0x44,0x32,0x92,0x87, - 0x25,0xf7,0x18,0x75,0x00,0xe9,0x8d,0x83,0x10,0x55,0x3f,0xb4,0x3f,0xa0,0x42,0x2c, - 0xe2,0x54,0x15,0x36,0x90,0x92,0x95,0x79,0x23,0x14,0xc2,0x16,0xc6,0x18,0xab,0x11, - 0xaf,0x5a,0x75,0x2b,0xa3,0x7a,0x02,0xb1,0xe5,0xc7,0x4c,0x86,0xcb,0xf5,0xbe,0xb8, - 0x28,0xb7,0x77,0xe1,0x9b,0x23,0x85,0x3a,0x68,0xf5,0x2e,0x0c,0xdd,0x18,0x8e,0x6b, - 0x55,0x1f,0x9a,0x47,0x0a,0x89,0x47,0x3e,0x8c,0xf8,0x8f,0xdc,0x7d,0x51,0x57,0x01, - 0x0d,0x99,0xe7,0xfb,0x9b,0x7a,0x00,0x37,0xe9,0x9b,0xc9,0x85,0x46,0xd7,0xfd,0x04, - 0x40,0xaa,0xb1,0xa4,0x1e,0x2b,0x27,0x47,0x66,0xf6,0x08,0xcf,0xca,0x7d,0x44,0x2e, - 0x55,0x1c,0x39,0xfd,0x14,0x93,0x2f,0x97,0x2a,0xf3,0xa8,0xc1,0x32,0x4d,0xb5,0xd0, - 0x8e,0xe2,0xb0,0xe4,0xb6,0x90,0x16,0xfd,0x00,0x0c,0x0e,0x0f,0x55,0xd2,0xd7,0x21, - 0xb2,0x53,0xd0,0xbe,0x9c,0xed,0xc6,0xae,0x28,0xde,0xf7,0x3b,0x1b,0xd1,0x16,0xc0, - 0x0e,0x80,0x1b,0x42,0x50,0xce,0x5d,0x8b,0x00,0x2e,0x4e,0x0e,0xc3,0xd2,0x7e,0x3a, - 0x04,0x21,0x3d,0x82,0x75,0x07,0xb0,0x03,0x11,0xc3,0x4b,0x46,0x1e,0x62,0xc9,0x64, - 0x24,0xf1,0x9b,0x2f,0x13,0xf3,0x82,0x52,0x0f,0x83,0xae,0x06,0x59,0xea,0x19,0xf0, - 0xb8,0x99,0xb5,0xf1,0x6c,0x73,0x32,0xaf,0xf7,0xc4,0xa9,0xbe,0x96,0xeb,0x17,0xc2, - 0xa4,0x63,0xf4,0x93,0xdb,0x87,0x71,0x99,0xf6,0xc5,0x28,0xdf,0xc3,0xae,0x71,0x18, - 0x35,0xd2,0xba,0x54,0xf7,0x0b,0x70,0x8f,0x36,0x6f,0x2f,0xdb,0xb7,0x3b,0x40,0xa1, - 0x37,0x28,0x8e,0x8f,0x14,0x75,0xcb,0xc2,0x41,0x3c,0xc7,0x66,0xbc,0xd4,0xdb,0x23, - 0xc6,0x07,0xf4,0x34,0xae,0xca,0xa6,0x5f,0x3a,0x65,0xaf,0x4a,0x29,0x16,0x78,0x33, - 0x99,0x78,0x29,0xfb,0x04,0x26,0x8a,0x83,0xe4,0x66,0xc7,0x5e,0x58,0x11,0x18,0xfc, - 0x3f,0x5c,0xaa,0x8e,0x54,0xb9,0x8d,0xdc,0x6f,0x58,0xe2,0x4c,0x3c,0x43,0x64,0xfa, - 0x6f,0x92,0x6a,0x92,0x26,0xeb,0x60,0xc5,0xea,0x87,0xe3,0xb2,0xf8,0xea,0xd9,0xf8, - 0xb1,0x27,0x94,0xaf,0x6c,0x5b,0x9b,0x33,0xff,0xeb,0xa2,0x81,0x5c,0x18,0x88,0x6d, - 0x72,0x82,0x6d,0x05,0x9c,0xeb,0xfd,0xc6,0xcd,0x8a,0x07,0xb6,0xb6,0xfa,0xa2,0x9a, - 0x48,0x77,0xa6,0xca,0x28,0x2a,0x63,0x99,0xca,0x41,0xba,0x5e,0x3d,0xee,0xea,0x28, - 0x3c,0xac,0xca,0x31,0x92,0x20,0x42,0x9a,0x4b,0xe9,0xa0,0x63,0x59,0xbe,0x67,0x6f, - 0xe5,0xf7,0xe1,0xad,0xd6,0x9f,0x21,0xe0,0x25,0xaa,0x33,0xc3,0x58,0x51,0x93,0xa7, - 0x79,0x74,0x8d,0x62,0x74,0xcc,0x39,0xff,0xf1,0x8f,0x1b,0x46,0x24,0x64,0x5c,0xa5, - 0xcd,0x41,0x9a,0xba,0x93,0xa0,0xa7,0x30,0x64,0x7d,0x4e,0x4e,0xea,0x3b,0x12,0xaf, - 0x86,0xf4,0x92,0x36,0x92,0xf3,0x90,0xc1,0x47,0x77,0x7a,0x21,0x74,0x51,0x5d,0x01, - 0x42,0x21,0x9b,0xba,0x13,0xa2,0x22,0x3d,0xe7,0x10,0xb3,0xe1,0xa4,0xb0,0x13,0x33, - 0x06,0x38,0x6c,0x46,0x8e,0x87,0xac,0xc0,0x99,0x75,0x87,0x48,0xf3,0xea,0x65,0xa4, - 0xdd,0xd6,0xda,0x62,0xe0,0x1b,0x52,0xce,0x5e,0x79,0xe1,0xa1,0xbc,0x4e,0xe9,0xb4, - 0xd0,0x85,0xd6,0x25,0x43,0x1a,0xb8,0x01,0x5f,0x75,0x95,0x09,0xfa,0x53,0xbc,0xf1, - 0x82,0x8d,0x76,0x67,0x5b,0x16,0x60,0x83,0xf6,0xba,0xbd,0x7f,0xf0,0xa5,0xd5,0x2c, - 0x94,0x67,0x7a,0xa4,0xc7,0xb4,0xe8,0xf1,0x04,0x95,0x68,0xb7,0xab,0x5a,0x37,0x8b, - 0x1f,0x2e,0x66,0x1a,0x97,0x64,0x23,0xea,0x70,0xb6,0x2e,0xdd,0x41,0x7f,0x82,0x05, - 0x2e,0x49,0xc7,0x75,0xc2,0xd7,0x00,0x87,0xa7,0xa8,0x84,0x56,0x55,0xb6,0x9f,0x74, - 0x45,0x8b,0x0b,0x0a,0x69,0xd8,0x09,0x0b,0x26,0x4b,0xb3,0xa7,0xb4,0x83,0x75,0xff, - 0xc5,0x8a,0x90,0x00,0x4c,0x6d,0x37,0xb3,0xde,0x0f,0x9f,0xe7,0x14,0x82,0xde,0x30, - 0x3e,0xd1,0x58,0xdf,0xdf,0x13,0xa7,0x71,0x1d,0x2a,0x63,0xde,0x7a,0x23,0xfe,0xa9, - 0x1f,0x3c,0x79,0xe0,0x4b,0xa8,0xbe,0x87,0x9c,0x70,0xf8,0x7a,0x49,0x36,0x18,0x4f, - 0x99,0x1b,0xf4,0x3c,0xc6,0x13,0xc0,0x5a,0x1a,0x5d,0x48,0x28,0x28,0xf4,0x57,0xeb, - 0xb7,0x80,0x7a,0xd7,0x3f,0x7f,0x30,0x14,0xd8,0xdf,0xf9,0xd3,0xb7,0xce,0x20,0xdb, - 0xe9,0x51,0x98,0x14,0xb3,0x6d,0x27,0x85,0xb0,0x03,0x76,0x52,0xaf,0x66,0xd9,0xab, - 0x89,0xba,0x30,0xd3,0xd3,0x71,0x57,0xc1,0xe2,0x01,0xcc,0x52,0x2d,0x9e,0x19,0x15, - 0x7b,0x40,0x83,0xe3,0xa3,0x73,0xd1,0xb9,0x01,0xef,0xc1,0x2c,0x73,0x79,0x2f,0xb1, - 0xa7,0xa7,0x81,0x1c,0xf2,0x73,0x2b,0x0f,0x62,0xe2,0xf9,0x95,0x8d,0x6c,0x3e,0x7d, - 0xeb,0xbe,0xb9,0x94,0xb1,0x38,0x90,0x01,0x06,0x06,0x40,0xfc,0xd2,0xd9,0x30,0x30, - 0x07,0xa5,0xc1,0xa7,0x63,0x3e,0x78,0xe2,0xc1,0xd0,0x4f,0x87,0x71,0xca,0xe6,0xa3, - 0x42,0xab,0x7e,0x17,0xd1,0xd6,0xd6,0xb9,0x8a,0x97,0xeb,0x96,0xa6,0xc9,0xde,0x22, - 0xd8,0xa6,0x65,0x33,0x6c,0x49,0x01,0x02,0xfa,0x48,0x8d,0x4f,0xab,0xfa,0x56,0xad, - 0x80,0xb3,0x7a,0x8e,0xa2,0x90,0x44,0xdb,0x22,0x95,0xc2,0x29,0x0c,0x73,0xde,0xeb, - 0x31,0xa4,0xda,0x14,0x7a,0x09,0x1c,0x10,0x40,0x2f,0xca,0x35,0xa4,0x66,0x39,0xfa, - 0xae,0xa5,0xd9,0x10,0x3b,0x2c,0x45,0x99,0x23,0xc9,0x75,0x5b,0x2f,0x6c,0x1e,0x5e, - 0x43,0xb1,0xf3,0x9f,0xbb,0xfb,0x7b,0x96,0x3c,0x46,0xfb,0x9d,0x85,0xb6,0xd5,0xd8, - 0xc2,0xfd,0xa4,0x74,0x19,0x8c,0x0b,0xe3,0xaf,0x29,0x3e,0xf7,0x59,0xcd,0xb2,0x2a, - 0xe0,0x0e,0x4e,0xa1,0xec,0x6c,0x21,0x70,0xee,0xf2,0xa4,0x44,0x33,0x9c,0x3b,0x5b, - 0xb9,0x9f,0x03,0x2d,0x10,0x26,0x2b,0x81,0xd8,0x03,0x13,0x0d,0xe7,0x63,0x35,0x65, - 0xb8,0x9e,0x92,0xf3,0x3e,0x34,0x60,0x5e,0x68,0x2a,0xa5,0x40,0x3a,0xcc,0x62,0x20, - 0xcb,0x13,0xd4,0xf3,0x28,0xbf,0xec,0xa8,0xc7,0x11,0x07,0x55,0xd3,0x80,0x6a,0x31, - 0x33,0x5c,0x6a,0x62,0xb6,0x51,0xab,0x01,0x95,0xd2,0xa2,0x88,0x1a,0x7e,0xa9,0x69, - 0x79,0x5f,0x87,0x63,0x11,0x29,0xa0,0x10,0x54,0xd1,0xb7,0x4d,0x62,0xbd,0x6b,0x31, - 0xa2,0xf2,0xd4,0x34,0x14,0x28,0xdd,0xcd,0x21,0x12,0x1a,0xa7,0xc2,0xb5,0xf9,0x87, - 0xe8,0xe5,0xd3,0xa2,0xcd,0x4f,0x2b,0xa7,0xbc,0xdf,0x8d,0xe1,0x74,0x84,0x48,0x2e, - 0xd8,0x8a,0x05,0x33,0xea,0xc8,0x7c,0x7a,0x60,0x35,0x63,0xb6,0xd2,0xa0,0x0d,0x61, - 0x43,0xed,0xc1,0x3c,0xea,0x74,0x75,0x0b,0x13,0xdf,0x93,0x9b,0x73,0x7b,0x17,0xef, - 0xcb,0x14,0xe2,0x92,0x4a,0x91,0x82,0x0e,0xc7,0x4c,0x4e,0xca,0x8f,0x0b,0xc6,0x24, - 0xc1,0xe5,0xd6,0x6a,0xd9,0x23,0xcd,0x07,0x17,0x8d,0xa8,0x4e,0x9f,0x3a,0x6f,0x58, - 0x7b,0x02,0x76,0x18,0x42,0xae,0xc3,0x98,0x6f,0xb2,0xa1,0xc3,0xda,0xf4,0xc7,0x25, - 0x44,0xc3,0x05,0x6b,0x8b,0xdb,0x4c,0xab,0x93,0xbd,0xc9,0x9f,0x7a,0x4d,0x24,0xea, - 0x8b,0x54,0xd6,0x0a,0x5c,0x55,0xb1,0xcb,0x02,0x82,0xff,0x13,0x89,0x74,0x38,0xce, - 0xcb,0x9f,0xd1,0x0b,0xf8,0x5c,0x23,0x8e,0x95,0x30,0x69,0xa3,0xef,0xa1,0x33,0x32, - 0x2d,0xed,0x5e,0xae,0xc8,0xa0,0x27,0x80,0xf9,0x57,0xb6,0x9e,0x84,0x73,0xb2,0x3a, - 0x26,0x13,0xcf,0xc8,0xc5,0xe1,0x68,0x76,0x89,0x5a,0x7e,0x9f,0x41,0x61,0x09,0xaa, - 0xc9,0xe7,0x63,0x4e,0xc3,0x35,0x5e,0x11,0x72,0x12,0xe7,0x03,0xfd,0xaf,0x68,0x17, - 0x02,0xd3,0xd8,0x84,0x36,0x90,0xdc,0xb0,0xd5,0xc8,0xc8,0xa4,0x76,0xd0,0xd0,0x29, - 0x5e,0xc3,0x00,0x13,0xf4,0xba,0x93,0x54,0xb2,0xd1,0xd8,0x96,0x09,0xec,0xfb,0x12, - 0xbc,0x86,0x99,0xef,0x5a,0x6d,0xf2,0x51,0x67,0xd9,0x89,0xcf,0xb4,0xad,0xf8,0xa8, - 0x4d,0xc0,0xf9,0xf1,0xb7,0x81,0x81,0xcc,0xf6,0x7f,0xe0,0x06,0x72,0x8f,0xd8,0xbd, - 0xef,0x55,0x17,0xa0,0x10,0xad,0x4f,0x80,0xc4,0xc7,0x63,0x95,0x22,0x79,0xc4,0x21, - 0x5c,0x23,0x55,0xb4,0x24,0xe9,0x22,0x90,0x41,0xcc,0xdd,0x94,0xb7,0x30,0xcd,0xdc, - 0x85,0xcf,0x45,0x29,0x35,0xc3,0x70,0x01,0x44,0x53,0xf3,0x8c,0x3f,0x77,0xfe,0xac, - 0x6e,0x84,0x51,0x47,0xfc,0xa8,0x95,0x11,0xf4,0x01,0x81,0x46,0xfd,0x48,0x72,0x19, - 0x22,0xab,0xb6,0x8c,0x3e,0x58,0x8a,0x17,0xb3,0xda,0xeb,0xb9,0xb9,0x4e,0xaf,0x5d, - 0xec,0x2f,0x48,0xf7,0x37,0xc6,0x67,0x64,0xe2,0x34,0xbb,0x5c,0xaa,0x14,0x1d,0xab, - 0xae,0x67,0x9b,0x48,0xaf,0x4c,0x8b,0x97,0x41,0xa8,0xae,0xd0,0x5e,0xe9,0x7f,0xe8, - 0xa7,0x06,0xf2,0xbe,0x38,0x54,0xff,0x32,0x62,0x46,0x18,0xdd,0x1d,0x44,0x8e,0xd5, - 0x0f,0xcc,0xe3,0x7c,0xe1,0xed,0xe0,0xe8,0xbe,0x67,0xa6,0x10,0x34,0xef,0x38,0xa9, - 0x21,0x22,0x37,0xa1,0xfe,0x12,0xc2,0x85,0x7c,0xc1,0x10,0x40,0x7d,0x18,0xc4,0xeb, - 0x6f,0x21,0xba,0x09,0x3b,0x51,0x0b,0x4f,0xfd,0x09,0x8d,0xcf,0x8e,0xea,0xbb,0xa8, - 0xa5,0xf0,0x2b,0x93,0x30,0x5b,0xc3,0x81,0xdf,0x82,0xaf,0x0d,0x2c,0x50,0x25,0xf1, - 0x0e,0xdf,0xc2,0xef,0x37,0x30,0x98,0x4a,0xfe,0x1d,0xd4,0xa4,0xf0,0xfd,0x4a,0x33, - 0x37,0xdc,0xf5,0x36,0x90,0x4e,0x62,0x50,0x39,0x55,0xe4,0xb2,0x35,0xbe,0x89,0x6b, - 0x79,0xdf,0x9b,0xee,0xf4,0x7d,0x53,0xca,0x0f,0x03,0xec,0x9f,0x53,0xbf,0x4b,0x33, - 0xa6,0x73,0x01,0x7f,0x2f,0x7e,0x64,0x9f,0x42,0x7e,0xe4,0x8f,0x50,0x9d,0x1a,0x72, - 0xcf,0xf7,0x67,0x42,0x17,0xcd,0x2c,0xe7,0x19,0x2b,0x3b,0xf8,0x54,0x00,0xbc,0x8b, - 0xcc,0xd6,0x68,0x2b,0xc0,0xf4,0x25,0x49,0xc2,0x5f,0x03,0x1e,0x89,0xba,0xee,0x30, - 0x88,0x3b,0x25,0xa7,0x6a,0xbe,0xe5,0xc3,0x84,0x4e,0xa1,0x0f,0x40,0xbb,0x53,0x72, - 0xf6,0x38,0xee,0xd5,0x46,0x2c,0xfa,0x0c,0x90,0xd7,0xfc,0x91,0x04,0xe7,0x18,0x2a, - 0x8b,0x88,0x41,0x71,0x7e,0x67,0xa5,0x5b,0xcf,0x28,0xd4,0xb3,0x7d,0x98,0xdb,0xe4, - 0x8c,0x19,0x4d,0xde,0x7d,0x44,0x5e,0x11,0x34,0x52,0xad,0xd8,0x82,0x54,0x19,0x2a, - 0x0b,0x9c,0xfe,0x18,0x59,0xd6,0x15,0xb8,0x4f,0x2b,0xed,0xb2,0x5b,0xe1,0x57,0x1f, - 0x93,0xdb,0xbd,0x61,0x5a,0xa0,0xb8,0x59,0x04,0x2a,0xf0,0xa0,0x5e,0x7f,0x32,0xdb, - 0x0c,0xec,0xe1,0xb4,0xb1,0x0a,0x2f,0xa8,0xcb,0x83,0x4e,0x15,0x83,0xbe,0xdd,0x7f, - 0xd7,0xde,0x73,0x5a,0x1e,0x49,0x55,0x94,0xbe,0x9f,0x4a,0x85,0xdc,0x08,0x47,0x85, - 0x52,0x1d,0xef,0xd3,0xb8,0xb7,0x76,0x8d,0x51,0x61,0xef,0xe8,0x0f,0xf1,0x5c,0x7a, - 0x46,0x4e,0xe7,0xda,0xc0,0x60,0x7c,0x78,0x1a,0x53,0xab,0xdb,0xff,0xff,0x3a,0xf3, - 0x38,0xaf,0xe0,0x26,0xd3,0x2d,0x2e,0x1d,0xe3,0xed,0xd8,0x39,0x56,0x33,0x1e,0x14, - 0x29,0x1f,0x24,0x6b,0xcb,0xde,0x0d,0x2d,0x49,0xa9,0x58,0x98,0xfa,0x65,0x12,0xf2, - 0xf8,0x03,0xfa,0x22,0x31,0x9d,0x00,0xc1,0xc4,0xb6,0xec,0xa1,0xe6,0x23,0x33,0xe2, - 0x8e,0xac,0x32,0x8f,0x66,0x8e,0x1f,0x19,0xc9,0xd0,0x9b,0x24,0xe1,0x42,0x53,0x48, - 0x82,0xa4,0x27,0x2a,0xc4,0x2c,0xe8,0xee,0x43,0x04,0xc6,0x4c,0xe1,0x29,0xe3,0x9a, - 0xb8,0xfa,0x37,0x27,0x14,0x4b,0x42,0x74,0x60,0x5d,0x18,0x4c,0x91,0x6e,0xed,0xe4, - 0x57,0x65,0x40,0xad,0x7a,0x6b,0xf9,0xd4,0x2b,0x05,0xc9,0xa5,0xb1,0x29,0x10,0x73, - 0x26,0xdd,0x2e,0x95,0xae,0x87,0xee,0x4c,0xc5,0x1c,0xd4,0x85,0xf8,0xc6,0x48,0xf5, - 0x38,0xd3,0xc9,0x3c,0xef,0x97,0x2c,0xe9,0xf7,0x13,0x06,0xeb,0xb1,0x99,0x34,0xc0, - 0x61,0x04,0x4a,0x04,0xaa,0xa4,0x8d,0x56,0x67,0xe6,0xfc,0xc4,0x58,0x4b,0xb1,0x8d, - 0x8d,0x97,0xb9,0xbd,0x67,0xb5,0x13,0x18,0xe5,0xe5,0xf5,0xd4,0x31,0xbb,0xf6,0xe0, - 0x4a,0x90,0xf5,0x21,0x72,0xda,0x88,0x4a,0xce,0x40,0xa5,0x00,0xb1,0xd0,0x3c,0xe8, - 0x1a,0x41,0x51,0x0d,0x78,0x8c,0xa3,0x17,0xc7,0xca,0xc3,0x86,0xff,0xc3,0xb2,0x69, - 0x7b,0x4f,0x1c,0xd8,0xf2,0x0e,0x4d,0x84,0x89,0xcd,0xe2,0x83,0xb2,0x3c,0x8c,0xba, - 0xa0,0x85,0xd4,0x0c,0xb6,0x2d,0x51,0x29,0xba,0x0c,0x42,0xe9,0xaa,0xb0,0x58,0xcf, - 0x60,0x4c,0xb1,0xa2,0x72,0x2c,0x53,0x48,0xf0,0x8b,0x83,0xf1,0xe8,0x4a,0x4f,0x40, - 0x79,0xbd,0x44,0x29,0x3e,0x86,0x81,0x5f,0x95,0x03,0x54,0x08,0x61,0x32,0xa0,0x03, - 0x72,0x1b,0xf2,0xb8,0x37,0x62,0x69,0xf9,0xc0,0x4e,0x30,0x27,0x22,0x7b,0x14,0x91, - 0x5f,0xef,0xfb,0xa8,0x05,0xa4,0xee,0xd3,0x1b,0x54,0x81,0x6e,0x19,0x63,0xda,0x15, - 0x97,0x41,0xf0,0x11,0x87,0x72,0xa9,0xd3,0x5a,0x36,0x98,0x8a,0xc1,0x31,0x53,0x44, - 0x52,0xd2,0x04,0xfc,0xf4,0x9b,0x0c,0xb9,0x46,0x38,0x45,0x1b,0x11,0xa0,0xdf,0x54, - 0x53,0xd3,0x0c,0xb1,0xfd,0xbe,0x1d,0x96,0xf5,0x5f,0x24,0x04,0x58,0xd4,0xba,0x31, - 0x61,0xb7,0x56,0x3e,0x4e,0xc7,0x0c,0xf6,0x47,0x20,0xc3,0xcd,0x41,0xfb,0x32,0x55, - 0xc6,0x9c,0x0a,0xe4,0xc7,0x75,0xd5,0x82,0xc9,0xff,0xcc,0x1f,0x1a,0x26,0x3e,0x72, - 0x84,0x15,0xbe,0x76,0x94,0x35,0xd6,0x05,0x66,0x1a,0xc0,0x34,0x30,0x69,0x4d,0x1c, - 0x17,0x7b,0x99,0xe6,0xaf,0x96,0x0e,0x25,0x75,0x5f,0x0e,0x45,0xba,0xe2,0x78,0xf6, - 0xae,0x49,0xf8,0xca,0x26,0x95,0x94,0x4a,0xeb,0x8a,0xb7,0x4f,0x7f,0xe9,0x68,0xe3, - 0xc8,0x1f,0x9c,0xda,0x50,0x4a,0x6a,0xf0,0xef,0xab,0xab,0x39,0x84,0xe4,0xeb,0xb7, - 0xb7,0x40,0xd5,0x66,0x59,0xc3,0x06,0x08,0x18,0x1d,0x2e,0x68,0x0a,0xa2,0x58,0xba, - 0x43,0x10,0xdd,0x58,0x4b,0xfb,0x5f,0x9e,0x90,0xfc,0xe0,0xd4,0x1a,0x8d,0xfc,0x87, - 0x43,0x8f,0xbf,0x3d,0x1d,0x9f,0x0e,0xff,0x4f,0xc1,0x68,0x0f,0xb2,0x6f,0x31,0xe4, - 0xad,0xae,0x8d,0x3f,0xf3,0x8e,0x67,0x06,0x1a,0x3c,0x87,0xdf,0x1a,0xd0,0xc7,0xff, - 0xc7,0x5b,0xfe,0x2e,0x1c,0x0d,0x70,0x51,0x0f,0xcb,0x4f,0x55,0x20,0x43,0xe8,0xbe, - 0xed,0x28,0xb9,0x51,0xcf,0xab,0x60,0x27,0x65,0x33,0xe3,0x49,0x5b,0x4e,0x11,0x87, - 0xeb,0x6e,0xea,0x97,0x6f,0x0f,0x32,0xcb,0x2c,0x8f,0xea,0x60,0xda,0x4d,0xe5,0x99, - 0x86,0xb3,0xb3,0xe6,0x36,0xe3,0x3b,0x75,0xb7,0xc7,0xe6,0xb3,0xe3,0xfb,0x5a,0xb1, - 0x7e,0x29,0x9a,0xb8,0x25,0xa1,0xcc,0x9c,0x5e,0xa9,0x48,0x86,0x52,0xf6,0x7f,0x15, - 0xd9,0x8d,0x50,0x8b,0xb0,0xe4,0xd3,0xd7,0x92,0xdb,0xe0,0x63,0x64,0x33,0xb1,0xd3, - 0x79,0x2b,0x59,0x9b,0x31,0xb6,0x28,0x67,0x4b,0xa5,0x49,0x07,0xda,0x1b,0xe9,0x32, - 0xc9,0x2a,0x89,0xc8,0x54,0xaa,0x04,0x8c,0xb4,0xc7,0x41,0x33,0xe3,0xe3,0x1c,0x6f, - 0x81,0xea,0x9c,0x26,0xfc,0x29,0xa3,0x0a,0x3e,0x8b,0x72,0x0f,0xc7,0x45,0x75,0x68, - 0xe6,0x98,0x92,0xe4,0xb1,0xa4,0x61,0x3a,0x36,0x69,0xab,0x01,0x6d,0xab,0x7d,0xf3, - 0x8c,0x25,0x4b,0x8b,0xaa,0xeb,0x80,0x17,0x30,0x3b,0xa2,0x4f,0xc4,0x48,0x15,0x33, - 0x00,0x2d,0xd4,0x9b,0xab,0xf9,0xfb,0x23,0x47,0x36,0xed,0xa7,0x5d,0x84,0x75,0x5a, - 0xe5,0x5d,0x9c,0x73,0x75,0x1d,0x2d,0x6f,0x48,0x5c,0xb3,0x9f,0x6a,0xcc,0xba,0x1a, - 0x0b,0xa4,0x8c,0xfa,0x1c,0x6c,0xc3,0xe4,0x4e,0xa7,0xc4,0x52,0x1c,0xe2,0x5d,0x77, - 0x03,0x28,0xe7,0x3c,0xe6,0xc2,0xc7,0xac,0x73,0x38,0xc9,0x90,0x5e,0xcc,0xaf,0xab, - 0x4c,0x2e,0xb1,0x8d,0xf7,0x1e,0x45,0xda,0x86,0xcc,0xe3,0x72,0x3e,0x40,0x5d,0xec, - 0x45,0x94,0x43,0xf5,0x00,0x66,0x2d,0xa2,0x64,0xd0,0x92,0x8f,0x44,0xb1,0xfd,0x1e, - 0x23,0xc2,0xbb,0x09,0xdc,0x20,0x31,0x36,0x39,0xc8,0xe6,0x57,0x09,0xee,0x44,0x43, - 0x80,0xd0,0xed,0xb2,0x39,0x1f,0x35,0x87,0x66,0xe5,0x12,0x9f,0x73,0x11,0x51,0x17, - 0x93,0xc1,0x4e,0xd7,0xe3,0xf1,0x3d,0xb3,0xe5,0xd3,0x05,0x67,0x56,0x9d,0xc4,0x50, - 0x6e,0x9e,0xc4,0x01,0xca,0x45,0x8f,0x25,0xdb,0x22,0xe5,0x95,0x46,0x98,0x0e,0xc3, - 0x26,0x45,0xe8,0x2a,0x37,0xa0,0x42,0x53,0x2e,0xd6,0xc8,0xee,0x71,0x64,0xe3,0x47, - 0xde,0x4d,0x25,0x36,0x41,0x3d,0xcc,0x7d,0xe7,0xc6,0x93,0x23,0xf7,0xb6,0x81,0x3b, - 0xfc,0xda,0xfe,0xdf,0x37,0x17,0x25,0xf7,0xce,0x8c,0x1d,0x17,0xf3,0xd2,0x9f,0x68, - 0x80,0xe5,0x77,0x02,0x3a,0xeb,0x68,0x48,0x68,0x75,0xd4,0x2e,0x7d,0xb8,0x91,0x1e, - 0x1b,0x6b,0x32,0x6e,0xbd,0xa6,0xfe,0x16,0x49,0xd4,0x7e,0xd3,0x25,0x72,0x5f,0x7a, - 0x0f,0xda,0xdb,0xc8,0x45,0x1c,0x7c,0x99,0x8c,0x94,0xab,0x43,0x00,0x6b,0x11,0xa7, - 0x0e,0xfe,0x94,0xef,0x3d,0xad,0xc4,0x9c,0x4c,0x24,0xbb,0x43,0xfd,0xee,0x83,0x42, - 0x8b,0xca,0x4a,0x6b,0xeb,0xdf,0x49,0xb4,0x9f,0x00,0xf7,0x6a,0x0e,0x7b,0x4e,0xc2, - 0xa0,0x86,0xf9,0x82,0x1b,0x30,0xd5,0x5f,0xba,0xc3,0x7e,0xfd,0xef,0x76,0x6f,0x4b, - 0x2b,0x7d,0x4c,0x05,0x05,0xfc,0x2e,0xef,0x63,0xbd,0xcf,0x04,0x1d,0xf5,0x77,0xbd, - 0x31,0x8d,0x91,0xf7,0xdc,0x6b,0x02,0x04,0x60,0xa2,0xa3,0xd6,0x4c,0xb2,0x7e,0x2c, - 0x33,0xb6,0x95,0x77,0x28,0x4c,0x4c,0x09,0xf3,0xed,0xee,0x80,0x56,0xd8,0xef,0x50, - 0x0e,0xac,0x8e,0x3c,0x38,0x0c,0xd8,0x08,0xa3,0x4c,0xa0,0xcf,0xed,0x90,0xb9,0xfe, - 0x39,0x6e,0xe3,0x18,0x91,0x64,0x80,0xc7,0x68,0x52,0x95,0x47,0x23,0x07,0x98,0xc1, - 0x22,0x08,0x19,0x66,0xda,0x2a,0x63,0xd1,0xfa,0x01,0x28,0x09,0xa6,0x43,0x51,0x60, - 0xa3,0x66,0xb8,0x37,0x2e,0xa2,0x4c,0x27,0x4c,0x3b,0xd5,0x17,0x2a,0x0a,0x7f,0xf1, - 0xf3,0x06,0xaa,0xb6,0xe6,0xa3,0x57,0x62,0xbc,0xce,0xf8,0x61,0xba,0xd4,0x18,0x73, - 0x27,0x79,0xc1,0x85,0x82,0xdb,0x91,0x85,0xf5,0x04,0xb3,0x55,0xd3,0xb4,0xfe,0x68, - 0x77,0x96,0xc9,0x15,0x97,0x69,0xeb,0x40,0xfb,0x58,0x35,0xe7,0x51,0x6f,0x0d,0xfb, - 0x30,0x13,0x87,0x8e,0xa6,0x81,0x01,0xae,0xc7,0xee,0xb2,0xa1,0xb1,0x79,0x1f,0x5f, - 0xd7,0x01,0xaa,0x0d,0xf8,0x2f,0x64,0x11,0x2a,0x9d,0xb9,0x10,0x81,0x18,0x64,0x6f, - 0x77,0xa7,0xbb,0x3d,0x8c,0x25,0x5f,0x69,0xe3,0xc7,0x85,0x4f,0x33,0x7b,0x8b,0x3a, - 0x99,0x80,0x7e,0x6c,0x3a,0x80,0x0d,0x10,0x7a,0x06,0x5b,0x64,0xb9,0x29,0x82,0xac, - 0x3d,0xd8,0xd2,0x3f,0x22,0xa6,0xed,0x8e,0xa3,0x7d,0x94,0x9c,0xfd,0xcd,0x5b,0x78, - 0xa2,0x6f,0x93,0x80,0xbe,0xac,0xca,0xd8,0x6f,0x1d,0x98,0x9e,0x38,0x9f,0x50,0x56, - 0xf2,0xa3,0xbb,0xb6,0xbb,0xcc,0x4b,0x6d,0x62,0x0f,0x42,0xe9,0xaa,0xa8,0x12,0x6b, - 0x2e,0x70,0xf3,0xa7,0x62,0x43,0x02,0x77,0x2e,0x21,0xcd,0x55,0xdd,0xfe,0x17,0x96, - 0xdf,0x9b,0x5b,0x78,0xb0,0x80,0x2a,0x89,0x66,0xe1,0x34,0xdf,0xba,0x34,0xb3,0x76, - 0x42,0xc5,0x53,0x20,0xb1,0x91,0x22,0x98,0xe3,0x54,0xbc,0x20,0x8c,0xc0,0xa6,0xb0, - 0x98,0x0d,0x5a,0x49,0x30,0x02,0x15,0x50,0x43,0x12,0xea,0xdf,0x32,0x72,0x18,0x7b, - 0x40,0x5c,0xb3,0xf4,0x3c,0x51,0xd0,0x35,0x91,0xc6,0xe3,0xb3,0x10,0xe0,0x4b,0xf0, - 0x24,0xac,0xcc,0xc0,0xb2,0x8c,0x93,0xd1,0x52,0x16,0x26,0x96,0x99,0x65,0xf8,0xa3, - 0x5b,0x1a,0x77,0x46,0x33,0x3f,0xcd,0x02,0x40,0x15,0x1c,0xcc,0xc1,0x78,0xc6,0xb2, - 0xd2,0x19,0x69,0xba,0x70,0x33,0x46,0x4b,0x43,0xf9,0x8f,0xef,0x9a,0x67,0x8d,0x88, - 0xf2,0xba,0xce,0xa6,0xc3,0xb1,0x61,0x4a,0x80,0x7c,0xc5,0x68,0x90,0x38,0x00,0x59, - 0x2e,0x89,0x79,0x0e,0x86,0x91,0xe9,0xdb,0x50,0x1a,0xe8,0xab,0xf5,0xd5,0x3a,0x90, - 0x61,0x28,0xc6,0x8c,0x5a,0xa0,0x9b,0x48,0x52,0x1b,0x7f,0x7c,0x61,0x84,0x75,0x79, - 0x57,0x15,0xbf,0xca,0x7a,0x21,0x00,0x99,0xee,0xeb,0x37,0x22,0x11,0x1e,0x2f,0x2a, - 0x40,0x4a,0x18,0x62,0xbf,0x83,0x0c,0x0f,0x48,0xa4,0x88,0x46,0x18,0xe8,0xd7,0x2a, - 0x86,0xb1,0xee,0xbf,0x06,0xba,0x40,0xc4,0xd9,0x11,0xc0,0xc4,0x7c,0xed,0x87,0xab, - 0x5b,0x12,0x9f,0x1b,0xd2,0xac,0x48,0xd4,0x6d,0xcc,0x82,0xcd,0x4b,0x62,0xd2,0x2b, - 0xac,0xa6,0x43,0x8d,0xbe,0x3a,0x29,0xc0,0x89,0x9b,0x35,0x0d,0xbc,0xf5,0xfb,0xaa, - 0xd3,0x10,0x28,0xae,0x87,0xe9,0xe7,0x9b,0x50,0xea,0x67,0x0e,0xc3,0xf5,0x83,0x33, - 0x3c,0x9f,0xb5,0x1b,0x5e,0x91,0x68,0xfb,0x42,0x51,0xbf,0x3a,0xf5,0x7f,0xd0,0x3b, - 0x03,0x10,0x28,0x55,0x93,0x54,0x2e,0x1b,0xf6,0x3c,0xe8,0x19,0x7f,0x6c,0x99,0xe3, - 0xaa,0x09,0x61,0x5e,0x08,0xa9,0x93,0xdc,0xa7,0x16,0x05,0x45,0x2f,0xb7,0xcb,0x83, - 0x26,0x08,0xb5,0x93,0xcc,0x26,0xc1,0xc3,0x62,0x62,0x42,0x48,0xe9,0x4c,0x57,0x7f, - 0xf6,0x55,0x83,0x06,0x46,0x59,0x12,0x6b,0x47,0x84,0x81,0x96,0xa9,0xeb,0xa8,0xb6, - 0x30,0x51,0xe8,0x96,0x57,0x7e,0x27,0x94,0x34,0x33,0xfb,0x96,0x51,0x9a,0xd6,0x6e, - 0x72,0xd7,0x83,0xdf,0x63,0x20,0x4d,0x91,0xf9,0x36,0xd1,0xf2,0x6f,0x6c,0xf8,0x4c, - 0xbb,0xc5,0xe9,0xaa,0xc5,0xa1,0xa6,0x79,0xb0,0xc2,0xce,0x5b,0x2b,0xf6,0xda,0x3b, - 0x34,0xca,0x9a,0xee,0x20,0xb3,0x27,0xae,0x34,0xaa,0x12,0x5c,0x6a,0x47,0x1d,0x32, - 0xf1,0xb8,0x2f,0x8e,0x3c,0x39,0x42,0x3e,0xa4,0xd8,0x1a,0x44,0x97,0x8d,0x30,0x9d, - 0xcc,0x85,0x44,0x69,0xde,0xa3,0x69,0x2a,0x6f,0x61,0x17,0xe8,0x25,0x4c,0xeb,0xff, - 0xdd,0xc9,0xb9,0x1b,0xbe,0x3b,0xfb,0x03,0x75,0x34,0xb3,0x27,0x20,0x44,0x6d,0x78, - 0x6d,0xac,0xc2,0xd3,0xbf,0x25,0xb2,0x9f,0x83,0x41,0x32,0xaf,0x27,0xe4,0x54,0x76, - 0xac,0xe8,0xd4,0x66,0xdd,0xa5,0xd6,0xe9,0x48,0xc5,0x4d,0x56,0x59,0xc7,0x1b,0xcf, - 0xd7,0xae,0x7c,0x2f,0xc6,0xc0,0x0d,0x43,0x27,0xdf,0xf2,0x62,0x26,0xbf,0x55,0x76, - 0x2c,0xcd,0xd5,0x72,0x5d,0xef,0xfb,0x18,0x46,0x44,0xe4,0x6e,0xef,0xc3,0x6e,0x9f, - 0x05,0xf0,0xaf,0xe4,0xdf,0x61,0x6e,0x94,0x0c,0xe1,0xcf,0xe3,0x44,0xd0,0x11,0xcd, - 0x23,0xaa,0x6c,0xcf,0x22,0xbc,0x60,0x83,0x5d,0xce,0x89,0xac,0x05,0x45,0xe9,0xaf, - 0x07,0x6e,0x11,0xe5,0x5f,0x43,0x4c,0xdc,0x43,0x59,0x0e,0xd7,0xfc,0xfb,0x37,0xc8, - 0x1c,0x2f,0xd3,0x37,0x19,0xbe,0x04,0xf1,0x44,0x9e,0xaa,0xc4,0xc5,0xf8,0x3e,0xf4, - 0x4e,0xa5,0xec,0xcf,0x30,0x05,0xe5,0xdd,0x56,0x96,0x8c,0x06,0x62,0x7f,0x93,0x56, - 0x7e,0xe1,0x79,0xd4,0x77,0x00,0xdb,0xca,0xea,0x78,0xeb,0x53,0x14,0xd5,0x1c,0xa5, - 0x2b,0xf4,0x8c,0xf8,0xc6,0x63,0x29,0xca,0x32,0xa7,0x5e,0xd6,0xc6,0xb4,0xc1,0x56, - 0xdb,0x68,0xfe,0xed,0x8b,0xf5,0x6e,0x61,0xe6,0x7a,0x85,0xe6,0xc7,0x5a,0x91,0xa2, - 0x2a,0xa1,0xd8,0x2f,0xdd,0x17,0xc9,0x42,0x3b,0x95,0x35,0xbd,0x08,0xa9,0xd1,0x6a, - 0xf9,0xa8,0xbb,0x1a,0x64,0x31,0x56,0xd8,0xde,0x24,0xee,0x86,0xb5,0xda,0xac,0x0f, - 0xdc,0xdc,0xb6,0x7f,0xa0,0x1b,0xcc,0xd4,0xb9,0x25,0x91,0x92,0xc0,0x5e,0x56,0xe4, - 0x0a,0x10,0x97,0xd8,0xb3,0x39,0xc7,0xb9,0xf5,0x7b,0xa8,0xbd,0x9b,0x56,0xa6,0x93, - 0xee,0x63,0xbd,0xd7,0xe2,0x0d,0xe3,0x78,0x6e,0xd6,0xe7,0x5c,0x22,0xf2,0x78,0xf3, - 0x9c,0xd0,0xf4,0xa3,0x1e,0xec,0xef,0x7e,0x44,0x53,0xa4,0xeb,0xdc,0x98,0xbc,0xcb, - 0xcd,0x5b,0x87,0xcd,0xe0,0xb3,0xf7,0x88,0x0a,0x2b,0x67,0x6d,0x90,0x3f,0x10,0x23, - 0xaf,0x32,0xd2,0x0f,0xef,0xb4,0x93,0x88,0x9f,0x59,0xa5,0x00,0x5c,0xbe,0x28,0x62, - 0x81,0x0f,0x1e,0x75,0x21,0x2b,0x91,0x52,0x6e,0x9f,0xf8,0xe6,0xd4,0x6e,0x20,0xd2, - 0x6a,0x0f,0x16,0x84,0xee,0x64,0x97,0xdf,0xb9,0xfb,0xa0,0x90,0xd3,0x45,0x29,0x06, - 0x01,0x46,0x01,0xfc,0x9c,0x8f,0x3b,0x84,0x83,0x4f,0x35,0xe7,0x73,0x6c,0x49,0xb1, - 0x83,0x11,0x88,0xb2,0x17,0x70,0xae,0x59,0xc7,0x98,0x12,0x57,0xf0,0x23,0xfb,0x86, - 0x58,0x1f,0x98,0x5d,0x21,0xf0,0x2b,0x47,0xe3,0xfb,0xc8,0xe5,0x31,0x55,0x68,0x41, - 0x30,0x66,0x1c,0x32,0x32,0x45,0x98,0x9c,0xa3,0x43,0x82,0x42,0x39,0x14,0x95,0x27, - 0xc0,0x49,0x7b,0xa5,0x82,0x3d,0xe6,0x59,0x36,0x37,0xc7,0x5d,0x39,0x22,0x13,0x54, - 0x24,0xac,0x09,0xa0,0xce,0x66,0x79,0xa4,0x62,0xf8,0x19,0x48,0x2d,0x6d,0xaa,0xa4, - 0x8d,0x7b,0x2a,0xa1,0x2b,0xaa,0x61,0xc0,0x42,0x05,0x9e,0xc6,0x7a,0x7a,0x83,0x18, - 0x62,0x71,0x32,0xef,0x0c,0x32,0x65,0xc9,0x5c,0x49,0xc0,0x38,0xfa,0x25,0x5d,0x40, - 0x88,0xa1,0x3b,0xfe,0x81,0x3a,0xec,0xc1,0xc6,0x07,0x90,0xaf,0x58,0x02,0x0b,0xe8, - 0xd8,0x0b,0x49,0x7b,0x72,0x53,0xae,0xe0,0xcf,0xf0,0xda,0xfb,0x83,0x43,0x57,0x55, - 0xeb,0xa3,0xf8,0xbf,0x2e,0x83,0xfe,0x17,0x90,0x91,0x52,0x6f,0x75,0xc1,0x2d,0x3e, - 0xf4,0xa0,0x9b,0x5c,0xf2,0xc7,0x9a,0xec,0xd4,0x40,0xc2,0xfd,0xb2,0xd7,0xd2,0xba, - 0xba,0x15,0x0d,0x0b,0xc4,0x6c,0x31,0x69,0xc9,0xdc,0x98,0xfd,0xb3,0x7f,0x5a,0x1e, - 0x55,0x07,0x67,0xcf,0xc7,0x27,0x20,0x5e,0x6a,0xf0,0x80,0x7d,0xb3,0xfe,0x5d,0x01, - 0xdd,0x5f,0xd9,0x07,0xdd,0x5c,0x4d,0x27,0x85,0xd1,0xd3,0x4c,0xf0,0xbd,0xb9,0x78, - 0x2f,0xec,0x5e,0x7c,0xbb,0xfa,0xe3,0x4e,0x99,0x48,0x2e,0x65,0xf6,0xc3,0xb2,0xf8, - 0xa6,0xa9,0xdc,0x02,0x76,0x3a,0xea,0x5e,0x01,0xd1,0x8b,0x74,0xd1,0xb2,0xf5,0x93, - 0xa7,0xe6,0x8d,0x7d,0x63,0xf3,0x46,0xb1,0xe7,0xc3,0xbd,0x28,0xc2,0xa7,0x84,0x55, - 0xe3,0x1f,0xba,0xc3,0x93,0x3f,0x94,0x74,0xfd,0xf9,0xea,0xcc,0x53,0x16,0xdd,0xef, - 0x1b,0xb5,0xdd,0xc7,0x68,0x3a,0xcf,0x12,0x2b,0x44,0xe2,0xcc,0xa9,0xca,0xc5,0x80, - 0x37,0xb6,0x45,0xc6,0x3a,0x9b,0x42,0x03,0x4e,0xfb,0xeb,0x3c,0x09,0x1a,0x58,0x21, - 0xa2,0xe6,0xff,0xc6,0x10,0x46,0x51,0x64,0xd0,0x83,0xe3,0xd8,0x31,0x77,0x19,0x0c, - 0x5f,0x2b,0xd6,0x81,0x48,0x93,0x72,0xd7,0x5c,0xe7,0x2c,0x53,0xfa,0xbf,0xb9,0xe0, - 0x2f,0xa2,0x4e,0x64,0x04,0x3d,0x08,0xda,0xa1,0x40,0x1c,0xc3,0xda,0x37,0x5e,0x0c, - 0x55,0x55,0x1c,0x8c,0x3d,0x7a,0x2c,0x15,0x1b,0x27,0x54,0xcf,0x85,0x73,0xba,0x71, - 0xa3,0xe6,0x1f,0x19,0xca,0x42,0x67,0x8b,0x16,0x37,0xd8,0xbf,0xad,0x3e,0x86,0x59, - 0x8e,0xb1,0xb8,0xf4,0xdb,0x93,0xec,0x6c,0x20,0x0a,0x16,0xd1,0x9c,0x76,0xab,0xab, - 0x5b,0x12,0xa8,0x05,0x3a,0x7d,0x54,0xfa,0x80,0x4c,0x49,0x1a,0x18,0x5d,0x56,0x2b, - 0xac,0xbc,0xd2,0xbe,0x82,0x52,0xe8,0x0b,0x03,0x0f,0x57,0xee,0xd5,0x3c,0x71,0xf4, - 0xad,0xbd,0xeb,0xde,0xbd,0xce,0xe0,0x99,0xe7,0x37,0xa7,0xee,0xc3,0x65,0x1a,0xf9, - 0xfb,0xc2,0xa1,0x60,0xff,0x38,0xcb,0xca,0xce,0x0d,0xc9,0x86,0x00,0x70,0x16,0x6e, - 0x24,0xc1,0x75,0xcd,0xfc,0x48,0x40,0x00,0x8d,0x7b,0xbe,0xd4,0xd0,0x31,0xf9,0x53, - 0xac,0x79,0x61,0xe3,0xd5,0xe0,0xcc,0x50,0xf5,0xb6,0xd1,0x25,0xd9,0x69,0x3d,0xca, - 0x6c,0x6a,0x45,0x84,0xa4,0xab,0x41,0x01,0x3a,0xd8,0x51,0xae,0xdc,0xfc,0xe0,0x03, - 0xd3,0xc6,0x60,0x45,0xde,0x09,0xc7,0x5e,0xb2,0x75,0x8f,0x1c,0x3c,0x95,0x64,0x1c, - 0xe6,0x3a,0xd0,0xa5,0x23,0x28,0x58,0xba,0xe6,0x7a,0x78,0x75,0x78,0x48,0xa7,0x11, - 0xa5,0xc6,0x2f,0x76,0x37,0x07,0xb1,0x8f,0x26,0xc0,0x31,0x5a,0x30,0xec,0xde,0x7b, - 0x81,0xb4,0x97,0x7f,0x7e,0xb6,0xd5,0x0c,0x1d,0x1a,0xec,0x17,0xdd,0x6c,0x38,0x0b, - 0x2d,0xc8,0x29,0x7c,0xe3,0xea,0x70,0x59,0xef,0x87,0xe2,0x3a,0x0c,0xee,0x92,0xfa, - 0x4f,0x7c,0xaa,0xd8,0x5b,0xe7,0x25,0xd2,0x71,0x84,0xc2,0x78,0x19,0xa7,0x27,0xf8, - 0xbf,0xfb,0x78,0x3d,0xf7,0x43,0x32,0x54,0x6b,0x9f,0x93,0x6a,0xbf,0x2a,0x30,0x9f, - 0xfa,0xb8,0x2b,0xf7,0x17,0x6b,0x63,0x3f,0x79,0x52,0xfc,0x7e,0x6e,0xa7,0xa6,0x54, - 0x32,0x78,0x4e,0xdd,0x4d,0xa4,0x10,0x6a,0x4f,0x0e,0x64,0x5f,0x2e,0x43,0x7b,0xde, - 0x35,0xef,0xb2,0x6f,0x2f,0x02,0x55,0x09,0x73,0xc2,0x6f,0xfa,0x23,0x1a,0x70,0xb2, - 0x86,0x7b,0x63,0x4c,0x56,0x25,0x9b,0xf2,0xc8,0x0c,0x53,0x9f,0x3a,0x4d,0xc8,0x62, - 0x53,0x5e,0x4b,0x2d,0xfd,0x99,0xcf,0x08,0xbf,0xc0,0xb3,0x7b,0x57,0x84,0xdc,0x06, - 0x0b,0x07,0xfd,0xb2,0x91,0x4f,0x0b,0x3d,0x9b,0x4d,0x73,0x06,0x5c,0xd0,0xd3,0x10, - 0x9f,0xff,0xe4,0x9a,0x33,0x6a,0x73,0x4a,0x65,0x93,0x7b,0x30,0x5d,0xbf,0x95,0x0f, - 0x45,0xf1,0x9b,0xfb,0x39,0x44,0x53,0x41,0x13,0x67,0x41,0x67,0xb0,0xb7,0x15,0xce, - 0x5a,0x88,0x23,0x13,0xea,0xb3,0x3e,0x30,0xd6,0x11,0xfa,0xc4,0xbe,0xf8,0x85,0xbd, - 0x85,0xd6,0x1c,0xa4,0x17,0xf4,0x65,0x62,0x44,0x26,0xd2,0xcf,0x6d,0x50,0x14,0xa1, - 0x5f,0xd7,0xfa,0xee,0xdc,0xf1,0x2c,0x6b,0x77,0xd3,0x31,0x05,0x30,0xee,0x23,0x4c, - 0x4f,0x47,0xc1,0x22,0xd5,0xa7,0xf1,0xa6,0xd6,0xde,0xe4,0x2b,0x3e,0xe7,0x2b,0x5d, - 0x5a,0x98,0xb7,0xe1,0xdd,0xc6,0x59,0xaf,0x0e,0xc6,0xdc,0x88,0x50,0x7a,0xb3,0xec, - 0xed,0xfb,0xa0,0xf2,0xbc,0xa8,0x8d,0x4c,0x7c,0x25,0xf3,0x46,0xa8,0x35,0xd1,0xe9, - 0x44,0x38,0x2e,0x1a,0x0e,0xae,0xa0,0x08,0x65,0xb9,0xfa,0x56,0x53,0xb4,0xf3,0x5b, - 0x2d,0x62,0xf9,0xf3,0xbc,0xf4,0xcf,0x52,0xe4,0x77,0xef,0x3f,0xdc,0x08,0x17,0xc6, - 0x52,0xde,0x6f,0x4b,0x12,0xb5,0x78,0xb9,0xfd,0x76,0xe7,0xba,0xf9,0x10,0xa6,0x5f, - 0xef,0xde,0x98,0xc9,0x9f,0x43,0x0e,0xe8,0x26,0x51,0x88,0x8a,0x82,0x6d,0x68,0xf3, - 0x67,0xac,0x6e,0xdd,0x10,0x10,0x2e,0x6a,0x63,0xdc,0x54,0x7a,0x79,0xe0,0x21,0x45, - 0x53,0x91,0x4b,0x5c,0x93,0xb4,0x17,0xe8,0xbb,0xd1,0x44,0xc2,0xf8,0xc5,0xaf,0x4f, - 0x76,0x92,0xa0,0x4f,0xd6,0x8e,0x38,0xe7,0x06,0x75,0xa6,0xf5,0x5a,0xf6,0xd8,0x73, - 0x1b,0xa9,0xde,0xe6,0x44,0xa5,0x5e,0x31,0x70,0x69,0x82,0x20,0xaf,0x22,0x36,0xdd, - 0xcb,0x5b,0xb2,0xa4,0xff,0x8e,0xaf,0x18,0x47,0x78,0x08,0xc4,0x64,0xc0,0x48,0xe1, - 0x94,0x6e,0x93,0x32,0x7b,0x66,0x82,0x05,0x38,0x73,0x48,0x8b,0x2d,0x0e,0xe5,0x83, - 0xc1,0x09,0x2d,0x6b,0x32,0x46,0x92,0x0e,0xf9,0x01,0x8c,0xc6,0x55,0xee,0x78,0xbf, - 0x3d,0x55,0xfe,0x95,0x31,0x84,0xc1,0x12,0xe5,0x06,0xaf,0x43,0xf3,0xbb,0x8b,0x4f, - 0x3b,0x1e,0x4e,0xbc,0x41,0x68,0xfb,0x59,0xa2,0xba,0x0e,0x46,0xac,0xe8,0x1e,0xc0, - 0x84,0xe6,0x98,0x5b,0x77,0x2f,0x48,0xe5,0x1e,0x17,0x65,0x07,0xf6,0xcb,0x28,0x27, - 0x7c,0x7c,0x8b,0xb3,0x13,0xb7,0x00,0xe9,0x66,0x4e,0xa2,0x8e,0x6e,0x96,0x9a,0x4f, - 0xe1,0x32,0x3d,0xee,0x3c,0x87,0x4f,0x58,0x2b,0x25,0xc0,0x9b,0xb3,0x0c,0x68,0x08, - 0x08,0xc9,0xf4,0x1b,0x3d,0x26,0x20,0x88,0x97,0xe6,0x8c,0x15,0xb2,0x2d,0x65,0xc1, - 0x77,0x64,0x23,0x7f,0xfa,0xdc,0x05,0x01,0x23,0x0e,0xab,0x09,0xbb,0x13,0x35,0xd4, - 0xe0,0x51,0xb4,0xec,0x3a,0x6b,0xbf,0x5b,0xed,0xd7,0xa1,0x8d,0x37,0xc4,0xd3,0x3a, - 0xf1,0x4e,0xf8,0xa4,0x48,0x63,0x53,0xea,0xf0,0x91,0x2d,0x02,0x30,0x63,0x74,0x70, - 0xe8,0x04,0x35,0xd8,0x04,0x40,0xa5,0x07,0xc4,0xcb,0xe1,0xd4,0xa8,0x2c,0xc5,0xd5, - 0x56,0x1f,0xfd,0x64,0xf2,0x17,0x6b,0x2e,0x00,0x7f,0x28,0x16,0xe0,0xd1,0xcf,0x4a, - 0xbb,0x3e,0xab,0xf6,0x22,0x22,0xdb,0x39,0xd3,0xb2,0x08,0x83,0xb8,0x7e,0x46,0x66, - 0xc9,0xda,0xba,0xa8,0x36,0xc0,0xab,0x51,0xc3,0x10,0xa7,0x46,0x9b,0x7f,0x04,0x94, - 0xc5,0xdb,0xb4,0x6f,0xcc,0x90,0x9b,0x3b,0x02,0x68,0xe4,0x0c,0x86,0x30,0xe9,0x69, - 0x34,0xd4,0xe0,0xe7,0x43,0x57,0x75,0x83,0xe8,0x12,0xa7,0x9c,0x0f,0xdf,0x54,0x9b, - 0x04,0xec,0xb5,0xb1,0x4e,0x28,0x0b,0x98,0x0a,0x17,0x5d,0xc1,0x92,0x1d,0x80,0x10, - 0x5c,0x78,0x42,0xb7,0x02,0x3b,0x57,0x08,0x30,0xdf,0x70,0x86,0x85,0x89,0x8c,0xb1, - 0x61,0xba,0xf2,0x05,0x12,0xf5,0x24,0x82,0x50,0x45,0xe4,0xc5,0xd2,0xf4,0x23,0xed, - 0xa3,0xd7,0xff,0x2d,0xa2,0x79,0x51,0x07,0x0b,0x47,0x79,0x7b,0xd6,0xd7,0x5c,0xa2, - 0x9b,0x7b,0x94,0xdd,0x16,0x96,0xa5,0x19,0x81,0x1a,0xc0,0x06,0x77,0xfa,0xc6,0xb5, - 0x9c,0xe5,0xb6,0xea,0x6d,0x77,0x2c,0x18,0x86,0xf7,0xcf,0xbb,0xdd,0x8e,0x89,0xb0, - 0x4a,0x20,0x1e,0x6f,0xb5,0x34,0x66,0xbc,0xeb,0x5c,0xb1,0xc3,0xa0,0xe5,0x7f,0x61, - 0xbb,0x58,0x86,0xeb,0xe5,0x75,0xb3,0x8d,0x55,0xf1,0xd6,0xcb,0x2e,0x3b,0x19,0xb5, - 0xaf,0xea,0xf4,0xba,0x18,0x84,0xd2,0x9d,0x8a,0x9e,0x24,0xe7,0xdd,0xd0,0x20,0xe0, - 0x29,0xce,0xdc,0x2a,0xb8,0x6b,0x40,0xc4,0x95,0x30,0x84,0x5b,0x91,0x18,0xb6,0x4a, - 0x23,0x15,0xcf,0xba,0xb6,0xcb,0x81,0x07,0x82,0x2c,0x85,0xfc,0x7d,0xed,0x1e,0xdd, - 0x0f,0x9e,0x52,0xaf,0x45,0x25,0x31,0xc5,0xe9,0x1e,0x47,0x13,0x5f,0xc1,0x09,0xaa, - 0x93,0xbe,0xc7,0xcc,0x5a,0x70,0xb3,0x66,0xea,0xcc,0xbb,0x15,0x74,0x32,0x38,0xc3, - 0x89,0x2d,0xc0,0x24,0x0b,0xe1,0x0f,0x78,0xd9,0x3d,0x14,0x44,0x70,0x6b,0xd3,0x6d, - 0x45,0x55,0xba,0xff,0xfe,0xe5,0xb8,0xb0,0xe5,0x72,0x18,0x44,0x37,0x06,0xec,0x90, - 0x93,0x02,0xff,0xe5,0xc0,0x27,0x9c,0x4c,0xaf,0xcd,0xaa,0x16,0xec,0x4d,0x51,0x21, - 0x7a,0x98,0x93,0xa7,0x27,0xe2,0xf9,0x2e,0x5f,0xce,0xc7,0x30,0x74,0xa2,0x39,0xc8, - 0xe3,0x2f,0x1f,0x35,0x22,0xca,0x12,0x9c,0x45,0x44,0x67,0x95,0xd2,0x6f,0x8a,0x66, - 0xf8,0xc7,0xb1,0x56,0x24,0x65,0x18,0xd9,0xb2,0x68,0xc0,0x52,0x34,0xca,0x19,0x5e, - 0x66,0x9d,0x06,0x07,0x9a,0xe4,0x4b,0x8b,0x94,0x89,0x43,0xdb,0x3d,0x82,0x37,0xc7, - 0x72,0x28,0x51,0xb7,0x8d,0xbc,0x6c,0x91,0xac,0xc8,0xef,0xa2,0x3c,0xa3,0x00,0x6c, - 0xf7,0xe4,0xf8,0x50,0x24,0x07,0xc9,0x0d,0xed,0x89,0xcc,0x28,0xbd,0x6b,0x2a,0x5a, - 0x41,0xc7,0xd4,0x19,0x39,0x06,0x44,0x3c,0xac,0x4a,0xc4,0x38,0xbc,0x6a,0x9c,0x90, - 0x6d,0x0c,0x03,0x7d,0xfe,0xdd,0x69,0xb6,0xa4,0xdb,0x41,0xdc,0x50,0xab,0xec,0xf3, - 0x21,0x00,0x0f,0xee,0x3e,0xeb,0x0b,0xc8,0x41,0x8a,0x49,0xcc,0x51,0xaa,0xf7,0xa2, - 0x2e,0xc1,0xa1,0x28,0x3d,0x2e,0xf5,0x78,0xa5,0xdd,0xc8,0xde,0xb8,0x43,0x8d,0x9a, - 0x0b,0x79,0xfb,0xdc,0xa5,0x10,0x38,0xf8,0xf5,0x70,0xeb,0x47,0xb4,0xa9,0x9c,0x38, - 0xba,0xe2,0x23,0xbe,0x7e,0x5a,0x2a,0xe1,0xab,0xc7,0x57,0x4b,0x2d,0x65,0xfa,0x28, - 0xb3,0xed,0xd3,0x2e,0xaf,0xa6,0x43,0x0a,0xff,0xc6,0xa1,0x49,0xad,0x40,0x0b,0x06, - 0x78,0x0a,0x64,0x6a,0xd4,0xde,0x22,0x8a,0x8f,0x94,0xcc,0xa2,0xf6,0xf5,0x52,0xbe, - 0x6d,0x7b,0xce,0x92,0x11,0x1a,0x98,0x96,0x06,0xab,0xc2,0xb0,0x94,0x72,0x7f,0x93, - 0xcc,0xc3,0x1a,0x15,0xb4,0x6f,0x0f,0x13,0x02,0x7d,0x78,0x83,0x94,0x00,0x13,0x46, - 0x28,0x15,0xd5,0x93,0x37,0xb6,0xa8,0x40,0x61,0x5e,0x4f,0x44,0x79,0xb2,0x79,0x3d, - 0x20,0xee,0x24,0x3f,0x70,0xf5,0x2d,0x7a,0xc3,0xdf,0x8b,0xc2,0xcb,0x0b,0x56,0x3a, - 0x4b,0xda,0x6b,0x0e,0xb5,0xc2,0x46,0x1a,0x77,0x9a,0xa7,0xf6,0x71,0x65,0xd9,0x47, - 0xdd,0x54,0x85,0x68,0x5f,0xf4,0xf3,0x85,0xa6,0x99,0x2e,0xe7,0x0e,0x4c,0x4d,0xc3, - 0x46,0x8c,0x82,0xb5,0x04,0xd2,0x24,0x6b,0x42,0x57,0x99,0x99,0x8b,0x08,0xa1,0x4a, - 0x2a,0x38,0xf1,0x8a,0x60,0x8e,0x64,0x1c,0x87,0xbc,0xa4,0x17,0x97,0xbc,0x3d,0xfa, - 0x29,0xb0,0xe0,0xe1,0xd6,0xb6,0x40,0xbc,0x8c,0x5a,0x1a,0x9a,0x16,0xa8,0x32,0x9a, - 0xdc,0x37,0x9f,0x74,0xba,0x61,0xa7,0x5b,0xd9,0xab,0x8d,0x1f,0x1a,0x55,0x61,0x8a, - 0x91,0xb2,0x9d,0xbb,0x54,0x4a,0xcd,0x48,0x61,0x9a,0x40,0x3d,0x47,0x46,0xe4,0x2c, - 0x1d,0x3f,0xde,0x25,0x92,0xb1,0x8e,0xad,0xac,0x5c,0xcd,0xca,0x1d,0xed,0xd6,0xca, - 0x88,0xf3,0x7e,0x5c,0x81,0x03,0x21,0x98,0x2c,0xde,0xa4,0xd5,0x15,0x8c,0xdf,0x34, - 0x9d,0x7f,0x1e,0xe8,0x1f,0xc1,0x7f,0xdf,0x6c,0xda,0xe1,0xd7,0x15,0xba,0x88,0x1b, - 0xab,0xb2,0xd7,0x25,0x13,0xb2,0x80,0x44,0xed,0xdd,0x81,0xf8,0xdb,0xff,0x3a,0xf3, - 0x30,0x8b,0xd4,0x2f,0x36,0xd4,0xef,0x1e,0xe3,0x46,0x65,0x57,0x56,0x90,0xb0,0xf0, - 0x05,0x20,0x8f,0x69,0xee,0xf4,0x87,0xcb,0xb1,0x4e,0x98,0xb6,0xef,0xdf,0x99,0x30, - 0xb0,0x1d,0x21,0x1b,0x1c,0x60,0x11,0x25,0xc6,0xf2,0x88,0x25,0xd0,0x62,0x42,0x95, - 0xd8,0x1a,0xf1,0xe4,0x32,0x63,0xd9,0xdc,0xb6,0x2f,0x59,0x28,0xe0,0x63,0xc5,0xb3, - 0x29,0x7f,0xe8,0x26,0xef,0x28,0x0d,0x9f,0xc0,0x73,0xe8,0xe0,0x14,0x17,0xb7,0xd4, - 0x76,0x89,0xa0,0x36,0xec,0x2b,0x62,0x8d,0xe2,0x9e,0x88,0x4b,0x79,0x27,0xbe,0x33, - 0x79,0xfd,0xf9,0xc1,0xd8,0x73,0x5c,0xe5,0x9e,0xdc,0x65,0x1a,0x71,0xb3,0x77,0x88, - 0xc1,0xf8,0xf1,0xab,0x95,0x9e,0xde,0x8a,0x30,0x05,0x9f,0x4b,0xd5,0xa5,0x3a,0xf6, - 0xa4,0x05,0xbc,0x25,0xf8,0x87,0xa9,0xba,0x4c,0x40,0x92,0x2c,0x58,0xcc,0x32,0xeb, - 0x79,0x6c,0x31,0x03,0xba,0x6b,0x0e,0x6c,0xb1,0x38,0x76,0xaf,0x46,0x63,0xfc,0x8d, - 0xd1,0xc1,0x23,0x1e,0x3b,0x4e,0x15,0xd8,0xfc,0x2a,0x5a,0xcd,0x31,0x61,0x33,0xea, - 0xf1,0xa6,0x8c,0x2a,0xd1,0x1a,0xac,0x04,0x3d,0x9a,0x8b,0x2e,0xca,0x40,0x7c,0x81, - 0x87,0xfa,0x93,0x53,0x66,0x2a,0xc5,0x04,0xc7,0x0e,0x05,0x4b,0xf6,0x61,0x16,0xb5, - 0x03,0x80,0xb2,0x7b,0x1d,0xef,0x04,0x9c,0xb4,0x0c,0x21,0xf8,0x03,0xe3,0x0b,0x51, - 0x42,0x34,0xe3,0xa1,0x73,0xdf,0xd0,0x8a,0xcb,0xce,0x2c,0x1f,0x29,0xd1,0x34,0xa4, - 0x83,0x4d,0x5a,0x1f,0x3a,0xd2,0x9b,0x44,0xf0,0xb0,0x60,0x3f,0x7a,0x92,0xf9,0xba, - 0x54,0x52,0x44,0xdd,0x22,0xbb,0xd4,0xd1,0x66,0xa4,0xaa,0x45,0xff,0xd6,0x15,0xee, - 0x82,0x74,0x92,0xb9,0x10,0xf1,0x7a,0x9d,0x62,0x6b,0x55,0xd4,0x25,0xde,0x8b,0x83, - 0xa6,0xaa,0x81,0x67,0x59,0x63,0x84,0xd2,0xd4,0x3e,0xd8,0x65,0x80,0xdf,0xb2,0x73, - 0x51,0x30,0x4d,0xcc,0xa3,0xb8,0x43,0x98,0xe9,0xfe,0xc5,0xc6,0xaa,0xfc,0x7e,0xfd, - 0xc9,0x9f,0xbc,0x35,0x50,0x30,0x94,0x74,0x95,0xfb,0xb4,0xe6,0xf6,0xff,0x90,0x52, - 0x9d,0xb8,0xb2,0xe8,0xda,0xe4,0xa1,0x74,0x29,0x72,0xfc,0x77,0xd0,0x73,0xfe,0x71, - 0xaa,0xb9,0x9b,0x74,0x36,0xbb,0x05,0x9a,0x09,0x75,0xd7,0x07,0x13,0x70,0x8d,0xec, - 0xd0,0xe8,0x61,0x47,0xfb,0x3d,0xea,0xcc,0x10,0xe8,0xfd,0xea,0x52,0x71,0x31,0x2c, - 0x94,0x69,0x82,0x6e,0x5b,0x48,0x03,0x98,0x60,0xa7,0x94,0x53,0x99,0x07,0xce,0xcd, - 0xa9,0x5b,0x84,0xef,0x0d,0x36,0x08,0xda,0x96,0x84,0xb4,0xcf,0x2a,0xfb,0xb0,0xb0, - 0x5c,0x8b,0x91,0xa5,0xbe,0x82,0x2d,0x0c,0x1f,0xa7,0xc8,0x52,0xfe,0xa3,0x00,0x6d, - 0x5c,0x14,0x89,0xb5,0x50,0x2a,0xcb,0x47,0x00,0xaa,0x60,0xce,0xe6,0x17,0x1f,0xc1, - 0x2c,0xec,0x59,0x48,0x7c,0xcf,0xad,0x6c,0x32,0xd2,0xf6,0x6a,0xd9,0x7a,0x2e,0x77, - 0xc2,0x5f,0x0c,0x61,0x9a,0x82,0x76,0x9a,0x6d,0xff,0xd6,0x1e,0x0c,0x79,0x01,0x4d, - 0xd6,0x97,0x73,0xaf,0x4d,0x7c,0xec,0xab,0x4b,0xa3,0xf7,0x14,0x5b,0xf6,0xd8,0x21, - 0x54,0x5d,0x74,0x2e,0x99,0x82,0xee,0x3b,0x4a,0xa0,0x00,0xa8,0x80,0x32,0x31,0x86, - 0x5d,0x87,0x9e,0x2f,0xf6,0x60,0xf0,0xca,0x86,0x1d,0x8e,0xc7,0xdb,0x46,0x16,0x3a, - 0x03,0x39,0xce,0x3b,0x14,0x23,0x00,0x0c,0x6f,0x34,0xe4,0x09,0x76,0xa3,0x5f,0x3f, - 0x5c,0x73,0x10,0x74,0xa0,0xcc,0x19,0x41,0x39,0xce,0xfc,0xe7,0xd2,0x57,0xbb,0x38, - 0x01,0x28,0x69,0x4e,0x87,0xae,0xe9,0x08,0xf9,0x81,0x62,0x7d,0xd3,0x12,0xfb,0x10, - 0x4e,0x8f,0xc8,0x24,0x10,0x06,0x29,0x72,0x40,0x34,0xd8,0x04,0x50,0x46,0x54,0xd6, - 0x7b,0x1e,0x80,0x34,0xe0,0xe7,0xa0,0x56,0xc5,0xc1,0x90,0x14,0x51,0x27,0x41,0x81, - 0x04,0xf1,0x50,0x85,0x37,0x59,0xf1,0x7c,0xe1,0x66,0x40,0xa5,0x77,0x19,0x96,0xbb, - 0x9f,0xc5,0xf6,0xff,0x15,0xa3,0xdd,0x11,0x30,0xc1,0x2c,0x50,0x7b,0x1a,0x72,0x0b, - 0xe7,0xab,0xa0,0xec,0x1a,0x10,0x6b,0xb8,0x9d,0x15,0x51,0xd1,0x5a,0x01,0x3c,0x32, - 0x0b,0x31,0xac,0xde,0x01,0x0d,0x52,0x58,0xb2,0xc7,0x04,0x2f,0x7e,0xed,0x06,0xaf, - 0xef,0xfa,0xe2,0x6d,0x11,0x2c,0x18,0x70,0x31,0x76,0x28,0x3e,0xf7,0xee,0x21,0x79, - 0x66,0xfa,0x3e,0x33,0x1d,0x6b,0x03,0xc5,0x71,0xba,0xd6,0x2c,0xce,0xc0,0xe5,0xdb, - 0x8c,0xfb,0x3f,0x31,0xbd,0xa1,0x52,0x6c,0xef,0x73,0x8a,0x7f,0x2a,0x67,0xde,0xde, - 0x73,0x16,0x88,0xc8,0x1e,0x0d,0x04,0xdf,0xcd,0xc9,0xac,0x0c,0x35,0x6e,0x5f,0xcf, - 0xf2,0x67,0x4f,0xdc,0xe2,0xc0,0xc8,0x98,0xe8,0x73,0x77,0x5e,0xb4,0x41,0x94,0xdf, - 0xdb,0x75,0xd5,0x62,0xff,0x69,0x65,0x19,0x24,0x3e,0x85,0xcf,0xf6,0xb7,0x90,0xfd, - 0x87,0xd2,0x08,0x14,0x68,0xba,0xa3,0x51,0xe0,0x7d,0x53,0x66,0x24,0x54,0x98,0xf0, - 0xda,0xd3,0x13,0x12,0x49,0x5d,0x04,0x48,0xc9,0xdc,0xe3,0xb7,0x89,0x4b,0x2a,0x3d, - 0x05,0x4d,0x25,0x86,0xb8,0xf3,0xa6,0x1f,0x0f,0xb6,0x78,0x47,0x15,0x8d,0x22,0x2d, - 0xa3,0xe8,0x6d,0xaa,0xc6,0x4c,0x42,0x37,0xbc,0x04,0x7d,0xcb,0x34,0x53,0xe7,0x1f, - 0xc7,0x65,0x9a,0x67,0xd7,0xbb,0x1c,0x80,0x91,0x96,0x34,0x1e,0xf3,0x09,0x68,0x21, - 0x4c,0xd7,0x97,0x2d,0x08,0xb1,0x62,0x8d,0xc4,0xb0,0xe9,0x14,0x53,0xf3,0x1b,0x37, - 0x53,0x15,0x56,0x63,0x4a,0xd5,0xf6,0x3e,0x64,0xd2,0x8f,0xf7,0x74,0xd2,0xf6,0xd7, - 0xa1,0x66,0x14,0x53,0xf1,0x34,0x45,0xce,0x6a,0x71,0x75,0x8f,0x16,0xf8,0xf8,0xcd, - 0xd9,0x1e,0xff,0x46,0x3a,0x48,0x68,0x48,0x68,0x75,0xea,0xac,0xa5,0x5c,0x7e,0xb4, - 0x07,0xac,0x6e,0x83,0x0c,0xb9,0x05,0x58,0xc1,0x64,0x52,0x2d,0x62,0xf3,0xa7,0x4b, - 0xfa,0xef,0xef,0x0d,0x02,0x97,0x22,0x2f,0xb0,0xec,0x7e,0x4f,0x15,0xf1,0xff,0x1f, - 0xf5,0x13,0xaf,0x9f,0xbd,0xbd,0x47,0x94,0xcf,0x8e,0xaa,0xcc,0xee,0xf2,0x3b,0x35, - 0xac,0xab,0xce,0xac,0xc3,0xb0,0xe1,0x08,0xc2,0x71,0x96,0xaa,0x47,0xbe,0xc2,0x5e, - 0x7b,0xb2,0xba,0x5a,0x75,0x68,0xca,0x18,0xed,0xd9,0x76,0xfd,0xde,0x77,0x6a,0x4f, - 0xd2,0x27,0xdf,0xf1,0x9c,0x4b,0xa3,0x09,0x07,0x9d,0xbf,0xf8,0x5d,0xf8,0x27,0xd7, - 0xa9,0x6e,0x87,0xbd,0x40,0xb1,0xa6,0x7f,0xa9,0x8e,0x80,0x1d,0x7d,0xfc,0xb5,0x62, - 0x43,0xf7,0x37,0x86,0x15,0xe2,0x14,0xc2,0xc2,0x43,0xf6,0x46,0xab,0xff,0x52,0x50, - 0xa2,0x64,0x0a,0x96,0x14,0x11,0x48,0x99,0xe2,0x47,0xb0,0x56,0xac,0x6d,0x79,0x83, - 0x85,0x0b,0xb9,0xfa,0xb2,0x2f,0x17,0x53,0x63,0x44,0x51,0x3c,0x13,0xbf,0x53,0x14, - 0x22,0x05,0x49,0xd5,0x6d,0xde,0x49,0xa8,0x62,0x45,0xa1,0x0b,0xfb,0x96,0x92,0xb3, - 0x64,0xd9,0x55,0xc4,0x14,0x6d,0x0f,0xee,0xab,0x1d,0xe8,0x97,0x6e,0xd1,0x4e,0xf0, - 0xab,0x2f,0x98,0xc1,0x0b,0x3e,0xa4,0xf4,0x34,0x38,0x16,0x98,0xb2,0x9a,0x17,0xf0, - 0x69,0xa5,0xad,0xc1,0x81,0x26,0xbd,0xf3,0xd6,0x4e,0xc4,0x5a,0xe2,0x24,0xa5,0xd5, - 0xb5,0xd2,0xaf,0x23,0xb2,0x67,0x67,0x0c,0xe1,0xca,0x66,0x32,0x19,0x2d,0x8a,0xc4, - 0xe9,0x07,0x2e,0x89,0x3a,0x25,0x42,0x25,0xeb,0x4e,0x42,0x63,0xa5,0x14,0x6a,0x5c, - 0x89,0x04,0x4a,0xdc,0xe5,0x68,0x16,0x56,0xe8,0xc3,0xa2,0xc3,0xda,0x64,0x63,0x4d, - 0xcf,0x05,0x01,0x8f,0x9d,0x9a,0x43,0x1c,0x6b,0x4c,0x53,0x80,0xc0,0x64,0x41,0xe4, - 0x2a,0x6e,0xa4,0x62,0x40,0xa6,0x64,0xdb,0x4b,0x63,0x60,0xb9,0xa0,0x78,0x0a,0x50, - 0x0c,0x5f,0xee,0xa5,0x9a,0x7d,0x57,0xc8,0x4a,0x8c,0x9a,0xc0,0x39,0x9e,0x20,0xa4, - 0xaf,0x4d,0x8b,0x5c,0xe6,0x26,0x47,0x78,0x4d,0xb6,0xe2,0x0d,0x6b,0x66,0x24,0xb1, - 0x22,0xf5,0x03,0xb9,0x1d,0x6c,0x93,0x05,0xec,0x0c,0x44,0xe9,0xaa,0x79,0xd4,0xa3, - 0x7f,0xac,0xc5,0xdf,0x2d,0x56,0x9f,0xfd,0xae,0x53,0xc8,0xf9,0xab,0x63,0x3c,0x50, - 0x9f,0x1f,0x7b,0xf7,0x5e,0x72,0x6c,0x22,0x65,0x70,0xac,0x5a,0xdc,0x7d,0x6c,0xd4, - 0x41,0x9c,0xeb,0x6c,0x95,0x73,0x94,0xa1,0x67,0x5b,0x48,0x08,0x86,0xea,0x3d,0x51, - 0x5b,0x1d,0x54,0x5d,0xb6,0x61,0xd5,0x61,0x6e,0x54,0x83,0x15,0x0f,0xdf,0x75,0xb6, - 0x02,0x15,0x12,0x6f,0x50,0x9c,0xf9,0x33,0xe4,0x63,0x9d,0x4c,0xf5,0x31,0xeb,0x3e, - 0x24,0x67,0xde,0x2c,0x0a,0x79,0xe6,0x64,0x67,0xc9,0x8e,0x02,0x1a,0x65,0x1a,0x54, - 0x56,0x91,0x5b,0x32,0x96,0x5b,0x15,0xf6,0x8a,0xac,0xa4,0xe9,0xf3,0x79,0xc5,0xfa, - 0xc4,0x83,0x3a,0x2d,0xb4,0x7b,0x95,0x28,0xee,0x14,0x15,0xdd,0x34,0xf4,0xdd,0x53, - 0x23,0xb2,0xaf,0xa5,0xb2,0xd7,0x0d,0x93,0xab,0x3d,0x87,0x13,0x9b,0x66,0x0e,0xaf, - 0x68,0x17,0xd6,0xff,0x1a,0x54,0xd6,0x68,0xe6,0x5e,0x95,0x46,0xf5,0x05,0x76,0x1a, - 0x20,0x5d,0xa2,0x84,0x3f,0x6a,0xfa,0x45,0x08,0x1b,0xf6,0xba,0xfa,0x1d,0x67,0xcd, - 0x9d,0x97,0xe1,0x54,0xb9,0x7a,0x9f,0xb0,0xee,0x50,0x70,0x52,0x4d,0xac,0x37,0xc9, - 0xad,0x14,0x3c,0x61,0xb9,0x96,0x44,0xba,0x6b,0x13,0xe7,0x9a,0x04,0x74,0x7e,0x20, - 0x3c,0x53,0x7e,0xfc,0xe8,0x73,0xc9,0x16,0xea,0xee,0x16,0xd4,0xbc,0x12,0x99,0x3e, - 0x0b,0xde,0x57,0xbc,0x3f,0x11,0x9e,0x6c,0xd2,0xf4,0x69,0xd4,0x7d,0x5c,0xff,0x29, - 0xa6,0x95,0x99,0xbd,0xb2,0x93,0x07,0x7c,0xfc,0x32,0xb5,0xec,0xfb,0xde,0xcd,0x31, - 0xbd,0x52,0x92,0x59,0xc0,0x69,0x93,0x73,0xe8,0xcf,0xe5,0x0d,0x5c,0xde,0x18,0xd2, - 0xf3,0x8f,0xde,0xb7,0xff,0x63,0x0d,0xa6,0x47,0xb4,0x13,0x83,0x88,0x63,0x62,0xfd, - 0xa6,0x8c,0x9a,0x05,0xb6,0x42,0x00,0xe2,0xbe,0xce,0x1c,0x74,0xd1,0xec,0x41,0x43, - 0x82,0x8f,0x9e,0x14,0xcf,0xad,0x49,0xa1,0xc1,0x82,0x71,0x8b,0xe8,0xee,0x63,0xe8, - 0x26,0xe6,0xd7,0xbf,0xfe,0xac,0x59,0x77,0x81,0xce,0x40,0x10,0x74,0x9c,0xd7,0xf6, - 0xfe,0x3e,0xd8,0x77,0x77,0xab,0xb0,0xf6,0x0d,0x86,0xc8,0x9c,0xfa,0xe9,0x11,0x4c, - 0x6d,0x71,0x17,0xd4,0xa1,0xdc,0xc0,0xd2,0xae,0xa5,0xee,0x5b,0xe8,0xf7,0x3a,0x43, - 0x80,0x16,0x81,0xec,0x42,0xab,0xec,0xed,0xf5,0x94,0x8e,0x8f,0x8d,0xab,0xbb,0x20, - 0xb5,0x26,0xd1,0x90,0x49,0xaf,0xb9,0xaf,0x4d,0x6a,0x41,0xc6,0xe3,0xb8,0x1a,0xda, - 0xf2,0x87,0x22,0x75,0x1a,0xfb,0x78,0xd1,0xef,0xce,0xec,0xcc,0x58,0x45,0x4a,0x5a, - 0x0b,0x84,0x1e,0x7c,0xf6,0xea,0x45,0xd8,0xcf,0x81,0xc4,0x38,0xb4,0xe6,0x1b,0xdb, - 0x53,0x85,0x3a,0x6d,0x77,0x89,0xbb,0x27,0x6d,0x40,0xe3,0x1d,0xbc,0x64,0x61,0xe5, - 0x2e,0xee,0x95,0xb7,0xf5,0xa6,0xb8,0x59,0x8e,0x74,0xe9,0x1c,0x36,0x8f,0x5a,0xb5, - 0xe7,0x6f,0xe4,0x31,0x3f,0xec,0xed,0x4a,0xef,0xac,0x1e,0x15,0xc0,0x71,0x7b,0xb5, - 0xfa,0x0e,0xec,0xa3,0x17,0xef,0x21,0xad,0x49,0x2f,0x3d,0x43,0x59,0x7c,0xb7,0xb5, - 0x73,0x0f,0x0b,0xda,0xbc,0x4c,0xb3,0x86,0xc3,0x8c,0x12,0x2f,0xd8,0x65,0xd9,0xb5, - 0x52,0xf2,0xf2,0x3b,0x7e,0x00,0x46,0x86,0xff,0x14,0x8a,0x8f,0x20,0xe0,0x44,0xc2, - 0x0a,0x1b,0xf5,0x46,0x64,0xf2,0xf2,0xc0,0x9b,0x5c,0x74,0x0a,0x48,0xfd,0x8c,0xf0, - 0x66,0x2e,0x78,0xb1,0x94,0x1e,0x6c,0xd0,0x21,0xd7,0x50,0x24,0x75,0x2c,0x21,0x61, - 0x26,0xba,0x74,0xba,0x15,0x1d,0xf1,0x26,0xa7,0xb2,0x4e,0x80,0x55,0x0d,0x55,0x11, - 0x87,0xe6,0xff,0x95,0xdf,0xf1,0xb5,0xb2,0xe3,0xd9,0xa7,0xb5,0x37,0xf7,0x2e,0x1d, - 0x81,0xd6,0xc4,0x35,0x12,0x39,0x2d,0xfc,0x83,0xdf,0xe5,0x62,0x06,0x32,0x68,0x32, - 0x23,0xb8,0xfa,0xfe,0x31,0x24,0xfc,0x76,0x56,0x9c,0xed,0x72,0x62,0xc3,0x6d,0x2c, - 0x5b,0x1f,0x9b,0xef,0xd5,0xf9,0xf3,0xa5,0xa8,0x2d,0x87,0xe3,0xbe,0x03,0xf5,0x57, - 0xc0,0x4c,0x0f,0x10,0x75,0x97,0xa2,0xf2,0xe1,0xce,0xfb,0xdf,0x1e,0xe6,0x1e,0xda, - 0x6c,0x97,0x77,0xb3,0x9d,0x67,0x81,0xd5,0xad,0xba,0xbe,0x3a,0x81,0x5e,0x16,0x4a, - 0x92,0x96,0x7b,0x97,0xc9,0x22,0x6e,0xd8,0x29,0xdf,0x05,0xce,0xfd,0xef,0x1f,0xdb, - 0xad,0x95,0x13,0xed,0x03,0xf8,0xf3,0x2e,0xaf,0xfa,0xfb,0x5f,0x7c,0xe5,0x4f,0xdf, - 0x61,0x10,0x18,0x66,0x48,0xd8,0xb7,0xaa,0xeb,0xd1,0xf7,0xb3,0x00,0x5a,0xa6,0xcb, - 0xe1,0xde,0xee,0x22,0xc2,0xad,0xee,0x6e,0x28,0x3a,0x5a,0x7c,0x22,0xf6,0x80,0xa8, - 0xc4,0xc4,0xfb,0x5a,0x4f,0xb1,0xbc,0xa8,0x8e,0x62,0x9e,0xfc,0x3e,0xf0,0xaf,0xef, - 0xa8,0x05,0x27,0xa2,0xe6,0x4a,0xb7,0x96,0xe2,0x9c,0x77,0x8c,0x9b,0xbf,0x7f,0xdb, - 0xbb,0xdd,0xd7,0x2c,0x8b,0xda,0xbf,0x0b,0x2f,0x9d,0xf5,0xef,0x5c,0xbe,0x3a,0xf3, - 0x4f,0x06,0xe1,0x3d,0xfb,0x64,0xf7,0xdf,0xa1,0x96,0xc7,0x57,0x22,0xc6,0x9f,0xf0, - 0x05,0x20,0x2c,0x6b,0xb2,0x91,0x8f,0xc0,0xc1,0x5e,0x4d,0x04,0xc0,0x9e,0x21,0xa7, - 0x21,0xad,0xdb,0x17,0xe2,0x8d,0xea,0x66,0x3d,0xe4,0xc0,0xd6,0xa2,0xcf,0xc9,0xb1, - 0xa5,0x43,0xfe,0x15,0x99,0xb3,0x82,0xbb,0xc2,0xa0,0xa3,0x84,0xe7,0xbc,0x80,0x59, - 0xc1,0xd9,0x2a,0x60,0x79,0xd7,0x45,0xe4,0x1e,0x72,0x75,0x7f,0x39,0x10,0x70,0x6e, - 0x71,0xf0,0x58,0x1a,0xe6,0x79,0x4e,0xd5,0xa8,0x26,0x3b,0x8f,0xb2,0xca,0x69,0x23, - 0x7f,0x0a,0xc1,0x56,0xc9,0x2e,0x69,0x9f,0x6e,0x4b,0x17,0xa3,0x40,0x65,0x1e,0xd5, - 0xc9,0xd2,0x70,0xf0,0x59,0x2a,0xe2,0xc0,0xe5,0xe8,0x3b,0x86,0x1d,0xcc,0x06,0xce, - 0xe9,0xa7,0xa2,0x4b,0x3c,0xb4,0x93,0x2a,0xba,0x38,0x3e,0x53,0x92,0x8b,0x99,0xf2, - 0xac,0x02,0x09,0xf4,0x0e,0x64,0xf6,0xab,0x64,0x41,0x5a,0x4f,0x23,0xe8,0x90,0xf9, - 0x5c,0xab,0x3c,0x57,0x61,0x23,0x33,0x8a,0x21,0xfb,0x28,0xbe,0xbe,0x62,0x8b,0x18, - 0x44,0x86,0xf5,0xa1,0x89,0x66,0x8a,0xc9,0xe2,0xea,0xb2,0xc2,0x38,0xc8,0x2a,0x2a, - 0xf5,0x02,0xbf,0xa6,0x3e,0x21,0x82,0x4c,0x22,0x7d,0xb4,0x64,0xb1,0xea,0x85,0x7c, - 0xe2,0x1c,0x66,0x78,0x94,0x2f,0x6a,0x8b,0xc7,0x40,0x79,0xe2,0x87,0x9b,0x7b,0xb7, - 0x8c,0xde,0x3a,0x6a,0x3b,0x51,0x2d,0x6f,0x2b,0xcd,0x64,0x6b,0x2e,0x0a,0x15,0xbb, - 0x8f,0x8a,0x7c,0x5c,0x16,0x23,0xcb,0x0a,0x90,0x30,0xa5,0xe6,0xb0,0xf9,0x93,0xd7, - 0x26,0xe0,0x46,0x22,0xf8,0x3f,0x83,0x8e,0x89,0xe1,0xea,0x09,0x99,0xe3,0xe0,0x03, - 0x3e,0x1b,0xac,0xcd,0x90,0x53,0x8f,0xc3,0x15,0x3d,0x30,0xc7,0x4f,0xd7,0x4e,0xae, - 0xb7,0x6f,0xd4,0x76,0x8a,0x34,0x6d,0xb0,0xaf,0xf2,0xc7,0x5a,0x1b,0x21,0x00,0xbf, - 0xb2,0x4e,0x49,0x10,0xf2,0x13,0x7f,0xac,0xe2,0x13,0x4b,0xc6,0xc7,0xd5,0x3a,0xc6, - 0x41,0xd1,0x67,0xf2,0xee,0xd1,0x80,0x18,0x62,0x16,0xdc,0xf7,0x80,0x87,0xfb,0xf9, - 0x54,0x15,0xfe,0xd0,0xb6,0x23,0xfb,0x55,0x47,0x58,0x0f,0x63,0x92,0xda,0x96,0x32, - 0x2e,0x57,0x9b,0xf6,0xb6,0x9d,0x56,0x0b,0x36,0x15,0xf3,0x5c,0x34,0xd2,0x73,0x08, - 0x1c,0x4c,0x6c,0xcf,0x2f,0x83,0x26,0xd6,0x42,0x39,0xbb,0x04,0x31,0x37,0xea,0x1b, - 0x33,0x12,0x99,0xec,0x32,0xa5,0x12,0x39,0x89,0xe7,0x44,0x6c,0x3c,0xdc,0xce,0xa5, - 0xfb,0x26,0xf0,0x9a,0xd8,0xba,0x06,0xc2,0xa3,0xa3,0x4b,0xfb,0x90,0x0a,0xd4,0x0d, - 0xd4,0x57,0x91,0xef,0xd8,0x89,0x6c,0xee,0x11,0xfc,0x45,0x01,0x30,0x99,0xe3,0x0a, - 0xd1,0x13,0x7d,0x19,0xf7,0x6c,0x57,0x09,0x8a,0x4a,0xf9,0x08,0x12,0x08,0x46,0x33, - 0x59,0x1c,0x98,0xc3,0x30,0x72,0x34,0xe0,0x9b,0xd5,0x61,0xea,0x8e,0x18,0x58,0xba, - 0xd4,0xc0,0xe8,0x65,0xfd,0x99,0x04,0x2a,0x03,0x6c,0x80,0x67,0x7f,0xd6,0x87,0xd1, - 0x20,0xe3,0xa6,0x6d,0x6c,0x81,0x77,0x7b,0x6a,0x1f,0x74,0x73,0x26,0x88,0x9b,0x27, - 0x56,0x9e,0x1c,0x4a,0x5a,0x90,0x21,0xff,0x0a,0xdc,0xbc,0xf9,0x2f,0xba,0x5e,0x3b, - 0xed,0x51,0xde,0xbb,0x96,0xa4,0xa3,0xc8,0xe1,0x4a,0xe3,0xd8,0xdb,0x4d,0x3a,0xa1, - 0xee,0xc5,0x62,0x70,0xfe,0x72,0x3c,0xb6,0x6e,0xa8,0x5b,0x76,0x11,0x6a,0x37,0x61, - 0xec,0x8f,0x6c,0x05,0xc4,0xb9,0xb6,0xc3,0xe4,0x39,0x64,0xb8,0x3d,0xb1,0x13,0xa3, - 0x63,0x2c,0xa8,0x71,0x7e,0x50,0xf9,0x0e,0x71,0x6e,0x21,0x0f,0x66,0x6e,0x72,0x90, - 0xed,0xc0,0x88,0x58,0x6c,0x50,0xa9,0x62,0x3d,0x4a,0x70,0x78,0xb2,0x10,0x16,0x55, - 0x23,0x5e,0x4c,0x24,0xfc,0x63,0x1e,0x17,0x24,0xc1,0xca,0x72,0xd2,0xf3,0x5f,0xa1, - 0xe4,0x83,0x32,0x5c,0x12,0x32,0xe1,0x10,0x85,0xaa,0x47,0x94,0x3e,0x4d,0x69,0x20, - 0xb5,0x26,0x97,0xc0,0xfc,0x01,0x00,0x57,0x2e,0x84,0x58,0x6d,0x4b,0x53,0x86,0x8e, - 0x70,0x13,0xc2,0x0c,0x4f,0xa5,0x25,0xc8,0x4a,0x39,0x4a,0x69,0xb5,0x9b,0x0d,0xd3, - 0xdd,0x93,0x5a,0x0d,0xbe,0x6a,0x04,0x03,0xc0,0x4f,0xdc,0x86,0x5c,0x79,0x5d,0xc6, - 0x58,0xd0,0xde,0x5d,0x9a,0x68,0x82,0xdb,0x33,0xc5,0xd5,0x96,0x35,0xb9,0xd4,0x68, - 0xc2,0xc9,0xd5,0xaa,0x24,0xe9,0xc4,0xfb,0x89,0x89,0x85,0x86,0xbd,0x14,0x32,0xb5, - 0xfb,0x2f,0xe3,0xbd,0xdc,0x78,0x14,0x93,0xa7,0x57,0xac,0x61,0x52,0xa2,0x52,0xa5, - 0xfa,0xee,0x8d,0xaf,0xcd,0xed,0x2e,0x0a,0xcf,0xdb,0xdc,0xc1,0x5a,0x49,0xb5,0xb5, - 0x73,0x2f,0x00,0x50,0x40,0x01,0x69,0x69,0x7d,0x63,0x92,0xcf,0x08,0x51,0x90,0xab, - 0xbf,0x7e,0x5c,0x59,0x6b,0xcb,0xeb,0x45,0xe9,0x3a,0x08,0x3e,0x17,0x58,0xa4,0x89, - 0x5c,0xd2,0xfd,0x89,0xb4,0x40,0x23,0x51,0xe0,0x5b,0x8a,0x0a,0xbe,0x33,0x76,0x18, - 0x59,0x3e,0x6b,0x65,0xb1,0x3c,0x04,0x52,0x45,0x6c,0xeb,0x25,0x1b,0x5e,0xb2,0xe5, - 0xd2,0x4d,0x9e,0xb6,0x15,0x33,0x00,0x1b,0x0f,0xb6,0xcb,0x0b,0x79,0x5f,0x8d,0x63, - 0x65,0x40,0xff,0x21,0xb3,0x51,0x2b,0xd1,0x1a,0x4e,0xea,0xc4,0x87,0x55,0x75,0x3d, - 0xd3,0x17,0x82,0x37,0xf4,0xf4,0x93,0x11,0xea,0xd9,0x53,0xd1,0x1d,0x51,0x14,0xd6, - 0xc7,0x14,0x4f,0x48,0xeb,0x43,0x1a,0xcf,0x98,0x78,0x54,0x7c,0xe3,0x61,0xd7,0x3d, - 0x82,0x3d,0x52,0xc1,0x42,0xd2,0xe5,0xa4,0x0f,0x67,0x75,0x16,0x16,0xb6,0x07,0x20, - 0x23,0x3a,0xb3,0x4c,0xb3,0x1c,0x6e,0x60,0x93,0x08,0x58,0xec,0x9c,0x83,0x58,0x8d, - 0x8d,0x43,0x57,0x66,0xa4,0xf5,0xe2,0x54,0x0f,0xc9,0x64,0x5d,0x0e,0x2d,0x95,0x00, - 0xda,0x9a,0xd0,0x27,0xb0,0x14,0x8c,0x06,0x86,0xbd,0xf8,0x80,0x89,0x2a,0x27,0xcc, - 0x36,0x65,0xd9,0x37,0xac,0xf7,0xa0,0x58,0x68,0x51,0x66,0x90,0xc2,0xb8,0x91,0x8e, - 0x20,0x16,0xf8,0x0c,0x87,0x14,0x8b,0xd9,0x12,0x50,0x08,0x02,0x0e,0x44,0x1e,0x7a, - 0xf0,0x33,0x85,0xca,0xea,0x79,0xe6,0x88,0x85,0x0d,0x34,0x28,0xec,0xff,0xce,0xc9, - 0x4d,0xf9,0x6e,0x2f,0xdf,0xfd,0xee,0x89,0x5f,0x76,0xe8,0x41,0x94,0xb5,0xc3,0xef, - 0x66,0x3d,0x40,0xf8,0xd5,0x1b,0xc3,0x89,0x05,0x2f,0x14,0x14,0x17,0xb6,0x31,0x39, - 0xab,0x32,0x47,0x55,0x2b,0x2b,0x07,0xff,0x0f,0x5e,0xc1,0xbe,0x95,0x28,0x7e,0x41, - 0xe9,0x08,0x3d,0xe6,0x04,0x7d,0xd0,0x3d,0xda,0x4d,0x10,0x67,0x5e,0xcd,0x36,0xad, - 0x6b,0x96,0xac,0x58,0xa1,0x90,0xff,0xcf,0xb0,0x97,0xa5,0xb0,0x17,0x71,0x57,0xba, - 0x6b,0x0a,0x9b,0x19,0xb1,0x62,0x6a,0x06,0x61,0x2e,0xd8,0xa1,0x9a,0x6f,0x77,0xac, - 0x7d,0x4b,0x3b,0x28,0x81,0xe6,0x36,0x4e,0x18,0xdc,0xd1,0x25,0x29,0x79,0xac,0xd2, - 0x36,0x0c,0x78,0xba,0x02,0x69,0x2b,0x47,0xe3,0xfb,0x56,0xe0,0x0b,0x27,0x12,0xb3, - 0x7f,0x47,0x70,0xcb,0x01,0x68,0x6a,0x40,0xd0,0xea,0xa0,0x67,0x2b,0x21,0xc5,0x33, - 0x69,0x5c,0x3e,0x82,0xa1,0x58,0x0f,0x83,0xc6,0x7b,0x6a,0x87,0x7e,0x9b,0x0f,0x3f, - 0x62,0x08,0x2a,0x15,0x9b,0x66,0xf9,0x02,0x60,0xc4,0xff,0x4d,0x5f,0x25,0xb1,0x49, - 0xf0,0x00,0xd2,0x26,0x6c,0xed,0xd2,0x48,0x2f,0xd5,0xb2,0x35,0x3b,0x51,0xbd,0x3c, - 0xd5,0xb8,0x1a,0x63,0x94,0x8f,0xf6,0xab,0x6b,0xe4,0xc8,0x8b,0xb2,0x0d,0x78,0xcb, - 0x0b,0x4c,0xd7,0x05,0x7c,0x69,0x6b,0x0e,0x31,0x45,0x00,0xde,0x5c,0xe7,0x2c,0x25, - 0x68,0xa4,0x45,0x5d,0x9d,0x07,0x8c,0x49,0x49,0x54,0xa3,0xad,0x22,0xdf,0xbd,0x6b, - 0x10,0xfc,0x2e,0x68,0x97,0x6d,0xb5,0x9b,0xc6,0x41,0xdd,0xc4,0xb3,0x3d,0x1b,0xb0, - 0xd3,0x40,0xdb,0xd8,0x42,0x2a,0x3d,0x83,0xfe,0xdb,0xa2,0x0f,0x63,0x66,0x77,0xc0, - 0xae,0x42,0xf9,0xbe,0xaa,0x83,0xaa,0x4e,0x6b,0x22,0xab,0x4a,0x33,0x1f,0x35,0xf9, - 0xe8,0xf0,0xb0,0x2e,0xab,0x6d,0x74,0x3e,0x15,0xe0,0xe1,0x8d,0xfe,0xce,0x20,0x3c, - 0xdc,0x54,0xba,0x4c,0x36,0x92,0xc4,0x48,0xd2,0x6d,0xd9,0xd7,0x67,0x32,0x36,0x7e, - 0xfc,0x4c,0x48,0xe7,0x2a,0x73,0x46,0x1a,0x59,0xfe,0x0f,0x47,0xf5,0xfc,0x7b,0x30, - 0x7c,0xd1,0xf4,0xc5,0xb4,0x1e,0xed,0x81,0x82,0x53,0xd3,0xc7,0x93,0x0b,0xa2,0x15, - 0x9c,0x99,0xcb,0xf7,0xd2,0x0a,0xbd,0xc3,0x83,0x04,0xcf,0x02,0xf7,0xb1,0x3c,0x70, - 0xb8,0xe1,0x38,0x35,0x0a,0xd4,0x74,0x66,0x8b,0x57,0x14,0xbd,0x21,0xd9,0x9e,0x2c, - 0xfd,0xee,0x33,0x36,0x9f,0x3a,0x27,0xd7,0xc2,0xea,0x49,0x16,0x10,0xbf,0xe5,0x32, - 0xc8,0xe2,0x05,0x9c,0x94,0xbd,0x95,0xa5,0x64,0x5b,0x44,0x07,0x5e,0xdb,0x27,0xea, - 0x81,0x55,0xf3,0xfc,0x90,0xb8,0x66,0xb6,0xed,0x88,0xcb,0xdd,0xf5,0xcf,0x2b,0xf7, - 0xb1,0x25,0x15,0x7f,0xbc,0xb5,0x68,0xaf,0xc9,0xa7,0x94,0x6c,0x38,0xcd,0x8b,0xea, - 0x96,0x5b,0x8c,0x5c,0x3d,0x15,0x7a,0xc7,0x5a,0xd9,0xdc,0x47,0xa1,0x23,0xeb,0x1b, - 0xa4,0x12,0xd5,0x3a,0xbe,0xf8,0xcc,0xa9,0xee,0xca,0x5e,0xaf,0xf4,0x47,0x17,0x6d, - 0x48,0x14,0x4b,0x19,0xf7,0x4a,0xb4,0x9f,0x04,0x39,0x5f,0x28,0xc5,0x44,0x9e,0xbe, - 0xcb,0x23,0x9c,0xfa,0x52,0x2d,0x69,0x6d,0x95,0x30,0x95,0x1c,0x72,0x73,0xb1,0xb3, - 0xa6,0xeb,0x32,0xaf,0x0b,0x7f,0x0a,0x66,0x68,0x1d,0x5a,0x1e,0xfb,0x9f,0x79,0x10, - 0xca,0xc1,0xbe,0xbf,0x1d,0x13,0x69,0x4d,0x34,0xf3,0x17,0xb4,0xfb,0xf5,0x07,0xa9, - 0x63,0xdc,0xc0,0xb1,0x1a,0xe0,0xb7,0x51,0x66,0xe2,0x1f,0xa4,0xfa,0x72,0xb7,0xf1, - 0x26,0x2f,0x62,0xf6,0xbf,0x51,0x0b,0x52,0xc4,0xd6,0xf9,0xd6,0x61,0x31,0x30,0x23, - 0xa4,0x7e,0xf0,0x13,0x49,0xa5,0x1f,0x92,0x76,0x96,0x4e,0xc5,0xd9,0xec,0x75,0xf0, - 0xa2,0x2f,0x61,0x96,0x21,0xaf,0x39,0x2b,0x14,0x33,0xcf,0x21,0x35,0x61,0x17,0xce, - 0xab,0x5c,0x92,0x68,0xfd,0xae,0x04,0xd5,0x48,0x7e,0xc4,0xb3,0x9f,0xee,0x98,0x31, - 0x24,0xe8,0xef,0x72,0xea,0xe0,0x22,0x19,0x90,0x6b,0xe1,0x8c,0xf3,0x5b,0xf8,0x20, - 0xec,0xa6,0xb2,0x32,0x7f,0xb4,0xd4,0x00,0x8d,0x46,0x81,0x0d,0xf0,0x6e,0x07,0x9b, - 0x87,0xa6,0x9f,0x7f,0x4a,0x17,0xa5,0xc3,0x2b,0xb6,0xab,0x51,0xbe,0xf7,0x17,0xf7, - 0x6e,0x3d,0x90,0x31,0xb4,0x96,0x07,0xc3,0x26,0x61,0x82,0x46,0xe7,0xa5,0x9d,0x3a, - 0x8d,0x27,0xb4,0x6c,0xeb,0x29,0x54,0x8e,0xa5,0xeb,0x5e,0x5d,0x47,0xaa,0x54,0xbf, - 0x6e,0x85,0xf8,0xa9,0xf6,0xcd,0x20,0x38,0xdf,0xc3,0x8d,0xf7,0xdd,0x89,0x71,0x75, - 0xee,0x6e,0x3a,0xfc,0x18,0x27,0x29,0x29,0x7f,0x57,0xf5,0x84,0xdd,0x6a,0xbc,0xe8, - 0x09,0x00,0x93,0x9b,0xd7,0xa6,0x3a,0x21,0xe7,0x7f,0x86,0x2f,0x26,0x5f,0x70,0xb4, - 0xb5,0x28,0xc5,0x48,0xce,0xc8,0xa6,0x99,0x60,0x61,0xfd,0x44,0xbf,0xe3,0x12,0x5e, - 0xef,0x0c,0x90,0xbe,0x1b,0x70,0xaa,0x09,0x61,0x6e,0x71,0x00,0xfc,0x88,0x33,0xa9, - 0x6e,0x25,0xdb,0xb1,0x32,0xa3,0x21,0x5a,0xe8,0x61,0xcd,0x47,0xd8,0x56,0x03,0xa8, - 0x0b,0x22,0x91,0xbf,0x9b,0x82,0x2f,0x88,0xe5,0xff,0x44,0x9d,0x36,0xfe,0x90,0x60, - 0xac,0xcf,0x64,0x17,0x95,0x1d,0x9f,0x27,0xf7,0xcf,0x74,0x37,0xd5,0x9e,0xf8,0x95, - 0x4e,0x9e,0xa4,0x92,0xbc,0xd3,0x07,0x12,0x88,0x51,0xc9,0xf6,0x35,0x24,0x03,0x33, - 0x20,0x36,0x6c,0x03,0xfe,0xa5,0x4a,0xf9,0x11,0x4e,0x8b,0x6a,0xf2,0x50,0xad,0xfd, - 0xa3,0x63,0x93,0x5a,0xb3,0x11,0x07,0x5c,0x65,0x83,0x70,0xb5,0xf9,0xce,0xc4,0xd1, - 0x4c,0xf0,0x50,0xa4,0xc9,0x19,0x12,0x46,0x8d,0x57,0x8a,0xcf,0xc9,0xb6,0xac,0xcf, - 0xbd,0x98,0xd4,0x25,0x03,0xd0,0xa8,0x35,0x8e,0x56,0xcb,0xcf,0x87,0x64,0x3b,0x21, - 0xa2,0xab,0xf4,0x43,0xef,0xad,0x4e,0x70,0xcc,0x79,0x39,0x03,0x4a,0xc7,0x96,0xf4, - 0x06,0x68,0xd5,0x24,0x8b,0x03,0x1b,0x96,0x84,0xd3,0x4a,0xda,0x03,0xa6,0x43,0xe8, - 0xdb,0xfd,0x9e,0x7e,0x01,0x69,0x0d,0xca,0x2c,0xa3,0xb4,0x50,0xa8,0x82,0x8e,0x89, - 0x47,0xfd,0x58,0x6d,0xb1,0xb4,0x01,0xf5,0x84,0xa2,0x7d,0xfe,0x71,0x74,0x1f,0x74, - 0x64,0x59,0xd9,0x89,0x5d,0x39,0xc8,0xa9,0xe0,0xa6,0x89,0x67,0x73,0x7c,0x71,0x79, - 0xa9,0xc6,0x6f,0x0b,0xad,0xb1,0xae,0x3f,0xcc,0x02,0xc1,0x77,0x14,0xa1,0x38,0x28, - 0x2a,0xa1,0x46,0xd4,0xb2,0xb1,0x0f,0x9b,0x40,0xca,0x36,0x2b,0x59,0x5c,0xce,0xa9, - 0x8c,0x1e,0xb6,0xda,0x8a,0x32,0x2e,0x52,0x21,0xdc,0x9c,0xe3,0x7c,0xbd,0x55,0xfb, - 0x6d,0x31,0x1e,0xe8,0x1f,0x31,0x7f,0xef,0x69,0xcd,0xe6,0x9c,0xce,0x92,0x88,0x28, - 0x23,0x92,0xb7,0x03,0xd4,0x8e,0xec,0x7f,0xdc,0xc1,0xc3,0x6a,0xdb,0xff,0xa7,0x38, - 0x85,0xe3,0xfe,0x28,0xfb,0x51,0x83,0x34,0xa1,0xef,0x56,0xd5,0x76,0x71,0x5b,0xf8, - 0xff,0x4c,0xf6,0x69,0x33,0xc3,0x0f,0xb4,0x60,0x26,0x39,0xd8,0xff,0xda,0x58,0xae, - 0x25,0x09,0x41,0xcc,0x6f,0xaf,0x06,0xd1,0x73,0xe3,0xcf,0x80,0xe4,0x19,0xf6,0x99, - 0x24,0xbc,0x59,0x97,0x2b,0x97,0x21,0xce,0xe0,0xe1,0x51,0xcd,0x7f,0x98,0x60,0xb3, - 0xa1,0x16,0xc0,0xa9,0x70,0x8f,0x8f,0x93,0x3d,0xcf,0x89,0x05,0xd2,0x36,0x30,0x74, - 0x30,0x01,0x48,0x6b,0x39,0xf0,0x83,0x54,0xc1,0x41,0x27,0x06,0x91,0x65,0xf9,0x31, - 0x02,0xa0,0x92,0xe1,0xf9,0x95,0x55,0xd0,0xb5,0xe9,0x7d,0x17,0x18,0x0f,0xf1,0xaf, - 0x93,0x4a,0x99,0xd1,0xba,0x74,0x53,0x13,0x82,0x46,0x22,0x32,0x3a,0x04,0x9d,0xe8, - 0x2e,0x0e,0xba,0x1c,0xbb,0x23,0x25,0x10,0x4e,0x93,0x40,0xd0,0xf6,0x2a,0x8d,0xe9, - 0xaa,0x49,0xb2,0x0c,0xba,0x32,0xe1,0x47,0xc6,0x9f,0xfa,0x3e,0x83,0x64,0x23,0xcd, - 0x29,0x80,0x01,0x8f,0x22,0xbe,0x5d,0xc1,0x26,0x07,0xdd,0x4b,0x5d,0x5a,0x39,0xe6, - 0x70,0x49,0xed,0x6b,0x62,0xb0,0x53,0x2c,0x20,0xfa,0xe4,0xc5,0xd9,0x07,0xbd,0x0f, - 0xe3,0x86,0xfc,0xe8,0x38,0xc1,0x2a,0x4c,0x22,0x41,0x35,0x12,0x3b,0x68,0xa9,0xa6, - 0x2f,0x6e,0x1e,0xaf,0x35,0xa0,0x60,0xc8,0xd1,0xe2,0xfa,0xf6,0x58,0xcd,0xa4,0xb6, - 0x63,0x64,0x53,0x0a,0x7b,0x88,0x41,0xeb,0x21,0x0a,0xaa,0x1e,0xfc,0xe7,0xb0,0xa9, - 0x08,0xfe,0xad,0xf9,0x70,0x6c,0xff,0x5d,0x36,0x2d,0x82,0xb5,0x7e,0xef,0xc4,0x69, - 0xe8,0x5e,0x1c,0xfd,0xd1,0x9f,0x4d,0xeb,0xc5,0xaf,0x80,0x19,0x43,0xa2,0x54,0x95, - 0x03,0xf2,0x4c,0x6d,0xa7,0x37,0x1e,0xc2,0x73,0x1e,0x94,0xac,0x90,0x3e,0xd3,0x69, - 0x1e,0x5f,0x1c,0x01,0xcb,0xcf,0xf9,0x33,0xa0,0x5a,0x2d,0x62,0x32,0x0a,0x8f,0xb1, - 0xcf,0x73,0x7a,0x77,0x10,0xb4,0x8d,0xce,0xc2,0xf3,0x40,0x1d,0x0a,0x88,0xff,0xb0, - 0xa2,0x02,0x96,0x4e,0x31,0x8e,0x6e,0x08,0xcf,0x1b,0x05,0x91,0x9b,0xf7,0x80,0x36, - 0x33,0xb8,0x33,0xa6,0x51,0xca,0xe3,0xbf,0xf6,0x88,0xa4,0x87,0x28,0xde,0xd5,0x29, - 0x03,0xbb,0xfb,0x1c,0xd2,0xc9,0x54,0x07,0xc6,0x2a,0xad,0xc2,0x1b,0xd5,0x07,0x37, - 0x87,0xcc,0x36,0xaa,0xdb,0x3a,0xf4,0xd5,0x6e,0xfa,0xa5,0xf1,0x13,0xa2,0xc6,0x61, - 0xe0,0xb5,0x02,0x89,0xb7,0x3c,0x4f,0xe3,0x81,0x89,0x0d,0x50,0xd6,0x3a,0x34,0x6b, - 0x5d,0x02,0x4e,0x60,0x84,0x94,0x00,0x84,0x48,0x49,0xeb,0x5e,0xd8,0xff,0x14,0x3b, - 0x57,0x0a,0x83,0xca,0xb9,0x6a,0xef,0x41,0x71,0x17,0x4c,0xc8,0x77,0x7c,0xa1,0x7f, - 0x29,0xc3,0x16,0x5a,0x7b,0x6b,0x25,0x31,0x4e,0x4b,0x41,0x3f,0x43,0x86,0x23,0x35, - 0xa9,0x07,0x39,0xb2,0x14,0xe3,0x89,0x7a,0x22,0xf1,0xae,0xdd,0x50,0xd3,0x31,0x50, - 0x8e,0x9e,0x6e,0xaf,0x19,0xee,0x9a,0x03,0xe6,0x46,0xa0,0x5c,0x33,0xbe,0xc3,0xaf, - 0xca,0x5e,0xf9,0x6c,0xc6,0x91,0x8c,0x7b,0xea,0x1f,0x83,0x93,0x90,0x7d,0x4f,0x23, - 0x8f,0xb2,0xb1,0xda,0x1a,0xe0,0xe6,0x9f,0x31,0xd4,0xd3,0x1a,0xdf,0xf2,0x38,0xad, - 0xa5,0x1f,0xa0,0xfa,0x10,0x5b,0x32,0xd1,0x30,0xc4,0x8e,0x0f,0x8e,0x6b,0xd7,0x68, - 0xcf,0x8e,0x44,0x94,0xaf,0x15,0x2f,0x75,0x87,0x41,0xd9,0xf6,0x10,0x8d,0x95,0x61, - 0x09,0x74,0x1a,0x83,0xc4,0xc7,0x34,0x32,0xbc,0x6f,0x91,0xcd,0xbd,0xf3,0xd2,0x97, - 0xfe,0x97,0x91,0x88,0x17,0x94,0x31,0xe4,0x2c,0x12,0x83,0xa4,0xe9,0x9c,0x1e,0x44, - 0x65,0xb2,0x0c,0x35,0x38,0x02,0xb4,0xb2,0x38,0x3b,0x08,0xa1,0xbf,0x47,0xc4,0x21, - 0x44,0x23,0xc8,0xbc,0xfe,0xe6,0x9f,0x56,0x30,0x00,0xe2,0x74,0xe4,0x48,0xb2,0xb0, - 0x0a,0xc7,0xb7,0x34,0xf4,0x2f,0xdd,0x8b,0x23,0x8b,0x97,0xb7,0x3f,0x8c,0x25,0xa3, - 0x07,0x98,0xf3,0x55,0x05,0xaf,0xa6,0x5b,0xf8,0xc7,0xab,0x07,0x57,0xf1,0x7b,0xb5, - 0xa9,0xca,0x81,0x6c,0xca,0xa0,0x2a,0x3b,0xc3,0x4e,0x88,0xbd,0x68,0xb7,0x9e,0x78, - 0x80,0x7f,0xd2,0x5b,0x60,0xab,0x63,0x70,0xea,0xd9,0x9a,0x52,0xcf,0xe3,0x3b,0x0c, - 0x2d,0x15,0x25,0x7d,0x3f,0xcf,0x31,0x6b,0xd4,0x47,0x1f,0x40,0x06,0x61,0x10,0x85, - 0x8e,0x2b,0x74,0x1f,0xb9,0xe9,0x05,0x07,0x6a,0x8a,0xe9,0x9f,0xc5,0xab,0x7c,0x8f, - 0x9c,0xcd,0x60,0x5d,0x38,0x2f,0xab,0x7e,0xaf,0x73,0xfa,0x63,0x96,0x6f,0x11,0x1d, - 0xf2,0x3b,0xd4,0xef,0xd5,0x87,0x68,0xa8,0xb0,0x10,0xa3,0x65,0xb6,0x2e,0x1c,0x39, - 0x4c,0x8e,0xc5,0xea,0xf4,0xc2,0xe3,0xce,0x39,0x33,0x3f,0x7c,0xb4,0x64,0x50,0x2b, - 0x0f,0x90,0xb1,0x5d,0x2c,0x06,0x29,0xe4,0x38,0x8e,0x03,0x0c,0xb9,0xad,0x1a,0xba, - 0xc6,0x4f,0xac,0xed,0x32,0x79,0x6e,0xb6,0xc3,0x91,0x8c,0x34,0x7c,0xf8,0x75,0x3d, - 0x80,0x9a,0xf2,0x32,0x05,0x1a,0x82,0xb7,0xc0,0x51,0x9c,0xa3,0x0a,0xf1,0xe4,0x72, - 0xd0,0x32,0x8c,0xa7,0xac,0x80,0x6c,0xe9,0x41,0xd3,0xb3,0xe2,0x89,0xf0,0x21,0x7b, - 0x68,0xde,0x79,0xbb,0x8a,0x6a,0xc5,0x5b,0x74,0x9e,0x66,0x33,0xf3,0xda,0x2b,0x33, - 0x85,0xd4,0x50,0xa4,0xc9,0x10,0x54,0xc6,0x8f,0xa7,0xad,0xcb,0xd1,0xf7,0x84,0xfa, - 0xa0,0x44,0x48,0xb4,0xc4,0xd0,0x2f,0x77,0xd8,0x94,0x66,0x94,0xfa,0x73,0x57,0xfd, - 0x05,0xd7,0xb1,0xc1,0x7e,0xb5,0xd9,0x66,0x51,0x7b,0xb1,0xff,0x74,0x81,0x57,0x3b, - 0x71,0x58,0xd5,0xea,0x5c,0xd4,0xde,0x53,0x3b,0xf4,0xbb,0xb7,0xfb,0x7c,0x30,0xfa, - 0x8b,0xd5,0x7f,0x29,0x47,0xea,0xc9,0x6d,0xae,0x98,0x82,0x53,0x7c,0xb9,0x78,0xdc, - 0x47,0x14,0x75,0x38,0x3b,0x13,0x1e,0x5c,0x49,0x54,0x45,0x56,0xf5,0x95,0x8b,0x19, - 0xee,0x92,0xfc,0x28,0xc3,0x65,0x3f,0xbb,0x11,0x52,0x48,0xdd,0x3e,0xfa,0xd7,0x99, - 0xd1,0x30,0x17,0x59,0xa5,0xbf,0x41,0x93,0x06,0xea,0x07,0x20,0x08,0x72,0xf6,0xb4, - 0x89,0x8c,0xdd,0x72,0xd5,0xff,0x4c,0x19,0x08,0x71,0xf2,0x08,0x5c,0xae,0xd5,0x3c, - 0x3f,0x60,0x72,0x2e,0xbf,0x14,0x76,0xfe,0x46,0x03,0x9c,0xee,0x7c,0x3d,0xd8,0x2d, - 0x9d,0x80,0x0b,0xbc,0x90,0x18,0xa5,0xac,0x24,0x44,0x68,0x9c,0xcf,0x90,0x97,0xff, - 0x4e,0x3e,0x3f,0x55,0xbe,0x3f,0x41,0x22,0x14,0x44,0xc1,0x97,0x9f,0x40,0x20,0x08, - 0xe9,0x19,0xf8,0xec,0x78,0x6d,0xa8,0xde,0xa9,0x03,0xa8,0xde,0xfc,0x6d,0xcc,0x00, - 0x69,0x0c,0x60,0x14,0x94,0x61,0x42,0x44,0x29,0x02,0x63,0x4b,0x62,0x21,0x13,0xfa, - 0x7f,0x6e,0xe1,0xa5,0xcc,0x2d,0xbd,0xbf,0xc3,0xea,0x76,0xda,0x21,0xb4,0x1f,0x73, - 0xe1,0xff,0xb3,0xfd,0xcb,0x6c,0x67,0x37,0x20,0xc0,0x32,0x72,0xdf,0xbf,0x78,0x10, - 0x12,0x0b,0xc6,0xac,0x2a,0x69,0x90,0x98,0xca,0x06,0x73,0xc1,0x8e,0xe7,0x28,0xf0, - 0x1f,0x08,0xee,0x7c,0xb0,0xa0,0x26,0xf2,0x61,0x04,0x65,0x33,0x5d,0xe7,0xf5,0xb1, - 0xde,0x09,0xbf,0x6d,0x7b,0x7f,0x8a,0x92,0xc4,0xa7,0xf2,0xd4,0x0a,0xa5,0x03,0xb3, - 0x20,0x01,0x36,0xbd,0xdf,0x68,0x63,0x93,0x41,0x4f,0xa7,0xc0,0x32,0xc8,0x7c,0x0e, - 0xe9,0x8b,0xe2,0x48,0x5f,0xa3,0xe7,0xdb,0xc4,0x45,0x56,0xe6,0xe3,0x97,0x8d,0x58, - 0xd5,0x2a,0x43,0xfe,0x9b,0x61,0x52,0xbd,0xa0,0xea,0xe2,0x1b,0xa4,0x66,0x1e,0xfa, - 0x04,0x48,0x07,0xef,0x1a,0x62,0x6d,0x98,0x45,0xbc,0xf3,0x6d,0x3a,0xb7,0xa8,0xb9, - 0x51,0xfa,0x93,0xed,0xe6,0x24,0x01,0x3c,0x3e,0xfe,0xfb,0x7d,0x37,0xe0,0x12,0xc9, - 0x69,0xbe,0x9b,0xc8,0xbf,0xdd,0x5b,0x78,0xe9,0xc1,0x07,0x9f,0x6c,0xc3,0x72,0x88, - 0xfc,0x02,0xb4,0x2c,0xbe,0x43,0x60,0x87,0x4f,0x96,0x0c,0x12,0xd6,0x1b,0x3b,0xcb, - 0x8f,0x64,0x3b,0x3f,0x71,0x77,0xac,0xed,0xbd,0xcb,0x86,0x9e,0xe8,0x3b,0x73,0x89, - 0x70,0x00,0xa9,0x2d,0x9a,0x3d,0x2b,0x3f,0xa5,0xe2,0x93,0x54,0x13,0xac,0xd4,0xb1, - 0x11,0x91,0xfc,0xe6,0x71,0x38,0x6a,0xa6,0x81,0xd3,0xde,0x4b,0xd3,0x76,0x32,0x21, - 0x82,0xe4,0xb4,0xc4,0x39,0x3e,0x64,0xa1,0x47,0x55,0x9e,0x56,0xd0,0xfb,0xd3,0x05, - 0x97,0xab,0xfd,0x07,0xb5,0x16,0xe4,0x52,0x6c,0x8f,0xc5,0x8a,0x51,0xfa,0x59,0xaf, - 0x83,0xa6,0xed,0xd1,0x31,0x3e,0x69,0x95,0xc1,0x13,0x60,0x57,0x73,0x70,0x0e,0x1f, - 0x81,0x12,0xbc,0x40,0x09,0x7b,0x72,0x80,0x23,0xef,0x82,0x4c,0x99,0x67,0xf8,0x32, - 0xa1,0x5d,0x88,0xa6,0x00,0x95,0xc1,0x7e,0x14,0x90,0x0e,0xc4,0x77,0x8a,0xcd,0xa1, - 0x43,0x19,0x8d,0xc0,0x90,0xb7,0x7d,0x19,0x2e,0x14,0x54,0xe7,0x75,0xdb,0x86,0xc1, - 0x00,0x72,0x35,0x3d,0x69,0xfa,0x82,0xd9,0xe5,0x1f,0xe7,0x44,0x99,0xa8,0x91,0xb2, - 0x5c,0x03,0x8c,0x8e,0x9b,0x23,0x96,0x8b,0x86,0xf5,0xd6,0x5c,0x24,0x77,0xa9,0x39, - 0xfd,0x1a,0xd6,0xc0,0xbb,0x31,0xe8,0x18,0x2f,0x7b,0xd4,0x5e,0x38,0x99,0x03,0x0d, - 0xf4,0x5a,0x40,0xeb,0xd9,0x1a,0x8c,0xc9,0xec,0x7f,0xf7,0x0d,0x4c,0x77,0x28,0xa4, - 0x79,0xca,0xa7,0xff,0x4e,0x5e,0x7f,0x06,0x4a,0x56,0xe7,0x3f,0xdb,0xd9,0x7e,0x98, - 0x2e,0x13,0xb9,0x31,0x32,0x7e,0x6d,0x6c,0x51,0x13,0xe5,0x5d,0x82,0xbf,0x4a,0x3a, - 0xa9,0x55,0xee,0x51,0xb9,0x39,0x9b,0x05,0x53,0xe6,0x70,0xef,0x1d,0x39,0x27,0x8d, - 0x9d,0x95,0x9b,0x57,0x5b,0xc1,0x1f,0xcc,0xc8,0x9d,0x0a,0xf5,0xfc,0x95,0x12,0x3b, - 0x29,0x57,0x81,0xbf,0xf8,0xcf,0xca,0x7d,0x99,0x0d,0xf9,0x4c,0x77,0xd2,0x03,0x3e, - 0xe5,0x2f,0x14,0xf6,0xeb,0xaf,0xe4,0x33,0x6a,0x4b,0xb4,0xc4,0xb5,0x5f,0x4e,0x7a, - 0x06,0x92,0xa2,0x17,0xb6,0xa7,0x02,0x82,0xff,0xc5,0x10,0xbb,0x71,0x4c,0xf1,0x70, - 0xa2,0xee,0xc1,0x43,0x9b,0xaf,0x4d,0x1a,0x2f,0x86,0x4e,0xa3,0xff,0x74,0x17,0xb2, - 0xc6,0xa3,0xa5,0x10,0x34,0x2b,0x78,0x40,0xaf,0xaf,0x27,0xd7,0xd9,0xa1,0x00,0x06, - 0x41,0x09,0x58,0x76,0xc4,0xeb,0xe9,0x82,0x01,0xdf,0x50,0x75,0x3c,0x80,0x10,0xd0, - 0x02,0x6e,0xee,0x30,0x57,0xea,0x28,0x72,0x5e,0xc4,0xc0,0x88,0xfb,0xe8,0x19,0xc1, - 0x83,0xdc,0xbf,0x37,0x9e,0xbd,0xb6,0x05,0xe7,0x5e,0x48,0xe3,0x8f,0xb5,0x33,0x7e, - 0x24,0x81,0xf9,0xd2,0x8f,0x2a,0xaf,0x27,0x40,0x24,0x06,0x05,0x24,0x58,0xdd,0x75, - 0x4c,0x27,0xe2,0xec,0x9e,0xa0,0x50,0x07,0x4f,0x6a,0x6e,0x51,0x5a,0x93,0xfa,0x9e, - 0x3a,0x30,0xd2,0x7c,0x5c,0x29,0xc1,0x01,0x2f,0x69,0xda,0x7e,0x53,0xe4,0x75,0xfb, - 0xe2,0x2b,0x67,0x6d,0xdd,0xea,0x0d,0x9a,0xad,0xaa,0xdc,0x69,0xd8,0xab,0x15,0xaa, - 0x2e,0x26,0xd3,0x7d,0xdc,0xaa,0x69,0xcb,0x81,0x7a,0xf1,0xc4,0x7e,0xe6,0x7a,0x77, - 0xaf,0x06,0x1d,0xca,0x6b,0x24,0xb2,0x1e,0xdf,0x82,0xcc,0xc3,0x22,0x43,0x52,0x8a, - 0xbc,0x82,0x2a,0xb7,0xfa,0xa7,0x52,0x96,0xab,0xb6,0x84,0xd2,0xa6,0x4e,0xcd,0x1b, - 0x9e,0x81,0xeb,0x4b,0x19,0xbc,0x77,0x97,0x46,0x35,0x26,0x1c,0xe8,0x3d,0x0b,0xee, - 0xa1,0x82,0xe9,0x3d,0xf7,0x26,0x6a,0x68,0x90,0xa7,0xae,0x8c,0xe5,0x72,0x22,0x26, - 0xa4,0xbc,0x9c,0x79,0xb6,0xb8,0x46,0xa7,0x68,0xbe,0xee,0xa7,0xd7,0xf6,0x7e,0x6e, - 0x9f,0x6a,0x94,0xd1,0xeb,0x0e,0xbc,0x91,0x8b,0x9d,0xc4,0x34,0x57,0x61,0x1f,0x70, - 0x8a,0x3d,0xd7,0xe5,0x47,0xd7,0x15,0xa2,0x69,0xda,0xe5,0x22,0x97,0x12,0x51,0x7e, - 0xd5,0x28,0x96,0x09,0x46,0xdd,0xff,0x5b,0x37,0x1e,0xe7,0xb2,0x56,0xf5,0xbb,0xb0, - 0x85,0x92,0xba,0x24,0x22,0x31,0x2d,0x54,0xc3,0x2b,0x20,0x04,0xda,0x59,0x0c,0x96, - 0xa7,0x98,0x54,0x36,0x6f,0xae,0x26,0xf0,0xd4,0x7c,0xee,0xf3,0x88,0x78,0xed,0x3f, - 0xe6,0x99,0x9b,0xef,0x85,0x44,0x99,0x90,0xd2,0x20,0xa7,0x05,0x1f,0x15,0x27,0x0c, - 0x04,0x91,0xeb,0xb1,0x38,0x11,0x68,0x79,0xe6,0x57,0x29,0xb8,0x0a,0x8b,0xd9,0x0e, - 0x5b,0xf1,0x99,0x1c,0x2c,0x25,0x6e,0xae,0xc4,0xad,0x3e,0x73,0xdd,0x70,0xae,0x67, - 0x67,0x14,0xce,0xde,0xd3,0x34,0x3e,0x2e,0x5e,0x58,0x0b,0xdc,0x3c,0xf1,0xf8,0xa6, - 0x8e,0xb8,0xc5,0x8f,0xbd,0xb9,0x67,0xa6,0xe6,0x98,0xb3,0x4d,0x7e,0xf9,0x51,0x3f, - 0x9e,0xda,0xd7,0x1d,0xbc,0x3c,0x87,0x39,0xcf,0xeb,0xc7,0x3d,0xdf,0x5b,0xb0,0x6f, - 0x8f,0x16,0xf7,0x8e,0x76,0x47,0x9e,0xda,0xee,0x7c,0x0f,0x9c,0xc5,0xe3,0x6a,0x38, - 0x8e,0x15,0xfe,0x4e,0x7f,0x30,0xcc,0x0b,0x5f,0xcc,0xc9,0x57,0x8f,0xee,0x9a,0x29, - 0x0f,0x16,0xe3,0x4b,0xdd,0xff,0xb7,0x12,0x78,0xda,0x40,0x42,0x0a,0xad,0xef,0x39, - 0xd0,0xc0,0xb6,0xce,0x18,0xfe,0x26,0x66,0x4a,0xd4,0x3f,0xe3,0xa0,0xbe,0x3a,0xf3, - 0x34,0xaf,0x2c,0x96,0x1c,0x2a,0xcf,0xdf,0xa9,0x11,0x10,0x26,0x60,0x7b,0x1f,0x92, - 0x04,0x69,0x98,0x28,0x55,0x20,0x1c,0x2d,0xa8,0xd0,0x58,0x70,0xc2,0x23,0x94,0xf2, - 0xf0,0xad,0x82,0xa5,0xe0,0x12,0xbd,0xb3,0xd0,0x4a,0xa5,0x53,0x2f,0x0e,0x31,0xc1, - 0x76,0x0c,0x8f,0x10,0x97,0x89,0xb5,0xa3,0xd1,0x4b,0x11,0x34,0xd2,0x11,0x7e,0xe0, - 0x23,0x17,0xfe,0xe5,0xf1,0x2d,0x86,0x93,0x2c,0x28,0x28,0xe0,0x29,0xed,0x37,0x22, - 0x69,0xa6,0xaa,0x74,0xfa,0x06,0x66,0xc5,0x89,0x76,0x1c,0xf2,0x35,0x64,0x7f,0xf5, - 0xe2,0x46,0x5b,0x82,0x7b,0x65,0x6f,0xc9,0x08,0x15,0xb1,0x67,0x87,0x6b,0x32,0xa0, - 0x8e,0x07,0xab,0x54,0x90,0x5d,0x11,0x65,0xa0,0xb8,0x0b,0x71,0x5b,0xa4,0x62,0x49, - 0xbf,0x05,0x4c,0xcb,0xf1,0xd3,0x92,0x35,0x14,0xe5,0x52,0x68,0x8e,0x2a,0x06,0xf3, - 0xa8,0x81,0xe8,0x1c,0x1a,0x69,0x12,0xb8,0xa0,0xf8,0x36,0x4f,0x2e,0xef,0x49,0xf2, - 0x2b,0x0c,0xe1,0x0c,0x71,0xf1,0x86,0x6e,0x0a,0x5a,0x1b,0x28,0xdb,0x08,0x8b,0xfb, - 0x0b,0x23,0x9f,0x32,0x1e,0x3a,0x79,0x31,0xc8,0xeb,0x9f,0x7d,0x89,0x29,0x64,0xe9, - 0x4b,0x79,0xfc,0xfc,0xd8,0x2d,0x2c,0xdd,0xa1,0x5f,0xb2,0x6e,0xc8,0x61,0x98,0x66, - 0x61,0x4f,0x82,0x9d,0x70,0x22,0xca,0x67,0x3b,0x0f,0xe2,0x94,0xbd,0x22,0x11,0x67, - 0xa4,0xfb,0xfd,0xe8,0x58,0x0e,0xe0,0xdc,0x36,0x5d,0x8a,0xc6,0x7d,0x0b,0xd6,0xd7, - 0x62,0x2c,0x4b,0x2e,0xef,0x29,0xc6,0x60,0x49,0xb9,0xbb,0x7f,0x15,0x62,0x91,0x53, - 0x10,0x6d,0xe5,0xc4,0x70,0x7e,0x6e,0xc0,0x2c,0x56,0x54,0xe0,0xbd,0xdd,0x46,0x6b, - 0x82,0x1c,0xac,0xc4,0x90,0xb9,0x9c,0x52,0x9f,0xae,0xa2,0x6c,0x33,0xde,0x65,0xc0, - 0x1b,0x1f,0xd5,0x87,0xfc,0x34,0x19,0x5a,0x41,0xda,0xda,0x35,0x1b,0x51,0x07,0x90, - 0x02,0x15,0x85,0x77,0x34,0x42,0x99,0x4c,0x1e,0x12,0x4d,0xc6,0xaa,0xd8,0x3c,0xf2, - 0xea,0x1b,0xfb,0x5b,0xc3,0xe2,0x86,0x10,0xc5,0x65,0xb4,0xe6,0xe4,0x79,0x7b,0x29, - 0x76,0x57,0x99,0xfb,0x4f,0x80,0xcf,0xab,0xda,0xe9,0xbc,0x5a,0xc1,0x7a,0x90,0x32, - 0xd0,0x8d,0xcd,0xdc,0x7a,0xe7,0x95,0xd9,0x24,0x5d,0xff,0x35,0xae,0xf6,0xc5,0xb7, - 0xdc,0x99,0x1d,0xef,0x99,0xc2,0xea,0xc8,0xe5,0x8d,0xbd,0xf7,0x65,0x7a,0x0a,0x73, - 0x89,0x92,0x46,0xc8,0xed,0x30,0x28,0x81,0x14,0xa7,0xee,0xa8,0x98,0x09,0x0a,0x7a, - 0x42,0x08,0xde,0xa5,0x09,0x22,0x45,0xbb,0xeb,0x11,0xe5,0xcf,0x5f,0xdd,0x78,0x6b, - 0x09,0x92,0x4f,0xad,0xcc,0x50,0x87,0x54,0x89,0x18,0xe8,0xde,0x5b,0x29,0x8e,0x1d, - 0xb8,0xb5,0xbb,0xeb,0xd2,0x34,0xd9,0xdb,0x16,0xd7,0xd0,0x5f,0x19,0xdf,0x9d,0x57, - 0x2c,0x6f,0xd1,0xce,0x26,0x98,0xc6,0xaf,0x97,0xfa,0x9c,0xf1,0x3a,0x7a,0x1f,0xcb, - 0x45,0x2e,0xf9,0x6c,0xcb,0x5e,0x16,0xec,0xbf,0x7e,0xfe,0x73,0xda,0xf1,0x86,0xd7, - 0xc4,0xea,0xd0,0x64,0x06,0x3d,0x87,0x97,0x20,0x7d,0x26,0x46,0x59,0x78,0x69,0x71, - 0x9d,0x5d,0x78,0xe1,0xbd,0x76,0xf8,0x5d,0x73,0xae,0x95,0xe0,0xbb,0x79,0xdb,0x60, - 0x47,0x3f,0xf9,0x25,0xf1,0x5f,0x6e,0x0b,0x48,0xc4,0x38,0x4e,0x52,0xa8,0x10,0x42, - 0x01,0x8e,0x51,0x1e,0xb0,0xde,0x18,0x23,0x3a,0x3e,0x5b,0xc2,0x5d,0x8d,0x59,0x81, - 0x8d,0x3d,0xde,0xef,0x2d,0xef,0xb0,0x51,0x2f,0xf3,0x10,0x25,0x94,0xf9,0x77,0x3b, - 0x91,0xc1,0xce,0xe7,0x15,0xbc,0x67,0x1a,0x3a,0x3e,0x87,0xcb,0x17,0xc3,0xa0,0x06, - 0x2f,0x25,0xd0,0x47,0x10,0x35,0x1a,0x00,0xad,0x75,0xba,0x7b,0x46,0xab,0x3e,0xf7, - 0xec,0xe6,0xd6,0xf7,0x61,0x7a,0x22,0x8d,0xac,0xe6,0xa6,0x94,0x43,0x60,0x33,0xb0, - 0xe4,0x5b,0xd2,0x76,0xb0,0x59,0xc5,0x01,0x2d,0x17,0xc9,0x35,0x95,0x16,0xa9,0x17, - 0xd8,0x26,0xb7,0xb5,0x93,0x0a,0x07,0xd7,0x2c,0xa4,0xa0,0xd8,0x70,0xe1,0x2b,0xd9, - 0x2c,0x85,0x1b,0x7e,0x9c,0xbe,0x28,0x2e,0x6d,0xa8,0xba,0x3f,0x6f,0x3e,0x00,0x9f, - 0x4e,0x69,0x6e,0xe1,0x92,0xd4,0x36,0xd1,0xec,0x41,0x2b,0xba,0x58,0xbc,0xa3,0x1a, - 0xb8,0x77,0xeb,0x83,0x61,0xc6,0x8c,0xcb,0x80,0xcc,0x09,0x4f,0xd8,0xa4,0x3b,0x79, - 0x89,0x2b,0x4c,0x71,0xfc,0xaf,0xbb,0xd9,0x24,0xfa,0x7b,0xcf,0x1d,0xaa,0xb0,0xb9, - 0x68,0x51,0xf5,0xca,0x6e,0x20,0x0c,0xda,0xaf,0xf3,0xd2,0xf4,0xff,0xf7,0x2c,0xfa, - 0x8f,0x01,0xfc,0xee,0xe4,0x00,0xc2,0x1a,0x3d,0x8f,0xb0,0x9c,0x7c,0x6d,0x35,0xfa, - 0x65,0x2d,0xdb,0xb5,0x32,0xa3,0x29,0x75,0xf6,0xd1,0x84,0x89,0x7b,0x11,0x55,0xfa, - 0x47,0xcc,0x3f,0xe7,0x6c,0xc1,0x6c,0xdb,0x6e,0xc4,0x44,0x2f,0xfe,0xa0,0x74,0xe0, - 0x20,0x30,0x20,0xb4,0xcb,0x1d,0x7e,0xbf,0x40,0x9c,0xcc,0xe3,0x9f,0x78,0x66,0x87, - 0x07,0x9c,0x13,0x13,0xca,0xdf,0x6c,0x74,0x59,0xd7,0x05,0xe8,0x4a,0x7f,0x36,0xfc, - 0x65,0xf0,0xdd,0xc0,0xba,0x6d,0x24,0xe5,0xd0,0x9e,0x1a,0xc8,0x29,0x2e,0xad,0x82, - 0xdd,0x3d,0xf4,0xf9,0x10,0x45,0x1d,0xe3,0x44,0x59,0x64,0x28,0xf3,0x8a,0xec,0xa4, - 0x4e,0x99,0x62,0x36,0x91,0x15,0x5b,0x89,0xbf,0x21,0x05,0x48,0xd5,0xf2,0x1a,0x2a, - 0xdf,0x2e,0xb6,0xd7,0x94,0xf4,0xd0,0x8d,0xad,0x56,0x7b,0xe6,0xf5,0xa2,0x9a,0xad, - 0xa0,0xde,0xf6,0x43,0xce,0xd4,0xe6,0x67,0xb1,0x97,0xd5,0x68,0x57,0x7c,0xe6,0x94, - 0x4e,0x04,0x36,0x69,0xc8,0xbb,0xc6,0x60,0xc9,0xdd,0x08,0x15,0x16,0x08,0x37,0xe5, - 0xae,0xb0,0xe7,0xe8,0xea,0xb0,0xc1,0x48,0x4c,0xba,0x57,0x5f,0x52,0x0e,0x56,0x18, - 0x24,0x26,0x4d,0xe8,0xb0,0x3f,0xa4,0x27,0x6b,0x61,0xe8,0x21,0x16,0x3a,0x5a,0xe9, - 0xef,0x45,0x27,0x8d,0x9e,0xa1,0xb7,0x8a,0x12,0x98,0xe9,0x1f,0x3f,0x51,0x17,0x4b, - 0x5a,0x94,0x2f,0x5f,0xcd,0x70,0x11,0x53,0x4d,0x16,0xd5,0xac,0xdb,0xf8,0x83,0x25, - 0xc7,0xef,0x3b,0xd6,0xdf,0x03,0xf4,0xf4,0x40,0x28,0x49,0x16,0x7e,0x87,0xaf,0xa5, - 0x47,0x8e,0xb8,0x98,0x5d,0xf1,0x0b,0xe7,0xd5,0x70,0xc5,0x4e,0xff,0xa2,0x86,0x25, - 0xa8,0xed,0x27,0x33,0x93,0xf2,0x25,0xe0,0xcc,0xee,0xf3,0xdf,0x70,0xc1,0x11,0x73, - 0x5a,0x3c,0x3b,0xad,0x8c,0x28,0xaf,0x09,0xcc,0xbf,0x3f,0xe7,0xcc,0x50,0x93,0xd0, - 0x4c,0x09,0x10,0x77,0x28,0x8b,0x68,0xa2,0xc0,0x91,0x62,0xd7,0xdc,0x21,0x10,0x14, - 0x86,0x82,0xbe,0xe7,0x95,0xac,0x20,0x60,0x45,0x45,0xe1,0x4b,0xf6,0xea,0x87,0x72, - 0xf4,0x8d,0xf9,0x19,0x70,0xa3,0x29,0x71,0xc8,0x4d,0xcb,0x41,0xb8,0x53,0x53,0xfb, - 0xfd,0x41,0xdb,0xa2,0x7a,0x47,0xdd,0x77,0xdb,0x45,0x01,0x04,0xe9,0x7c,0x08,0x90, - 0xeb,0x27,0x25,0xcc,0xb7,0x72,0xa8,0x44,0x35,0xb2,0xf0,0x34,0xf3,0xec,0x18,0xd4, - 0x06,0xa2,0x70,0xab,0x03,0x68,0x3c,0x8c,0x9d,0xbe,0x70,0x74,0x55,0x7d,0x57,0x23, - 0x7d,0xab,0xc9,0x5c,0xa1,0xb8,0x8e,0xb3,0xc4,0x3d,0x51,0x87,0x57,0xd6,0x77,0x6c, - 0x3c,0x5c,0x90,0x22,0x4e,0x68,0x33,0xf5,0xda,0x4b,0xd9,0x0a,0x30,0x6e,0x1a,0xaf, - 0xe1,0xd9,0xbc,0xa8,0x73,0x27,0x32,0x79,0xe9,0xc2,0x2a,0x08,0xa5,0xc9,0xe4,0x38, - 0x6b,0x89,0xd0,0xc8,0x71,0x38,0x89,0x5a,0x0a,0x96,0x22,0xc6,0x49,0x24,0x7b,0x14, - 0x76,0x8a,0x03,0x09,0xc4,0x1c,0x6c,0xcb,0x4a,0x4e,0xab,0x1d,0x21,0x75,0x31,0xf1, - 0x67,0x44,0xf5,0x1b,0x78,0xa8,0x63,0x5b,0x8a,0xf4,0xe4,0x43,0xb1,0x66,0x42,0xb1, - 0xfa,0x97,0xc3,0x33,0xbd,0x6e,0x0b,0xa6,0xbf,0x03,0xaf,0xee,0xd2,0x34,0x74,0x64, - 0x0d,0x45,0x93,0x8b,0xbe,0xac,0xaf,0x13,0xea,0x21,0xd0,0x1e,0x1a,0x4d,0x76,0xcd, - 0xb4,0x5c,0xda,0xee,0x99,0xfc,0x52,0x16,0x6d,0x48,0x6c,0x8f,0x58,0x6a,0xab,0x27, - 0x28,0x6a,0xcf,0xbb,0x89,0x62,0x39,0xf9,0xc8,0x6c,0xa3,0x7f,0x83,0x69,0x30,0x80, - 0xa2,0x88,0xde,0x89,0x58,0x21,0x74,0x0b,0x35,0x8d,0x34,0xb7,0x04,0x14,0x28,0x5c, - 0xa9,0xab,0x79,0x67,0xbd,0x70,0x7c,0xb2,0x3f,0xda,0xe2,0x15,0x42,0x4c,0x0c,0xb0, - 0x01,0x79,0xfb,0x83,0x51,0xb1,0x6d,0x86,0x1d,0x5d,0x05,0xd7,0x1b,0x71,0x29,0x48, - 0x29,0x1a,0xb3,0xbc,0xd9,0x3e,0x17,0x53,0xd2,0x32,0x65,0xbd,0x56,0xa8,0x7a,0x64, - 0x85,0x04,0xc6,0x40,0x0d,0x84,0xc3,0x1f,0xd7,0x87,0x14,0x1d,0xe4,0xd9,0xdb,0xe1, - 0x09,0xba,0xc8,0x36,0xb1,0x31,0x67,0x58,0x90,0x53,0xd4,0x13,0x75,0xae,0x7b,0x64, - 0x05,0xbb,0xa5,0x85,0x1c,0xbd,0xae,0x9a,0xd8,0xe9,0x4c,0xa2,0x30,0x26,0x19,0xa3, - 0xc9,0x14,0x0a,0xb7,0x51,0xbf,0xa8,0x9f,0xe7,0xa7,0x60,0x55,0xf3,0x95,0x22,0xe4, - 0xa0,0xa1,0x94,0x00,0xd3,0x7c,0x4c,0x79,0xcf,0x14,0xf3,0x51,0xfa,0x03,0x2a,0xb2, - 0xae,0x9b,0x2a,0xb8,0xd0,0x08,0x6e,0xfe,0x71,0x42,0xc4,0xae,0x0a,0x4f,0x23,0x7d, - 0x20,0xae,0xbd,0x3d,0x06,0x95,0xd7,0xdb,0xee,0xb8,0x9f,0x43,0x03,0x38,0x9f,0xdf, - 0xeb,0x5a,0x99,0xff,0xd9,0x28,0x0b,0x5f,0x6b,0x6c,0xc0,0x7f,0xca,0x3b,0x38,0x68, - 0x62,0xcd,0x40,0x24,0x16,0x71,0x1d,0x6a,0xd4,0x01,0xc6,0xf9,0x3a,0xd1,0x91,0x5a, - 0xd3,0x87,0xae,0x9d,0xce,0x30,0x21,0xdf,0xca,0x82,0x83,0x8a,0x7a,0x0d,0x67,0xfa, - 0xdd,0x28,0xdd,0x1c,0x9b,0xd6,0x6f,0x13,0x46,0x53,0x99,0x0d,0xf8,0x3c,0x14,0xd9, - 0xad,0x74,0x85,0x26,0x18,0x39,0xeb,0x9b,0x14,0x44,0x1f,0x91,0xdd,0x3d,0x66,0xda, - 0xed,0x1a,0x55,0xf5,0x98,0xe1,0x48,0x40,0xa7,0xc6,0xa2,0x5d,0xe7,0xa1,0x3a,0x3a, - 0xee,0xc5,0x2b,0x24,0x75,0x4a,0x58,0x30,0x00,0xcc,0xc6,0x30,0xb4,0x62,0x07,0xda, - 0x27,0x07,0x9f,0x2e,0xff,0xad,0x11,0x1e,0x67,0x83,0xeb,0xdd,0xbc,0xd3,0x73,0x38, - 0xef,0x8c,0xd7,0x11,0x74,0x20,0x23,0x3b,0xe6,0xc9,0x48,0xc4,0x59,0xa2,0xdf,0xa0, - 0xef,0x75,0xb2,0x46,0xb1,0xc8,0x48,0x72,0xe5,0xa1,0xd0,0xfb,0xf7,0x63,0xb8,0xa3, - 0x79,0x96,0xa9,0x30,0xd5,0xa5,0x05,0x55,0xe6,0x9a,0xf7,0xf2,0x34,0x8f,0x1e,0xbb, - 0x86,0xfd,0xe0,0x21,0x54,0xc6,0x49,0x89,0x6a,0xcb,0xfb,0x73,0xd0,0x25,0xb6,0x69, - 0xf0,0xb2,0xe1,0x4b,0xa4,0xa2,0xcd,0x11,0x78,0xda,0x39,0x86,0x5c,0xa5,0x95,0x0c, - 0xe7,0xd3,0xd3,0x2a,0x56,0x99,0x52,0x28,0x4d,0x43,0xec,0xcc,0x08,0x6d,0x0a,0x5a, - 0xac,0x0e,0x94,0x37,0x76,0xa6,0x1a,0x6e,0x4b,0x0b,0x80,0x8e,0xb3,0x5c,0x84,0xe6, - 0xa8,0x8c,0x84,0x09,0x4c,0xce,0xcc,0xc9,0x2d,0xcc,0xa1,0x1c,0x37,0xae,0x2e,0x1b, - 0x8c,0xcb,0x2b,0x1b,0xc1,0x9d,0x1c,0xbf,0xe2,0x59,0x1b,0x1b,0x15,0x1a,0xa2,0x37, - 0xf8,0xe0,0x38,0x5a,0x9b,0x0f,0x5a,0x08,0x7d,0x92,0xe9,0x5a,0x21,0xcc,0xbe,0x29, - 0x29,0xcf,0x00,0xb8,0x0f,0xe2,0x85,0x08,0xbc,0x72,0xa1,0xa9,0xbe,0x42,0x3a,0x25, - 0x2b,0x28,0xc3,0x4f,0x7f,0xb5,0xcb,0x95,0xde,0x83,0x33,0x13,0x9f,0xac,0x67,0xa4, - 0x8c,0x6f,0x7b,0xa2,0x9f,0x74,0x13,0x19,0x7c,0xb2,0x62,0x5f,0xdf,0xbf,0x1e,0x7d, - 0x22,0x6b,0xda,0x80,0xd5,0x33,0x17,0x40,0xc8,0xdf,0x0c,0x55,0x79,0xe0,0xf3,0x9b, - 0x21,0x8a,0x92,0xbe,0x5d,0xbc,0xa1,0x50,0xe7,0x86,0xd6,0x5a,0xab,0x0a,0xb1,0xf1, - 0x5b,0xd2,0x50,0x74,0x38,0xf3,0x9d,0x36,0x66,0x85,0x0d,0x54,0xb5,0x89,0xbf,0x6a, - 0xa5,0x08,0xbf,0x0a,0x5e,0xf7,0x21,0x43,0xe1,0xdc,0xd7,0x4b,0x2b,0xb1,0x27,0xdd, - 0x48,0x40,0xe8,0xbd,0x97,0x3c,0x76,0x66,0x3a,0x94,0xe9,0xe6,0x97,0xf2,0x3e,0xec, - 0x78,0x60,0x2c,0x2e,0xbf,0xf7,0x85,0xfa,0x9a,0x9a,0x27,0xdb,0x71,0x0e,0xb7,0xd8, - 0xcc,0x02,0x65,0x25,0xc9,0xf5,0x2c,0x39,0x13,0x99,0x04,0xc6,0x55,0xb4,0x75,0x57, - 0xa2,0x7b,0x36,0xb8,0x35,0xff,0x80,0x71,0x59,0x8a,0x39,0x73,0xf7,0x37,0x3e,0x77, - 0x24,0xd8,0x9c,0x3e,0xda,0x17,0xf6,0x3f,0x0b,0xde,0x2b,0x20,0x95,0x42,0xc6,0x8b, - 0xaf,0x9d,0xb8,0xfc,0x5d,0x0a,0x46,0x47,0x6d,0x02,0x84,0x4d,0x09,0x54,0xbb,0x7c, - 0x2b,0xa8,0x03,0xab,0x55,0xab,0x13,0xe6,0x8f,0x70,0xa5,0x51,0x17,0x0b,0x21,0xf9, - 0xec,0xdb,0xd1,0x99,0x5c,0x38,0xff,0x3f,0xc4,0xfe,0x2c,0xf8,0x37,0x61,0x5c,0x21, - 0x9d,0x69,0x20,0xac,0xc1,0xd0,0xb6,0xf7,0x5f,0xdc,0x36,0xba,0xa4,0xf8,0xed,0x07, - 0x1c,0x30,0x8e,0x9f,0xc6,0xb0,0x1e,0x55,0xd6,0xd2,0x06,0x16,0x3b,0xb2,0xb1,0xf5, - 0xc8,0xdc,0x23,0xef,0x1f,0xb3,0x77,0xeb,0xee,0x53,0xde,0x9d,0xcd,0x6c,0xd4,0x3d, - 0xbf,0x62,0xa5,0x24,0x1c,0xb9,0x93,0x13,0x5e,0x92,0xa6,0xca,0x58,0xbe,0x60,0x40, - 0x4e,0x0f,0xe2,0x00,0x13,0x02,0x18,0xc2,0xc2,0x48,0xf9,0xcf,0xeb,0xeb,0x02,0x11, - 0xa2,0x07,0xea,0x14,0x93,0x16,0x78,0x74,0x4e,0x4c,0xa7,0x56,0xa2,0xea,0x61,0x45, - 0x08,0x0f,0xe1,0xae,0x0f,0x2f,0xd1,0x43,0xe4,0x4d,0x5c,0x1c,0xd6,0xf3,0x81,0x13, - 0x20,0x8b,0x60,0x77,0x53,0x63,0x53,0xcf,0x62,0x4e,0xb8,0x0c,0x3a,0x27,0x42,0x1f, - 0x82,0x84,0x82,0xa6,0x06,0x20,0x6a,0x88,0xd4,0x8b,0x23,0x99,0xaf,0xc9,0xe3,0x3f, - 0xd6,0xf8,0x64,0xc7,0x27,0x2f,0x06,0x92,0xc3,0xc0,0x25,0xf0,0x3c,0x89,0xee,0x91, - 0x7c,0xfa,0x2c,0x37,0x25,0x7b,0x31,0x63,0x66,0x4b,0x81,0xf5,0xba,0x6b,0x60,0x2f, - 0x12,0x17,0xd3,0xa5,0x50,0x76,0xa6,0xf3,0x79,0xc9,0xe3,0x8a,0x2e,0x0b,0x22,0xea, - 0x8a,0x40,0xca,0x09,0x67,0x88,0x58,0xd3,0x6c,0x45,0xa8,0x9c,0xbe,0x6c,0x6a,0x5c, - 0x1e,0x06,0x92,0x88,0x5b,0x20,0x10,0x3c,0xea,0x08,0x8d,0xe3,0x5f,0xf8,0xc9,0xf9, - 0x84,0x05,0x13,0x62,0xf8,0xf5,0x59,0xd7,0x6b,0x47,0x03,0x5e,0xac,0x28,0x6b,0x5d, - 0xa8,0x80,0x0d,0x8d,0xb8,0x29,0x63,0x5b,0x88,0xcb,0xa8,0xd5,0x95,0xb7,0x62,0x4c, - 0x87,0x6f,0x02,0x74,0xdc,0x87,0x6c,0x8a,0xe9,0x29,0xb4,0xcc,0x59,0x6f,0xf8,0x61, - 0x0d,0x9c,0xce,0xd8,0x6b,0xb8,0xee,0x1a,0x20,0x42,0x76,0xef,0x79,0x67,0x2a,0xb3, - 0x75,0x85,0xbb,0x49,0x18,0x2b,0xec,0x8b,0x48,0x4a,0x6c,0x7d,0x2d,0xb3,0xf3,0x26, - 0x28,0x4a,0x34,0xac,0x38,0x6f,0x4b,0x4b,0x34,0x49,0xc9,0xf9,0x82,0x29,0x1f,0x62, - 0xa2,0x38,0x23,0x25,0xd9,0x13,0xd4,0x34,0xa0,0x12,0x6b,0xcf,0xff,0x86,0x84,0xbd, - 0x63,0x1e,0x08,0x69,0x31,0x70,0xf6,0xce,0xc2,0x34,0x18,0x4a,0x80,0x1f,0xe3,0x91, - 0x03,0x14,0xdc,0x0a,0xd5,0x3b,0xcc,0x93,0x62,0x65,0x9d,0xac,0x45,0xf3,0x9d,0x73, - 0x23,0x3b,0xed,0x23,0xef,0x3e,0xa2,0x53,0x63,0x04,0x7e,0x75,0xa5,0x4e,0x7c,0x20, - 0x26,0x71,0x7c,0xf4,0x91,0xcd,0xd0,0xfc,0x36,0x84,0x3e,0xf9,0xf2,0x28,0x39,0x1a, - 0x40,0x55,0xfa,0x2b,0xda,0x04,0x24,0x18,0xa9,0x88,0x9e,0x07,0x51,0x7e,0x7d,0x21, - 0xba,0x10,0x9d,0xed,0xb4,0xa7,0x35,0x4a,0x36,0xab,0xeb,0x45,0x7f,0x14,0x35,0xf6, - 0x42,0x18,0x0d,0xec,0xb3,0x75,0xa7,0xd5,0x3f,0x66,0xd8,0x1d,0x0e,0x3a,0xa6,0xea, - 0x69,0x58,0x79,0xab,0x99,0x3e,0xd1,0xca,0x9f,0x3d,0x84,0xa9,0x8f,0xe5,0x34,0x7a, - 0xab,0x31,0x3a,0xe3,0x9a,0x3f,0x8e,0x3c,0x5e,0xdc,0x27,0x7b,0xa7,0x71,0x7f,0x0b, - 0xa9,0x79,0x76,0x14,0x65,0x35,0x2f,0x56,0xee,0xb8,0x7b,0x33,0xf9,0x9a,0xaf,0xfb, - 0xea,0xa4,0x7d,0x24,0x18,0xc4,0x7f,0x12,0x7e,0x86,0x1f,0x7b,0x97,0xf0,0x26,0x63, - 0xf9,0x11,0xd5,0x1a,0x3c,0xad,0x0c,0x0e,0x16,0x1e,0x2d,0xe4,0xdf,0x83,0x16,0xd1, - 0xa9,0x2a,0x0e,0xe5,0x5b,0x7f,0x9e,0x95,0x33,0x21,0xc8,0x9e,0x1b,0x80,0x1f,0xcd, - 0x06,0x13,0xf4,0x32,0x53,0x0f,0x44,0x7f,0x01,0x0f,0xf7,0xd0,0x13,0x7d,0x24,0x29, - 0xaf,0x10,0xd8,0xd0,0xd8,0x04,0xe0,0xb6,0x0a,0x00,0xa6,0x9b,0x0c,0x6f,0xff,0xe0, - 0xa8,0x0b,0xb2,0x03,0x37,0x72,0x48,0xa0,0x41,0x41,0x1c,0xa3,0x81,0x82,0x9d,0x70, - 0x46,0x76,0x6a,0x7e,0x6e,0xa1,0x30,0x55,0xe6,0xc7,0x21,0x0f,0x53,0x70,0xde,0xe1, - 0x06,0x81,0xc1,0xac,0x03,0xe0,0x6b,0x22,0x67,0xc4,0xd8,0xcc,0x6f,0x69,0x51,0x91, - 0x80,0xe9,0xf2,0x13,0x15,0x13,0x31,0x14,0xe1,0xce,0xc0,0x55,0x26,0x68,0xb6,0x66, - 0x84,0x80,0x5d,0xc2,0x66,0x28,0x81,0x06,0xaf,0xcb,0x48,0x88,0x46,0xa9,0xef,0xd0, - 0xbd,0x9b,0x97,0xd2,0x20,0x20,0x42,0x8d,0xb0,0xc4,0x9b,0xb6,0x59,0xa7,0x86,0x21, - 0x47,0x0c,0xd9,0xbd,0x3a,0xab,0x09,0x44,0x3b,0xc9,0x0c,0x20,0x0c,0xbb,0x11,0x74, - 0x66,0x88,0x45,0x28,0x55,0xb6,0x3c,0xe7,0x45,0xc3,0xf6,0xf1,0x26,0xa8,0x1a,0x5a, - 0x08,0x87,0xc2,0xa5,0xdb,0xea,0x78,0xd1,0xef,0xc5,0x54,0x17,0xb7,0xac,0x4a,0x5e, - 0x34,0x02,0x9f,0xe3,0x1d,0x72,0x5a,0x94,0x17,0xc4,0x1e,0x5c,0xea,0xa5,0x1b,0x5b, - 0x84,0x85,0x61,0x67,0x9a,0x48,0x39,0x2a,0x6f,0x8b,0x89,0x9f,0x3a,0x45,0x2f,0xf9, - 0x0f,0xc3,0x2b,0x9b,0xa4,0x46,0xc0,0x1c,0x6c,0x34,0x6d,0x45,0xbd,0x8b,0x02,0x48, - 0xd0,0x81,0x59,0xdc,0x1e,0xa6,0x46,0x08,0x40,0xae,0xf3,0x15,0xf9,0x11,0x01,0xb8, - 0xa3,0x00,0xff,0xb4,0xba,0x27,0x42,0x85,0xcd,0xc9,0x83,0x10,0xf8,0xfd,0x29,0x56, - 0x0c,0xb9,0xb6,0xbf,0xb5,0x0f,0xb7,0xbb,0x90,0x6f,0xe5,0x0d,0xbe,0x53,0x13,0xd9, - 0x35,0x91,0x93,0xa0,0xac,0x75,0xc9,0x19,0x38,0xc6,0x46,0x99,0x8b,0xeb,0x5c,0x00, - 0x21,0xc9,0x10,0xe4,0xb6,0xe7,0x4c,0x85,0x99,0xdf,0x06,0x9f,0x72,0x61,0x24,0x17, - 0x84,0x19,0x13,0x74,0x4a,0x11,0x4e,0xa3,0x71,0x93,0x01,0xfc,0x65,0xf5,0x7f,0x82, - 0x07,0x94,0x62,0xd8,0x17,0xd7,0x6c,0x2c,0x01,0xad,0x0d,0xc5,0x0b,0xee,0xad,0x71, - 0x04,0x1b,0x3d,0x88,0xc1,0xce,0x62,0x9f,0xd6,0xa5,0x3d,0xf0,0xfb,0xed,0xd0,0xb0, - 0x85,0x92,0x71,0x42,0x46,0xa3,0xcd,0xa5,0xac,0x85,0x4c,0x19,0x9f,0xf7,0x9d,0xfe, - 0x84,0x93,0xfa,0xff,0x84,0x48,0xed,0x76,0x17,0x13,0x85,0x90,0x0b,0x0a,0x45,0x5d, - 0x07,0x90,0xdd,0x38,0xd5,0x73,0x3d,0x7e,0x85,0x58,0xe3,0x85,0x96,0x2b,0x4d,0xf1, - 0x06,0x1b,0x15,0xf3,0xa3,0x9e,0x82,0x9e,0xc6,0x95,0xbc,0x91,0x81,0x28,0x24,0x68, - 0xae,0x90,0xfe,0xab,0x57,0xb7,0x8c,0x4a,0x03,0x27,0xcd,0x51,0x5e,0x1b,0x56,0xbd, - 0x8c,0x11,0x9b,0x76,0x71,0x65,0xd0,0xd8,0xaf,0xd9,0x11,0xee,0x7c,0x05,0xe7,0xe9, - 0xed,0xba,0x27,0xf0,0xba,0x2b,0xa7,0x6c,0x6e,0xed,0x30,0x8f,0x19,0x3a,0x3f,0x79, - 0x0c,0x13,0x03,0x1a,0x68,0xd9,0x5f,0x10,0x2a,0xd6,0x9f,0xb3,0x20,0x73,0x2c,0xd7, - 0x1d,0x1a,0x60,0xea,0xee,0x6d,0x2c,0x77,0x12,0x9e,0xc8,0x4e,0x16,0xf1,0x91,0x9d, - 0xc6,0x27,0xb7,0xa5,0xca,0xf2,0x06,0x0a,0xc8,0x7c,0x69,0x01,0x6d,0xb0,0x9d,0xa9, - 0xed,0x6e,0xc0,0xf2,0x22,0xbd,0x64,0x41,0x8d,0x21,0xe5,0x09,0x4d,0xb3,0x88,0x33, - 0x29,0x50,0xee,0xa0,0x18,0x64,0x6a,0x7f,0x9f,0x19,0x2c,0x01,0x8c,0xff,0x5f,0x05, - 0x06,0x90,0x96,0x2d,0xfb,0x11,0xa3,0x91,0x08,0xe3,0xab,0x81,0xa7,0xcd,0x2e,0x2c, - 0x8d,0xac,0x48,0x2c,0xf9,0xde,0x60,0xc0,0x01,0xe0,0xa6,0x08,0x27,0xce,0xb5,0x12, - 0xfc,0x46,0xcb,0xe7,0xb3,0x51,0xd1,0xb0,0x1e,0xbf,0x06,0x18,0x3b,0x26,0x59,0x95, - 0xd8,0x41,0xb7,0x3d,0xfa,0x2c,0x4f,0xc2,0xab,0xe3,0x3d,0x57,0x75,0x8e,0xe6,0xc4, - 0x3f,0x52,0xbe,0x0c,0xfb,0x3c,0xb1,0xc0,0x00,0x24,0x43,0x17,0x55,0xe6,0x2e,0x89, - 0x00,0x14,0xb6,0x52,0xf2,0xa6,0x93,0xf3,0x3c,0x05,0x3f,0xb4,0x7c,0xee,0x7b,0xbe, - 0x7f,0x6a,0xd7,0x27,0xf2,0x24,0x91,0x99,0x0d,0x04,0x2e,0x16,0xa6,0x0a,0x6f,0x6c, - 0x07,0xa3,0xa8,0xd1,0xba,0x66,0x99,0x85,0x30,0x05,0x1e,0x44,0xa7,0x25,0xb9,0xea, - 0xa4,0xf5,0x01,0x3e,0x78,0xcd,0xc2,0x39,0x6e,0x6c,0x56,0xc2,0xf4,0x65,0x6a,0x1a, - 0x57,0x82,0x7c,0x98,0x61,0x13,0x24,0x99,0xea,0x4f,0xa2,0xc3,0xa8,0x2b,0x7b,0x2d, - 0x54,0x29,0xfd,0x0b,0x79,0xa9,0x02,0xab,0x40,0x32,0x57,0xc2,0x21,0xcb,0x90,0xfb, - 0xe2,0xa8,0xc3,0x9c,0x9f,0xba,0x3f,0x74,0x68,0x42,0x13,0xb0,0x6c,0x1f,0xd1,0x4f, - 0x61,0x03,0xd0,0xec,0xf1,0x68,0x42,0x68,0x4c,0xd7,0xc1,0xc6,0xfb,0xc5,0x2f,0x3a, - 0xf8,0x68,0x04,0x21,0x1d,0x24,0x81,0x4e,0x34,0x5c,0x49,0x6c,0xb0,0x9c,0xc3,0x36, - 0x8c,0xfe,0xf9,0xfd,0x08,0x6c,0xb5,0xed,0xb1,0x04,0xc0,0x8d,0xf7,0xc3,0x73,0xa2, - 0x43,0x2c,0xf0,0x3f,0x68,0x4a,0x00,0x42,0xb0,0x97,0xe5,0x40,0x56,0xc9,0x81,0x02, - 0xc6,0xa3,0xba,0xac,0x93,0xbb,0x6a,0x89,0x23,0xa0,0x51,0x4c,0xa6,0xbd,0x73,0x6f, - 0x27,0x22,0xb2,0xbd,0x96,0x91,0x22,0x99,0x22,0xa1,0x18,0xa0,0xf1,0x73,0xc5,0x14, - 0x9d,0x9f,0xd9,0xb4,0x80,0x2d,0x0d,0x80,0xaa,0x63,0x39,0x37,0xfc,0x78,0xc9,0x8f, - 0x8f,0xe7,0x9c,0xe6,0x81,0x5f,0x05,0xa4,0xc1,0x12,0x5d,0xf1,0xc0,0x1f,0x94,0xff, - 0x08,0xc1,0x64,0xb6,0x50,0x22,0xdf,0x82,0x9d,0x36,0x13,0xd5,0x0e,0x36,0x6c,0x51, - 0x1c,0x06,0xc8,0x38,0x89,0x0e,0x4c,0x92,0x3f,0x17,0xa4,0xcb,0x07,0x37,0x15,0x45, - 0x8b,0x45,0x05,0x10,0xcf,0x4d,0x91,0x64,0xa1,0xa4,0xc6,0x4f,0x91,0x89,0x77,0x2a, - 0x5f,0x34,0xb9,0x51,0x9a,0xe6,0x5c,0xf1,0xd0,0x73,0x83,0x0b,0x1a,0xa6,0x54,0x71, - 0x20,0x95,0xe4,0x91,0x3b,0x78,0xce,0xda,0x93,0x7d,0xa8,0x50,0xba,0x58,0xce,0x0d, - 0x91,0xcc,0x1d,0x03,0x52,0xc8,0x0f,0x52,0x88,0x16,0x45,0x38,0x7c,0x2d,0xf8,0x0d, - 0x92,0x78,0xa3,0x23,0x9c,0x91,0x43,0x59,0x3c,0xfb,0xdf,0xa8,0xfe,0x32,0x59,0x88, - 0xc3,0x59,0xe5,0xdb,0xc9,0x96,0x45,0x8f,0x81,0x4a,0x5f,0xa0,0x11,0x35,0xf5,0x68, - 0x2c,0xc7,0x06,0xd5,0x47,0x83,0xec,0x88,0x66,0x5d,0xc8,0xd5,0x5b,0xbc,0x76,0x48, - 0x88,0xb0,0xa8,0x3e,0x3a,0x0d,0xec,0x2d,0x6d,0x14,0x86,0x79,0x18,0x5d,0xdb,0x4b, - 0x1c,0x37,0x2b,0xb2,0x60,0xe3,0x15,0x71,0xd9,0xfa,0xe9,0xd0,0x93,0xcf,0x00,0x36, - 0x9c,0x1f,0x0f,0xbc,0xcf,0xe2,0x33,0x7d,0xf8,0x5f,0x04,0xfd,0x4b,0xee,0x60,0xea, - 0x92,0x4d,0x4a,0x82,0x64,0x35,0x76,0xa6,0x33,0xbd,0xc8,0xa2,0x0c,0x31,0x16,0xb6, - 0x88,0x07,0xbf,0x26,0x13,0x10,0xc1,0xb6,0x36,0xe5,0x78,0x72,0x80,0xe9,0x79,0x7e, - 0x6f,0xc1,0x5e,0x74,0xa4,0xe0,0xf1,0xdf,0x9c,0x39,0x8e,0x7f,0xf7,0x1e,0xad,0xd3, - 0xe0,0x2e,0xe4,0x57,0x89,0x18,0xf9,0xde,0x2e,0x38,0x2e,0xdf,0x7d,0x2e,0xc0,0x51, - 0x24,0xe0,0xd8,0x01,0xc8,0x39,0xc5,0x02,0xf2,0x3e,0x38,0xa6,0x19,0x6f,0xa8,0x4f, - 0x9d,0x18,0xf0,0x2c,0xe2,0xaa,0xba,0xe5,0x41,0x3c,0xeb,0xdc,0xf6,0x4c,0x3f,0xa1, - 0x82,0x7b,0x02,0x87,0x86,0xe4,0xb1,0x1e,0x35,0x84,0x36,0x56,0xaa,0xa4,0x4e,0xb1, - 0x81,0x37,0x5d,0x28,0x34,0x0a,0xfd,0x53,0x85,0xa7,0xea,0x97,0x9a,0x52,0xf2,0x3b, - 0xad,0x09,0xa6,0x31,0x2c,0xea,0xcb,0xae,0x3f,0xec,0x4d,0xaa,0x59,0xf6,0xea,0x8f, - 0x30,0x24,0x8a,0x17,0x7e,0x5b,0x44,0x12,0x2e,0xe2,0x2e,0xba,0x58,0x3f,0x26,0x89, - 0x6a,0x78,0xfb,0xa3,0xd4,0x00,0x13,0x58,0xe8,0x47,0x73,0x6b,0xd4,0xe0,0xfb,0x2a, - 0x2c,0x0a,0x3e,0x9b,0xed,0xbc,0x2d,0x13,0x7e,0x86,0x7b,0x7b,0xd1,0xe1,0xf1,0x57, - 0x8e,0xc2,0xeb,0x7f,0xbf,0x2d,0xb2,0x87,0x15,0x8e,0x65,0x51,0x2a,0xae,0x6a,0x49, - 0x21,0x1e,0xb8,0xd4,0x19,0x84,0xba,0x8a,0x8f,0x8f,0xcd,0x43,0xa3,0x3c,0x5d,0x92, - 0x75,0x15,0xab,0xbc,0x1a,0x23,0xb1,0x39,0x2f,0x71,0xe4,0x35,0xdf,0x3d,0x35,0xe2, - 0x87,0xfa,0x7b,0x6f,0xbc,0x00,0xee,0xfb,0x4d,0xcb,0x3b,0x1a,0x11,0x64,0x62,0x1d, - 0xcd,0x13,0x7b,0xd7,0x43,0xbb,0xf4,0x9a,0xc1,0x5d,0x36,0x82,0xa0,0x61,0x9f,0x23, - 0x6d,0x32,0x6c,0x6f,0x52,0x94,0x29,0x62,0xc6,0xd8,0x9b,0x8b,0xe1,0xf2,0x5d,0xf0, - 0x8a,0x6d,0xa4,0x03,0xd1,0x40,0x4d,0x80,0xe9,0x7f,0x12,0x9e,0x24,0x23,0xed,0x02, - 0x7b,0x6e,0xc6,0x7f,0xb1,0xfe,0xf7,0x8c,0xd5,0x91,0x18,0x16,0x77,0xa4,0x53,0xfb, - 0xd6,0x05,0x43,0x24,0x30,0x04,0xb4,0x5f,0x24,0x96,0xf5,0xe4,0x3e,0x98,0xec,0xaf, - 0xd4,0x94,0x62,0x91,0xf5,0x45,0x7c,0x76,0x00,0x9b,0x95,0x1d,0x71,0x44,0xba,0x81, - 0xd1,0x72,0x53,0xd6,0xfb,0x1b,0x63,0xfa,0xe0,0xd5,0x21,0xb9,0xd8,0x2a,0x69,0xd6, - 0xa1,0x5e,0xe5,0xdd,0x93,0x18,0xbd,0x0f,0x18,0x95,0x76,0x07,0x50,0x56,0x5e,0xd5, - 0xd5,0x64,0x5d,0x86,0x99,0x07,0xab,0xb3,0xf1,0x25,0xaa,0xcc,0x5f,0x32,0xee,0x0b, - 0xf3,0x64,0xe9,0x7e,0x35,0x2b,0xfe,0x82,0xdf,0x52,0xb4,0x91,0x01,0xac,0x94,0x3a, - 0xe4,0x39,0x8c,0xf1,0x6d,0x07,0x9a,0x5b,0xb2,0xab,0xc9,0xea,0x34,0x40,0x57,0xc4, - 0x5c,0x67,0x90,0xae,0x1c,0x44,0xc0,0x59,0x8e,0xd4,0x2c,0x46,0x7c,0x60,0x4f,0x8c, - 0x26,0x67,0x42,0xac,0xcd,0xd9,0x2f,0x14,0x4a,0x51,0xe5,0x6a,0x0e,0x3a,0xae,0xa7, - 0xaf,0xdf,0xc2,0xfa,0xe3,0x2c,0x77,0x5a,0x7f,0x1d,0xde,0xd8,0x37,0x2c,0x63,0x4f, - 0xc9,0x01,0xdf,0x34,0xb8,0x57,0x09,0xbe,0x26,0x36,0xb5,0x0d,0xb6,0x0f,0xad,0x0a, - 0xa9,0xe6,0xc8,0xe6,0x5e,0x10,0x25,0xbb,0x87,0xc7,0xc3,0xfc,0xdb,0xff,0x26,0xd5, - 0x07,0x1b,0x95,0xe2,0x34,0xfb,0xe8,0x04,0x2b,0x2a,0x54,0x00,0x63,0xc7,0xd3,0xae, - 0x7e,0x48,0xc3,0xfb,0x26,0x21,0x22,0xc3,0x35,0xee,0xc6,0xc7,0x61,0xcc,0x77,0x72, - 0xcf,0x4d,0xe4,0xf8,0xb3,0x8f,0x31,0xd0,0x83,0x42,0x29,0x55,0xd8,0x69,0xd4,0x0c, - 0x60,0xbc,0xb3,0xee,0x97,0xa8,0x8e,0xc2,0xf1,0xee,0x88,0x72,0x1b,0x29,0x27,0x36, - 0xf9,0xff,0x57,0xc0,0x33,0xfd,0x1e,0x80,0x3f,0x45,0xcc,0x94,0xff,0xc5,0x88,0x89, - 0x0a,0xfe,0x0c,0x84,0x4d,0x8a,0xe0,0x9b,0x3b,0xc8,0xc0,0xa4,0x30,0x9a,0x45,0xc5, - 0xa9,0x90,0xf9,0xae,0x9c,0x44,0x96,0x19,0xf1,0x81,0xc0,0xe1,0xa2,0xa0,0x93,0xad, - 0x87,0x45,0x1d,0x12,0x2a,0x81,0x0a,0xd1,0x2e,0xf5,0xa7,0x59,0x38,0x16,0xc2,0xf4, - 0x25,0xa5,0xa0,0x7e,0xe7,0xd5,0x03,0x6f,0x82,0xd2,0xda,0x54,0xb1,0x79,0x44,0xf8, - 0x59,0x12,0x93,0x63,0x1f,0x7a,0x0c,0x5a,0xb6,0xe4,0xe4,0x15,0x3a,0x04,0xcb,0xe9, - 0x8a,0xa7,0x2f,0x9e,0xcb,0x20,0x5b,0xf4,0x21,0xbb,0x85,0x4f,0xb0,0x67,0x3d,0x7f, - 0xaa,0xeb,0x15,0x7f,0x6a,0x4e,0x88,0xbd,0xff,0xd1,0x8d,0x15,0xdf,0xfa,0x9f,0x60, - 0x88,0x04,0x16,0xbf,0x34,0x4e,0x0b,0x26,0xef,0xed,0xac,0x45,0xbb,0x53,0x13,0x75, - 0xae,0x81,0x98,0xd8,0x3a,0x1b,0x38,0x69,0x4a,0x87,0x62,0x1c,0x01,0x2f,0xb5,0xb9, - 0x82,0x01,0x07,0x9d,0xe4,0x81,0x49,0x8f,0x6f,0x20,0x89,0x73,0xe2,0x71,0x9f,0xfc, - 0xc8,0x03,0x0b,0x3d,0x56,0x10,0xf3,0xc8,0xf8,0x58,0xcc,0xdd,0x7a,0x64,0x83,0x7d, - 0x8d,0xcb,0x41,0x75,0x93,0x70,0x6d,0xd3,0x54,0xd9,0x6b,0x20,0x08,0x44,0xcc,0x70, - 0x4e,0x53,0x5d,0xed,0x37,0x62,0x3a,0x9c,0x6e,0xf5,0x5c,0x8d,0xe9,0xf1,0xe2,0x05, - 0xcf,0xfe,0xb7,0xb5,0x37,0x70,0x35,0x2b,0xe1,0x22,0x39,0x3a,0xf3,0xd2,0xc0,0xe9, - 0xa7,0xf0,0x20,0xd5,0xe9,0xb8,0x88,0x61,0xd2,0xe7,0xe5,0x31,0x89,0xb5,0x64,0xe3, - 0x83,0x9e,0x79,0x37,0xb6,0x57,0x43,0x8e,0x10,0x57,0xc0,0x14,0x2c,0xd5,0x34,0x38, - 0x43,0x58,0xf3,0xe5,0xb7,0x8a,0xe4,0xc1,0x02,0x1a,0xe2,0xdd,0xd0,0xf4,0xc3,0x43, - 0xa7,0x5f,0xa3,0xa7,0x59,0x52,0xeb,0xfc,0xd1,0x2a,0xc4,0x61,0x82,0x61,0x2d,0x71, - 0xbb,0x18,0xf6,0x64,0x3f,0xa8,0xe5,0x36,0x21,0x85,0x25,0x71,0x83,0xb1,0x9a,0x0c, - 0x33,0x5c,0x19,0xb1,0xd3,0x7c,0x28,0x80,0xcf,0x36,0x8e,0xbd,0x7e,0xc9,0xd7,0x65, - 0x2f,0x83,0x2a,0x6c,0x31,0x36,0x09,0xcb,0x19,0xd0,0xd5,0x2c,0x86,0x3b,0xc7,0xbd, - 0x32,0x58,0xbd,0x3d,0x22,0x95,0x4e,0xaa,0x4d,0xfc,0x75,0x3d,0x5b,0xd7,0x20,0xeb, - 0x56,0x90,0xb1,0x45,0xfb,0xe4,0x3f,0x4a,0x4a,0x49,0x88,0x9a,0x74,0x8d,0x1f,0x40, - 0x8f,0xc3,0x06,0xac,0xf7,0xe3,0x5e,0xc8,0xef,0xff,0xd4,0x0e,0x93,0x6d,0x13,0xee, - 0xae,0x48,0x0e,0xde,0x7f,0x00,0xa1,0x86,0xb9,0x82,0x4f,0x1e,0xd7,0xd0,0x46,0xaf, - 0x55,0x5c,0xfa,0x0a,0x6c,0x36,0xc7,0xae,0x17,0xe8,0x17,0xd5,0x73,0xd3,0x2f,0x79, - 0xf3,0x94,0x23,0x4e,0xd9,0x37,0x06,0x4f,0x4e,0x33,0x4a,0x1f,0xb3,0x6e,0x79,0x20, - 0xa3,0x90,0x98,0xfd,0xfd,0xc9,0x07,0xfb,0x37,0xc0,0x52,0x46,0x1b,0xa2,0x56,0xc3, - 0x3a,0x71,0xf2,0x14,0xa6,0x3c,0x2b,0xb6,0x38,0x16,0xea,0x29,0x2d,0x35,0xd9,0x45, - 0xa8,0x0f,0x5c,0xc0,0x6d,0xd4,0xec,0x0f,0xaf,0x31,0xa2,0x69,0xd2,0x12,0x56,0xee, - 0x22,0x58,0xb3,0x15,0x07,0xab,0x07,0xea,0xad,0x32,0xaa,0x2c,0xe9,0x77,0x6e,0x33, - 0x47,0x85,0x4c,0xd5,0x38,0xae,0xc8,0x8a,0xb0,0x8b,0x36,0x3d,0xef,0x58,0x6c,0xd6, - 0x70,0x12,0x57,0x11,0xd5,0xe5,0x00,0x55,0xbe,0xca,0x68,0x31,0xaa,0x43,0x9c,0x78, - 0xdd,0x7d,0xed,0xe7,0xf8,0x66,0xb1,0x03,0x78,0x5b,0x46,0x4f,0xd0,0x3c,0x53,0xa0, - 0x92,0xf2,0xa1,0x5e,0xb7,0x44,0xe9,0x18,0xc9,0xa5,0x6c,0x09,0x1d,0xb6,0xc5,0x8e, - 0x7b,0xe1,0xad,0xfe,0x3f,0x59,0x4c,0x17,0xad,0x6b,0x23,0xaa,0x2c,0xb4,0xf1,0xac, - 0x72,0xa6,0xcf,0xed,0x91,0x22,0x04,0x17,0x87,0x43,0xa9,0x70,0xfc,0x6b,0x1d,0xcf, - 0xad,0x2b,0xdd,0x09,0x7d,0x29,0xa0,0xd8,0xb8,0xa4,0x8b,0x4f,0x98,0xa8,0xeb,0x22, - 0x1e,0xf0,0xaf,0xfd,0x60,0xa2,0x05,0xfe,0xac,0xcf,0xc3,0x4c,0x86,0x69,0x2d,0xb1, - 0x71,0xac,0x73,0x31,0x91,0x2a,0x38,0xd7,0xf1,0x97,0xba,0x7a,0x8a,0xbd,0x4a,0x23, - 0xae,0x01,0x06,0xcd,0x7d,0xa5,0x20,0x78,0xfc,0x14,0xff,0xd5,0x03,0xf3,0xa3,0xb2, - 0x79,0x88,0x66,0x8f,0xfe,0x93,0x73,0xac,0x33,0xb8,0x54,0x42,0x46,0xdf,0xab,0xcf, - 0x75,0x89,0x78,0xdb,0xbe,0x99,0x1a,0xbb,0x83,0xb2,0xc5,0x56,0x3c,0xe6,0x87,0xbf, - 0x97,0xdd,0x1b,0xc1,0xe2,0xba,0x8c,0xd2,0xe4,0x76,0xfc,0xb7,0x72,0x41,0xbb,0x16, - 0x5d,0xf2,0x51,0x12,0x03,0x08,0x2f,0x54,0x75,0x7c,0xad,0x32,0x1e,0x2e,0x7d,0x8b, - 0xc7,0x4e,0xe0,0xf8,0xb2,0xe1,0x4d,0xe3,0xf0,0x7f,0x01,0xb7,0x57,0x07,0x17,0x71, - 0xf9,0x64,0x6d,0x3b,0x28,0xbb,0x2a,0x55,0x2d,0xc2,0x0a,0x8e,0x01,0x62,0x60,0x20, - 0x20,0x4f,0x65,0xa9,0x4a,0x4b,0xb0,0x19,0xeb,0x29,0xe8,0x0a,0x52,0x00,0x36,0x58, - 0x84,0xf0,0x13,0x97,0x8c,0xf4,0xe7,0x78,0x64,0x15,0x9c,0x5d,0xa0,0x08,0xeb,0x41, - 0x84,0x84,0xc5,0xd6,0x0b,0x47,0x12,0x13,0x66,0xc9,0xe6,0x63,0xc5,0xfd,0x37,0x53, - 0x04,0x91,0x30,0xca,0xcc,0x48,0x47,0x1b,0x72,0x98,0x85,0xe4,0x87,0x46,0xa1,0xf1, - 0x2a,0xf9,0xa1,0x7e,0x17,0x49,0x23,0xbb,0x5c,0xdc,0x81,0x83,0x8c,0xa9,0xee,0x76, - 0x4d,0x82,0xcb,0x6d,0xb1,0x32,0x20,0x7f,0xff,0xd3,0x39,0x66,0x35,0xe8,0xfa,0x0f, - 0xef,0x7d,0xd9,0x89,0x5d,0x39,0xd6,0x2f,0xda,0x7f,0x77,0x97,0x69,0xba,0x59,0xfd, - 0x9e,0x3e,0xab,0x7d,0xe1,0x9a,0x39,0x53,0x35,0x76,0xab,0xb0,0xd9,0xe0,0x36,0xcf, - 0x4d,0xbc,0x39,0x53,0x49,0xb9,0x77,0x0c,0x4a,0x68,0xa6,0x6f,0x7c,0xe7,0xd9,0xfe, - 0x1c,0xa1,0x90,0xf6,0xd6,0xac,0xa8,0x85,0x06,0x9e,0x80,0xc7,0x5d,0x9d,0x1f,0x0d, - 0xac,0xd0,0x27,0x33,0x93,0x33,0xa7,0x84,0xc0,0x98,0xa3,0x89,0x96,0x6f,0xd7,0x3b, - 0x80,0x32,0x43,0x4c,0xb8,0xb5,0x67,0x82,0x06,0xa4,0x7d,0xc0,0x8f,0x50,0x13,0x1f, - 0x78,0x1b,0x62,0x64,0x7a,0x95,0x46,0x04,0xa9,0x83,0xaa,0xc6,0xfc,0x6f,0x68,0xb0, - 0x19,0x0e,0x9f,0x4e,0x10,0xb0,0x26,0x81,0x23,0xbe,0xf8,0x70,0x16,0x6e,0x13,0x72, - 0xf0,0x4d,0x94,0x3a,0xa0,0x60,0x03,0xde,0x2b,0x51,0xf1,0x61,0xc7,0x6d,0x50,0x20, - 0x68,0xb2,0xbe,0x3d,0x6d,0x12,0x67,0x84,0xe5,0xc8,0xf9,0x71,0x51,0x6e,0x3e,0x47, - 0xf3,0x0b,0x00,0x24,0x9d,0x29,0x06,0x5b,0x24,0x91,0xb0,0x66,0x5b,0x6b,0xb7,0x22, - 0x75,0xda,0xa8,0xff,0xea,0x28,0x5b,0xf3,0xbe,0x34,0x4f,0x96,0x2c,0x78,0x46,0xb1, - 0x8e,0xf7,0xa1,0xe5,0x8a,0x29,0x07,0x5e,0xa4,0x04,0xb1,0x67,0xdf,0xcb,0x69,0xe6, - 0xb0,0x31,0x09,0x35,0x54,0x2a,0xa6,0x0f,0xf5,0x98,0x02,0x70,0xd5,0x8c,0xfa,0x8a, - 0x2a,0xf8,0x42,0x69,0xd6,0xdd,0x03,0x19,0x2e,0xe7,0xd8,0xd1,0xfb,0x0d,0xf1,0x10, - 0xac,0xf6,0xd0,0x81,0x71,0x18,0x4c,0xcb,0xc5,0x44,0xfa,0x7c,0x57,0x64,0x7b,0xe1, - 0x9a,0x47,0x96,0x89,0xf3,0xf5,0xb3,0xd9,0x2c,0xe9,0xab,0xfd,0x2f,0x65,0xcb,0xf0, - 0x6d,0x49,0x4b,0x25,0x2b,0x26,0x65,0x98,0x46,0xed,0xd1,0x82,0x7a,0x66,0xf8,0xca, - 0xbc,0x3d,0xa2,0xec,0x46,0x23,0xc2,0xc8,0x2c,0x35,0xe2,0xe8,0x65,0xc3,0xb5,0xdc, - 0x38,0x06,0xd8,0x58,0x99,0x2e,0x9a,0xc0,0x5d,0x56,0x1a,0x89,0xfb,0x2f,0x3b,0xa1, - 0x44,0xc3,0xa3,0x4f,0xe3,0x23,0x8c,0x41,0xb1,0x1f,0x0c,0x07,0xad,0x0e,0x2b,0xf2, - 0x5c,0xf2,0x0e,0xbf,0x19,0x78,0xae,0x1f,0xe8,0xee,0x00,0x64,0xdd,0xb4,0x4c,0x84, - 0xa5,0xc1,0x14,0xa4,0x2e,0xe9,0xcf,0xa0,0x64,0xc0,0xaa,0xcd,0xd3,0xcb,0x1c,0xe3, - 0x35,0xea,0x34,0xe4,0x39,0x3a,0x18,0x43,0x53,0xdc,0x1a,0x74,0x7c,0x85,0x65,0x83, - 0xdb,0x1f,0x6d,0x08,0x83,0xc0,0x71,0xd2,0x86,0xd3,0x91,0xde,0x7d,0xf4,0x8d,0x15, - 0xde,0x72,0x98,0x7d,0x6b,0xfe,0x8d,0xc3,0x0a,0x42,0x3d,0xab,0x7d,0x16,0xbb,0xba, - 0x54,0xcb,0x7b,0xdf,0x91,0xb0,0x9e,0x92,0x51,0xc3,0x50,0x60,0x1d,0x71,0x95,0x4b, - 0xf7,0xb6,0x95,0xec,0x96,0xca,0xcd,0xcf,0x5b,0x80,0xbc,0xf6,0x7e,0xfe,0x85,0xf9, - 0x17,0x54,0xa5,0x6b,0xc2,0x39,0xad,0xda,0xde,0xc3,0xd3,0x45,0x72,0x1b,0xea,0x65, - 0x16,0x55,0xad,0x7b,0xc3,0x3a,0x4c,0x75,0xf4,0x0c,0x22,0x17,0x71,0x73,0xd9,0x8c, - 0x2e,0xe3,0xf9,0x71,0x30,0x7a,0x28,0x80,0xe5,0xfe,0xae,0x56,0x1b,0xf1,0x54,0xb0, - 0x41,0xda,0x49,0xfe,0xdb,0xc0,0xa2,0x89,0x59,0x1b,0xcc,0x12,0x92,0x1d,0x02,0x8d, - 0xf5,0xb5,0xdb,0x17,0x3a,0x3e,0xdf,0x69,0xd1,0xd1,0x80,0x5e,0x7c,0xf7,0x71,0x9f, - 0xca,0x2e,0x8c,0x75,0x81,0x76,0x0c,0x2f,0xc8,0xc1,0xa4,0x5f,0x25,0x3f,0x55,0x1f, - 0x2c,0x8d,0x61,0x2e,0xfa,0x91,0x96,0x9d,0x74,0x1e,0xd8,0x8e,0x39,0x81,0xe2,0x5d, - 0xfe,0x7f,0xf6,0x26,0x97,0x30,0x5e,0x8a,0x58,0x89,0xe6,0xbe,0xf7,0x71,0x74,0x21, - 0xe6,0xc2,0xbf,0x49,0x93,0xfe,0x94,0x5f,0xec,0x56,0xaf,0x2a,0xde,0x72,0x26,0x32, - 0x54,0x94,0xb0,0xfa,0x1a,0xe0,0xa5,0x11,0x7a,0x12,0x7f,0xbf,0x78,0xd4,0x63,0xc0, - 0x37,0x92,0x5f,0xf4,0x35,0x22,0x27,0x06,0x27,0xd1,0xfa,0xf9,0xf7,0xed,0x48,0x10, - 0x27,0x7d,0x81,0x69,0x84,0xb1,0x62,0x04,0x2f,0x22,0xf2,0xcd,0xf6,0xe7,0x99,0xfc, - 0x94,0xcf,0xfb,0x06,0xe3,0xa2,0x27,0x8b,0x2f,0x86,0xfb,0xc8,0x77,0xef,0x51,0x34, - 0x78,0x8c,0x89,0x06,0x18,0xc0,0x47,0x34,0x64,0x3c,0xb5,0x30,0x74,0x69,0x18,0x66, - 0x9b,0x39,0xf3,0x24,0x56,0xab,0x60,0xc7,0x40,0x1f,0x4d,0x15,0x2a,0x63,0xd1,0xd6, - 0x77,0x40,0x17,0xa4,0x36,0x37,0x89,0x8b,0x34,0xbe,0xc2,0x85,0x75,0x48,0xcc,0x0d, - 0x7b,0xda,0x81,0xec,0x67,0xab,0x80,0x9e,0x34,0x5d,0x71,0x63,0x5b,0xa7,0x30,0x46, - 0x52,0xeb,0xb0,0x6f,0x32,0x78,0x3a,0xf7,0xa8,0x2b,0xa9,0x30,0x15,0x65,0x96,0x79, - 0x7c,0x87,0x09,0xab,0xc9,0xb6,0xa2,0x59,0x17,0x4a,0x0d,0xcc,0x78,0x33,0xea,0xee, - 0x35,0xc7,0xac,0x37,0x9d,0x8e,0xdd,0x1e,0xa4,0x4a,0x4b,0x4e,0x3e,0xed,0x97,0x78, - 0xf4,0x85,0xde,0x8b,0xe4,0x72,0xcc,0x58,0xea,0xa6,0x93,0xd2,0x58,0xec,0xa8,0x9f, - 0xfe,0x16,0xad,0x37,0x15,0xa5,0xc6,0xc3,0xcd,0x34,0xc3,0xbd,0x6b,0x8a,0xa6,0x14, - 0x00,0x92,0xdc,0x97,0xca,0xa3,0x9a,0xcf,0x48,0x77,0xba,0xa8,0xdc,0xe8,0xff,0xde, - 0x77,0x8a,0x49,0xbc,0xdf,0x00,0x78,0x9c,0xea,0x4a,0xc4,0x43,0xbd,0x8d,0x1e,0xb4, - 0xed,0x9a,0xc1,0xb4,0x77,0x14,0x69,0x83,0x3c,0x83,0x7f,0x0d,0xfd,0x4e,0x53,0xa3, - 0x8f,0x7e,0x93,0x3f,0x97,0x1f,0x79,0x6e,0xc9,0x46,0x7e,0x82,0x6e,0x34,0x72,0x33, - 0xcf,0xf4,0xfa,0x64,0x4a,0x35,0x6e,0x3f,0x0c,0xc1,0x17,0xa1,0xd8,0x95,0x12,0x26, - 0xfb,0x3e,0xae,0x6b,0xa6,0x6a,0x46,0x52,0x6e,0x7e,0xe6,0x92,0x0d,0x5e,0xb5,0x26, - 0x53,0xfe,0x5a,0xb9,0x17,0xb6,0xf5,0x9b,0x56,0xdf,0x8d,0x96,0x55,0x6d,0xff,0xe0, - 0xcf,0x45,0xa8,0x13,0x8a,0xa2,0x28,0xc0,0xdd,0xbf,0x1d,0xc5,0x97,0xa4,0x82,0xef, - 0x20,0x25,0x50,0xa4,0xc9,0xb2,0x8b,0xd2,0x99,0x92,0x9c,0xee,0x3e,0xad,0xfb,0x2d, - 0xd6,0x46,0xa7,0xd2,0x4c,0x48,0xbe,0xd2,0x39,0xb7,0x04,0x74,0xcd,0xfa,0x14,0xa1, - 0xd5,0x96,0x35,0x97,0xb0,0x46,0x67,0x9c,0xc4,0x3b,0xac,0x7b,0x53,0x76,0x96,0x57, - 0xd7,0x38,0x4a,0xea,0x35,0xb3,0x7c,0x95,0xa5,0x28,0xc5,0xe7,0x54,0xfc,0x58,0x3b, - 0x08,0x6d,0xc6,0xce,0xd2,0x33,0x50,0x6e,0x6f,0xc0,0xc8,0xa9,0xdd,0x87,0x38,0x2e, - 0xc6,0x5a,0x62,0xfc,0x7e,0x66,0x26,0x06,0x0e,0xb4,0xe4,0x9b,0x05,0x56,0x68,0x77, - 0xac,0x67,0xa3,0x6d,0x3e,0xf2,0x09,0x83,0x85,0xeb,0x1b,0xd5,0x62,0x65,0x94,0x2a, - 0xc7,0x34,0xd7,0x1d,0xb8,0xb2,0x29,0x92,0xeb,0x4a,0x1f,0xcd,0x9f,0xac,0xa6,0x26, - 0xf4,0xde,0xe8,0xac,0x7f,0xbe,0x2c,0xeb,0xff,0x21,0x74,0x6c,0xc4,0x01,0x0a,0x94, - 0xda,0xc1,0x65,0x3c,0xd6,0x4c,0xd2,0x5f,0xfc,0x42,0x96,0x3c,0xfb,0xf3,0x70,0x01, - 0xa8,0x0e,0x9f,0xbd,0x3c,0x9a,0x5e,0xe3,0x6e,0x9e,0xcf,0xff,0x5d,0xf0,0xc2,0xa4, - 0x32,0x0a,0x9d,0xda,0xf7,0x32,0x26,0xe5,0x08,0x9e,0x5b,0x3d,0x5e,0xbc,0xa3,0xb0, - 0xdc,0xa3,0xba,0xb4,0xe0,0x8f,0x6e,0x27,0x64,0xe1,0x90,0xd7,0x80,0xcb,0x32,0x21, - 0x6f,0xae,0x9e,0x76,0x71,0x2b,0xb8,0x42,0x23,0x16,0xc8,0xaa,0xaa,0x7d,0x22,0xb5, - 0x58,0xe1,0x25,0x21,0xf8,0x2f,0x29,0x11,0xa3,0xed,0x34,0x20,0x57,0x74,0x5c,0x62, - 0xe7,0x80,0xf7,0x13,0x70,0xa0,0x67,0x36,0xe5,0x4e,0x24,0x7f,0x35,0xe4,0x7a,0xa2, - 0x42,0x46,0x89,0x54,0xed,0x48,0xc0,0x06,0xb5,0xb9,0xb8,0x02,0xad,0xbf,0x30,0x54, - 0xea,0x36,0xca,0xaa,0xee,0x49,0x13,0x02,0xbc,0xb8,0x83,0x74,0x55,0xf5,0x09,0x41, - 0xa6,0xad,0xff,0x88,0x58,0x7c,0x41,0x12,0xc6,0x93,0xd1,0xe1,0xae,0x38,0x89,0x69, - 0x42,0x0a,0xab,0x5d,0x90,0x75,0xf5,0xef,0xc0,0x4f,0x6d,0x0a,0xef,0x18,0x79,0xfb, - 0x3a,0x64,0xf7,0xff,0x94,0x69,0xed,0xc0,0xf2,0x05,0x93,0x1a,0xb2,0x7d,0x42,0x81, - 0x84,0x84,0x97,0xe3,0x2a,0x2a,0x8a,0x57,0xb2,0x2a,0x28,0x07,0x26,0x69,0x3d,0xb9, - 0x4a,0x8a,0xda,0x86,0x7d,0x8c,0xe8,0x56,0x45,0x9c,0xc0,0x1b,0x28,0x7a,0x6d,0xa8, - 0x76,0x80,0x33,0xe3,0x14,0xd6,0x7d,0x5b,0x3a,0xb6,0xf3,0xff,0x5f,0x9e,0x3b,0x6f, - 0xab,0xa3,0x79,0x0b,0xd8,0x3c,0x42,0x61,0x1e,0x91,0x69,0xc0,0xad,0x90,0x28,0xda, - 0xe2,0x69,0xb2,0x6e,0xe4,0x36,0x1c,0x1a,0xb6,0x21,0xac,0x1a,0x19,0x22,0xe3,0x43, - 0x06,0x62,0x8b,0xdd,0x67,0xfa,0x51,0x2e,0xc4,0x0c,0x6e,0x32,0xfe,0x75,0x29,0x59, - 0x8a,0x8c,0xe9,0x3b,0x60,0x43,0x9b,0xe8,0x71,0x47,0x81,0x1a,0xa3,0x2d,0x0c,0xa8, - 0xc9,0xb3,0xec,0x9a,0x5e,0xc4,0xb4,0xd2,0x02,0x07,0x14,0x46,0xd1,0xf8,0x5e,0x03, - 0x13,0xce,0x5d,0xe7,0x4b,0x9a,0xc1,0x89,0x8a,0x15,0x5e,0xc6,0xd2,0x77,0x63,0x28, - 0x5f,0xbf,0xd4,0x9f,0x8a,0x86,0x6b,0xa6,0xc4,0xff,0x91,0x47,0x72,0x7a,0xcd,0xf4, - 0xc3,0xbe,0xf5,0x91,0x51,0x92,0x23,0x5d,0x93,0xfc,0x95,0x07,0x04,0x7c,0x84,0xf8, - 0x90,0x9f,0xc4,0xbe,0xf0,0x74,0x12,0xa6,0x01,0x14,0xc2,0x86,0x8d,0xc9,0xcc,0xa3, - 0x19,0x57,0x33,0xae,0x51,0xea,0x1a,0xb6,0x00,0x75,0xa3,0x08,0x33,0xfe,0xba,0x23, - 0xc9,0x19,0xcd,0x4d,0x53,0x87,0x2d,0xe3,0xa6,0x14,0xc3,0x87,0x9a,0x7b,0x5e,0x83, - 0xc0,0xe8,0x94,0x13,0xb5,0xc6,0x25,0xec,0xea,0x23,0xc0,0xcc,0xf5,0xe6,0x53,0xb5, - 0xd7,0xb5,0xd7,0x73,0xd1,0x37,0xb2,0xca,0x4c,0x43,0x22,0xd3,0x7e,0x72,0xb1,0x0b, - 0x47,0xc4,0x29,0x0b,0xd8,0x96,0x60,0xbe,0x88,0xda,0xd6,0x26,0xda,0x7f,0x56,0x35, - 0x5f,0x76,0xd1,0x38,0x53,0xfc,0x76,0xdf,0x88,0xa4,0x98,0x7d,0x03,0x38,0x69,0x2d, - 0xa8,0x4b,0xe9,0x6c,0x7b,0x7b,0x6a,0x4a,0x65,0x1a,0x97,0x1a,0x18,0x74,0x3e,0xef, - 0x89,0x5d,0xa8,0x48,0x6a,0x59,0xc6,0x00,0xc6,0x11,0x7d,0x8e,0x89,0xf7,0x5d,0x72, - 0x96,0x12,0x1d,0x32,0x48,0x7d,0x5f,0x9e,0x29,0x12,0x75,0x9e,0xf4,0xeb,0x1d,0x54, - 0xd6,0x5c,0x7a,0xf0,0x05,0x63,0xbb,0x7b,0xea,0x56,0xca,0xd0,0xfc,0xef,0x5d,0x3f, - 0xad,0xae,0x90,0xdd,0x34,0x82,0x61,0x2c,0xc8,0x7f,0xd7,0xed,0xc4,0x5f,0x22,0x91, - 0x66,0x5f,0x43,0x22,0xff,0xc4,0x27,0xd9,0xa5,0x53,0x20,0xa4,0x51,0x04,0x12,0x8d, - 0xfa,0x0a,0x57,0x65,0x04,0x00,0x00,0x02,0xb7,0x6e,0x6d,0xd4,0xd7,0xc9,0xe1,0x66, - 0xe6,0xee,0x99,0xf9,0x38,0xaf,0x4a,0x07,0x39,0x63,0x8b,0xc5,0x56,0xaa,0x2b,0x8d, - 0x72,0x80,0x91,0x33,0xfe,0xac,0x99,0x41,0xa7,0x94,0x3b,0xc7,0xd1,0xec,0x5f,0xd0, - 0x84,0x19,0x5f,0xdd,0x75,0xa0,0xb3,0xc2,0x5e,0xa5,0xe3,0xf0,0xa1,0x6f,0xa8,0x6a, - 0x86,0x88,0xe0,0x42,0xca,0xf8,0x13,0x0d,0xf8,0x87,0x1a,0x31,0x81,0xef,0x03,0x43, - 0x87,0x17,0x98,0x36,0x35,0xb0,0xca,0x73,0xc0,0x64,0x4d,0x5a,0xd0,0x77,0x10,0x74, - 0x26,0x28,0x46,0xd3,0xed,0x95,0x3f,0xd9,0xc6,0x37,0xf8,0x87,0x7a,0x16,0x9c,0xa2, - 0xed,0x57,0x22,0x7d,0x51,0x2d,0x4c,0x2d,0x68,0x67,0xd2,0x6f,0x1c,0x68,0x14,0xab, - 0xc7,0xba,0x0e,0x3a,0x92,0xab,0x44,0x3d,0x69,0x68,0xe0,0x2f,0xfe,0xef,0xdc,0x09, - 0xa2,0xe4,0xdd,0x09,0x54,0xa5,0x93,0x59,0xae,0x9d,0xcb,0xad,0xd5,0x17,0x15,0xab, - 0x47,0x98,0x1c,0x1e,0x10,0xa7,0x03,0x0b,0xbc,0x64,0xb7,0x41,0x7c,0x63,0xc2,0x40, - 0x82,0xe2,0x63,0x4c,0xb0,0xed,0xc9,0x9b,0xed,0xac,0x32,0x57,0x50,0x31,0x08,0x5a, - 0x0c,0x9f,0x51,0x04,0xfe,0xd2,0xd6,0x15,0x49,0x6f,0x3a,0x47,0x51,0x60,0x01,0x09, - 0x67,0xea,0xcc,0x30,0x47,0x32,0x41,0xef,0x84,0x50,0x8b,0x9f,0x73,0x5f,0x31,0xc6, - 0xe7,0xbc,0x12,0x98,0x66,0x29,0x0e,0x3b,0xdf,0x8d,0x83,0x00,0xb7,0xe2,0x1a,0x37, - 0x44,0x6f,0x82,0x33,0xe2,0x14,0x6e,0x9b,0x0c,0x41,0xd4,0xe6,0x9b,0xfd,0xd3,0x6c, - 0x01,0x3c,0xf2,0x0c,0x31,0x1e,0xcd,0x41,0xe9,0x90,0xb4,0x00,0xd4,0x7b,0xda,0xf0, - 0xc2,0x11,0xf4,0x18,0x5f,0x04,0x4b,0xa5,0x05,0x51,0xbf,0xa6,0x57,0xf4,0xf0,0xab, - 0x4e,0xd7,0x1f,0x64,0x59,0x18,0x03,0xe6,0x8d,0xde,0x3a,0xe7,0xd4,0xfc,0xa0,0x32, - 0x2e,0x9b,0x86,0xc6,0xc7,0x32,0x8c,0x42,0x38,0x2c,0xd4,0xe2,0x49,0xf4,0x14,0xf5, - 0xde,0x9a,0xfb,0x29,0xc6,0x36,0x1a,0x27,0x64,0x3d,0xe4,0xfe,0x14,0xcc,0xa5,0xfb, - 0x27,0x0b,0xe1,0x87,0xa4,0x3b,0x4f,0x0d,0x53,0xba,0x4e,0x37,0xfe,0x8f,0xfd,0x3b, - 0xb1,0xda,0x12,0x3f,0x3c,0xf5,0x27,0x10,0xd3,0x95,0x6a,0x73,0x87,0x2b,0x1c,0x3b, - 0x1b,0x37,0x90,0x86,0xd7,0x3d,0x24,0xb5,0x87,0x9c,0xd6,0xee,0xda,0xf5,0x16,0xaa, - 0x5e,0x36,0x7f,0x0d,0x47,0x16,0x9a,0x9e,0x0e,0x12,0xc6,0x3c,0x7c,0xfe,0x83,0xaf, - 0x19,0x3b,0x0f,0x05,0x31,0x17,0x0d,0x1b,0x56,0x75,0xfd,0xb2,0xbd,0xf8,0x8f,0xe9, - 0xcf,0xcc,0x88,0xec,0x87,0x3d,0x29,0x1b,0x06,0x9f,0xe5,0xa2,0x5e,0x9e,0x99,0x78, - 0x0e,0xec,0x71,0x1d,0x38,0x2c,0x30,0x84,0xcf,0xd5,0xcd,0x0c,0x22,0x4c,0xae,0x4b, - 0xe6,0x16,0x55,0x72,0x88,0x26,0xa8,0x7e,0x25,0x92,0x76,0xe9,0x9e,0xf2,0x3d,0xbf, - 0xc6,0x04,0x53,0xb0,0x82,0xc1,0xa2,0x85,0xe8,0x3c,0x1c,0x3c,0xda,0xf8,0x6b,0x39, - 0x8b,0x84,0xeb,0x26,0xbf,0xa4,0xd3,0x88,0xf4,0x79,0x9f,0xbe,0x0a,0xf2,0x4a,0xfb, - 0xa3,0x06,0xf9,0x7e,0xb7,0x30,0x71,0x60,0x06,0x9d,0xee,0xba,0xbb,0x96,0x77,0xf2, - 0x83,0x29,0xb0,0x24,0x0d,0x3e,0x7e,0x36,0x22,0x45,0xfb,0xc7,0xb5,0xce,0x0d,0xe7, - 0x21,0x88,0xbe,0xe3,0x65,0x83,0x6f,0x27,0x4f,0xff,0xcf,0xbe,0xc0,0xcd,0xf3,0x73, - 0xc2,0xbc,0x30,0xf3,0x81,0x5e,0x60,0x4b,0xa0,0x47,0x2f,0xc4,0x39,0x33,0x80,0x9d, - 0x73,0x46,0x1f,0x96,0xae,0xf5,0xa9,0x91,0xe1,0x04,0xea,0x97,0x3c,0x60,0x1f,0xf0, - 0x33,0x07,0x08,0xa4,0xf9,0xfe,0x01,0x65,0x96,0x29,0xe0,0xa4,0x0f,0x9a,0x48,0x26, - 0x84,0x9d,0x70,0x7c,0xe9,0xc6,0x6a,0xe5,0xb2,0x73,0xd6,0xe7,0x52,0x2c,0x59,0x7c, - 0xdb,0x04,0x2e,0xa8,0x50,0x52,0x9d,0x2f,0xcd,0x59,0x75,0x06,0xbd,0x91,0x7a,0x8a, - 0x01,0xd7,0x7a,0x28,0xa6,0x48,0x73,0x68,0x56,0x04,0xec,0x1e,0xdd,0x7e,0x6a,0x59, - 0xf0,0x4b,0xda,0x62,0xdb,0x29,0x5c,0x7f,0xf4,0xff,0xc3,0x28,0xd4,0x0a,0x3b,0xd9, - 0x73,0x05,0x41,0x4a,0x65,0xac,0x45,0x6f,0xe6,0x4e,0xac,0x73,0x29,0xb6,0x43,0x9e, - 0x0b,0x23,0xc3,0x45,0x14,0x96,0x20,0x49,0x49,0x54,0x30,0x98,0x0c,0x75,0xd2,0x5d, - 0x39,0xe8,0x51,0x62,0x62,0x97,0x2f,0x93,0x97,0x11,0xac,0xd9,0xd8,0x1b,0x4e,0x1e, - 0x67,0x4c,0xd1,0x31,0x3f,0xa0,0x77,0x07,0xd2,0x0f,0xfc,0x9d,0xf8,0x2f,0x99,0x49, - 0x9a,0xc5,0xeb,0xb5,0x56,0x6c,0xfc,0xed,0xbd,0xe4,0xef,0xe9,0xa6,0xd7,0xa3,0x6c, - 0xaf,0xa4,0x92,0x1f,0x3c,0x3f,0x48,0xaf,0xcd,0xde,0x4c,0x6a,0x59,0x18,0x64,0xc0, - 0x86,0x1d,0x59,0x91,0xbf,0xcd,0x2c,0x4f,0x9d,0x53,0x3f,0xca,0xa5,0x7e,0x74,0x12, - 0x20,0x16,0x8c,0x54,0x21,0x8c,0x7c,0x1e,0x3b,0x5c,0xc5,0x96,0x94,0x78,0x4f,0x9c, - 0xe1,0x13,0xe7,0x45,0x45,0xb4,0x2d,0x31,0x01,0xad,0xfd,0x23,0x0c,0x33,0x36,0x73, - 0x0d,0xae,0xef,0x55,0x40,0xb5,0x66,0x96,0x40,0xec,0xd1,0x72,0x33,0x93,0x7e,0x71, - 0x00,0xcb,0xbc,0x04,0x38,0x24,0x43,0x14,0x99,0x69,0x9f,0x23,0x70,0x81,0x1a,0x80, - 0x9f,0x76,0x8d,0xb2,0x00,0xb9,0x0c,0xfd,0x3e,0x53,0x7f,0x0a,0xaf,0x8a,0x1b,0x84, - 0xa2,0xb2,0x7d,0x2d,0x3f,0x79,0x95,0xd8,0x63,0x17,0xd1,0xa2,0x73,0x78,0xfc,0x75, - 0x5b,0x34,0x35,0x3d,0x32,0xaa,0x28,0x2f,0x42,0xe8,0x83,0x1a,0xc9,0x74,0x7e,0xf7, - 0x2e,0x12,0x86,0xcc,0x76,0x43,0x76,0x06,0x36,0x55,0x9e,0xa0,0x7e,0x30,0xb1,0x1c, - 0x08,0xf2,0x31,0x0e,0x1b,0xe4,0x3e,0x31,0x49,0xc9,0xc7,0x9e,0x3f,0x38,0x07,0xad, - 0x49,0xe5,0x03,0x8f,0xb6,0x54,0xee,0x8e,0x49,0x25,0x26,0x29,0x9b,0xfe,0x37,0x63, - 0x05,0x16,0xed,0x9d,0xba,0x2b,0xdd,0x7f,0xb9,0x40,0x44,0xbe,0x86,0x77,0x75,0x68, - 0x2c,0x65,0x3e,0xc4,0xba,0x3e,0x4e,0xa0,0x59,0x1d,0x2d,0xe9,0x11,0x03,0xc6,0xb9, - 0x43,0x7e,0x22,0xa7,0xa5,0xb6,0xf9,0x1a,0x8b,0xf9,0x80,0x13,0x31,0xd6,0xa6,0xba, - 0xc0,0x5c,0x9e,0x8a,0x1f,0x41,0xef,0x16,0x03,0xe4,0xd5,0x1c,0x45,0x3c,0x31,0x7c, - 0x5e,0xbc,0xef,0x37,0xca,0x29,0x27,0xc0,0x00,0x8e,0x22,0xe5,0xd9,0x60,0x5c,0x86, - 0x07,0xf4,0xc2,0xa6,0xe5,0x26,0x89,0x52,0xc4,0xd6,0xcd,0xd5,0x8c,0x34,0xe8,0xd2, - 0x99,0x8e,0xae,0x14,0x6b,0xd6,0x8a,0x48,0xe6,0xa4,0x50,0xbc,0x77,0x37,0x59,0x81, - 0x8d,0x2d,0xa1,0xc7,0x99,0xd9,0x79,0x2b,0xc2,0xcb,0x92,0xd6,0x48,0xa2,0x49,0x52, - 0x7e,0xc1,0xaf,0x3e,0x18,0x5e,0x06,0xd1,0x99,0x3e,0xc6,0x44,0x3f,0x4b,0x30,0x41, - 0x6d,0xa7,0x18,0x4e,0xb1,0xb4,0x43,0x8a,0x0a,0x18,0xcc,0xe2,0x0a,0x7e,0x36,0xf7, - 0xc4,0x28,0xd6,0xbb,0x6b,0xe7,0x11,0x99,0xf8,0x58,0x6f,0x0f,0x9f,0xee,0x49,0xb2, - 0xa0,0x70,0x19,0x4f,0x31,0x59,0xdd,0xe6,0x13,0xa4,0x91,0xc8,0x3f,0xa4,0x26,0x63, - 0x70,0x28,0xf1,0x2b,0x36,0x18,0xb9,0x4a,0x9d,0x85,0x81,0xf3,0xab,0x03,0x6a,0x05, - 0x0a,0x82,0xc0,0x86,0xe9,0x2e,0x28,0x36,0x6f,0x4d,0xc0,0xce,0x18,0x63,0x62,0x80, - 0xec,0x86,0x95,0x8c,0x0f,0x34,0xf8,0x28,0xcf,0x0e,0xb8,0x10,0xab,0x9c,0x2c,0x5b, - 0x88,0xc8,0xa3,0xcf,0x80,0xc6,0xa3,0x59,0x3b,0x88,0x98,0xc1,0x63,0xee,0x4b,0x5b, - 0x23,0x84,0xc9,0x1f,0x9e,0xeb,0x6c,0x59,0x7a,0xae,0x4c,0x60,0x60,0x17,0x34,0x38, - 0xe5,0x0f,0xb9,0x4e,0x93,0xb7,0x61,0x50,0x7d,0x2c,0x32,0x53,0x3f,0x41,0x21,0x9a, - 0x3d,0x20,0xca,0xad,0xbc,0xbf,0xbe,0xb0,0xf4,0x72,0x3a,0x43,0xc7,0xeb,0x5d,0xfb, - 0x03,0x28,0xcf,0x29,0x44,0x25,0xd8,0x2c,0xc0,0x12,0x25,0x7c,0xec,0xe1,0x3f,0x6b, - 0xcf,0x70,0x53,0x2f,0x1f,0x09,0xd4,0x14,0x12,0x8d,0x0e,0xa4,0xdb,0x1f,0x5b,0x06, - 0x05,0x55,0x9b,0x14,0x16,0x2d,0x54,0x56,0x6c,0xd6,0x74,0x4b,0xfe,0x2b,0xd1,0x7a, - 0x9f,0xdc,0x71,0x87,0xe8,0xcc,0x88,0xc9,0xc6,0xd7,0xb1,0xf4,0x46,0xaf,0x1d,0x6d, - 0x08,0x9f,0xc7,0x87,0xb5,0xf2,0xc4,0x3a,0x15,0xdd,0x91,0x5a,0x75,0xb0,0xd6,0xaa, - 0x4e,0xd7,0x02,0xb3,0x3a,0xb1,0xcc,0x2e,0x50,0xdc,0x7d,0xf3,0xde,0xf0,0xb4,0x31, - 0x00,0xd6,0xec,0xd3,0x05,0xd8,0x14,0xe0,0x38,0xd9,0x8b,0x17,0xc9,0xa6,0x12,0x73, - 0xd2,0x36,0x14,0xcb,0xc9,0x65,0x6b,0xf2,0xaf,0x6f,0xa2,0x19,0x4d,0xf6,0xed,0x1e, - 0xce,0xb5,0xda,0x21,0xa6,0x4b,0x07,0xb3,0xa2,0x7d,0xd6,0x19,0x2e,0x09,0x3d,0x20, - 0x85,0x37,0x18,0xf3,0x6b,0x54,0xee,0x1f,0x39,0xac,0x06,0xf2,0x9c,0x88,0x1c,0x32, - 0xc7,0xfc,0x11,0x8f,0xb1,0xb4,0x82,0xc5,0xcf,0x25,0x72,0x2f,0x7a,0xb0,0x10,0x9d, - 0x4c,0x9d,0x48,0x6f,0xf7,0xf9,0xbe,0x46,0x69,0x04,0x01,0xce,0x75,0x21,0xcb,0xe4, - 0x66,0xde,0xcf,0x91,0x7a,0x4e,0xdb,0x39,0xec,0xd2,0x38,0x2b,0xd3,0x68,0x56,0xf5, - 0xcc,0x9f,0xf1,0x0d,0xb9,0x36,0x29,0xd9,0x8d,0xeb,0xa7,0xae,0x82,0x9b,0x34,0xc8, - 0xa7,0xdd,0xb8,0x66,0x36,0xba,0x1c,0xf9,0x16,0x5f,0xf4,0x1f,0xc1,0xbe,0xe8,0x84, - 0xa2,0xff,0x69,0x21,0xd6,0x5e,0x56,0x06,0xa3,0x9f,0x03,0xe2,0x5d,0xe2,0xa7,0xf3, - 0x70,0x85,0xc7,0x0b,0x1f,0x34,0x51,0xd7,0x84,0x25,0xa9,0x00,0xb4,0x55,0xc4,0x5e, - 0x3c,0xa0,0x43,0x40,0xbc,0x1f,0xe2,0x99,0x98,0x29,0x80,0x0e,0x40,0x6d,0x5e,0xef, - 0x0c,0xab,0x5f,0xa0,0x67,0x20,0xc0,0x22,0x58,0xb7,0xa8,0x15,0xf1,0xe1,0x77,0x2e, - 0xf6,0xf4,0x4b,0x6b,0x44,0x2a,0x98,0xc1,0x67,0x49,0x58,0x29,0x33,0x1c,0xfc,0xa1, - 0xa2,0x1d,0x3e,0x98,0xb3,0x02,0x91,0x35,0xab,0x61,0x8c,0xa1,0xa0,0xbe,0xf6,0xd3, - 0x02,0x45,0x77,0xe5,0x32,0x61,0xd9,0xa4,0xa6,0x45,0x8f,0x57,0xb9,0x6e,0x78,0xdb, - 0x80,0x53,0xb8,0x5f,0x96,0xb0,0x52,0x13,0x73,0x4e,0xd4,0xfd,0xaf,0x08,0xcc,0xad, - 0x0b,0x44,0xa8,0x10,0x36,0x2a,0x78,0x64,0x23,0xfa,0x34,0xee,0x50,0xa5,0x86,0x23, - 0x50,0x0e,0x65,0x27,0xd1,0xc6,0x57,0x51,0x39,0xb9,0xb6,0x25,0xce,0x9b,0x96,0x54, - 0xa7,0x45,0x59,0x1e,0x6e,0x1b,0xf5,0xf4,0x83,0xb8,0xf9,0x7d,0x2e,0xde,0xb5,0x2c, - 0x63,0xb9,0xdf,0xf2,0x9a,0x20,0xe3,0x45,0xeb,0x53,0x80,0x9f,0xb3,0x2c,0x99,0xeb, - 0x75,0x12,0xea,0x5c,0x0c,0xab,0x6a,0xd5,0x7b,0xf6,0x3e,0x38,0x05,0xf3,0x07,0xf9, - 0x77,0xa5,0x0e,0xfd,0x9c,0x25,0x07,0xcf,0xce,0xa8,0xa9,0x9d,0x3e,0xc5,0x9a,0x7f, - 0xe2,0x04,0xf3,0xe4,0xb9,0xb0,0xc4,0x45,0xbe,0x2c,0x9f,0x3d,0xd1,0x4b,0x84,0x44, - 0x0b,0x7e,0x98,0xb3,0xe5,0xf3,0xed,0x59,0xeb,0xcd,0xca,0x7c,0x0e,0xbb,0xb1,0x7f, - 0xaa,0xf2,0xb4,0xed,0xea,0x41,0x08,0x11,0xa0,0x29,0x75,0x58,0xd4,0x6f,0x23,0xff, - 0xd4,0x03,0xf4,0x89,0x7b,0xb1,0xff,0x9a,0x4e,0xc3,0xd1,0x2f,0x07,0xb3,0xa7,0xdb, - 0x3d,0xdd,0xad,0x99,0x98,0x2c,0x61,0xfe,0x3c,0xc4,0x6c,0x7c,0x56,0x63,0x45,0xdf, - 0x99,0xec,0xcc,0x13,0x53,0x65,0x73,0xde,0xb2,0x5a,0x6b,0xa4,0x70,0x49,0xb3,0x03, - 0x5d,0xcc,0xd6,0xa7,0x92,0x54,0xf0,0xcf,0xa3,0x4b,0x28,0xdd,0xc1,0x48,0xc5,0x70, - 0xe6,0x7e,0xfd,0x07,0x4e,0xef,0x57,0x25,0xd7,0xd7,0xf6,0xcc,0x2e,0x4b,0x6b,0xad, - 0xa2,0xd3,0xf5,0xb1,0x2c,0x8e,0xa6,0x23,0xe5,0x5b,0x2a,0xdc,0x43,0x73,0x4c,0x6f, - 0x81,0x12,0x7d,0x5a,0x31,0x04,0x8d,0x11,0x3e,0x50,0x77,0xd2,0xae,0x91,0xa3,0x32, - 0x82,0x9f,0x71,0x8b,0xea,0xa8,0x83,0x9d,0x10,0x51,0x5c,0xb2,0xe1,0xd1,0x4d,0x44, - 0x03,0x9c,0x6e,0xab,0x67,0xca,0xe9,0xc5,0x95,0x52,0xab,0xd6,0x99,0xf3,0xba,0x33, - 0xa5,0x0c,0xe2,0xcd,0x33,0x6b,0x02,0x89,0x3f,0x13,0x51,0xef,0x3b,0xff,0xa5,0xb4, - 0xf4,0xe9,0x2b,0xd7,0xc5,0x84,0x17,0x08,0x4c,0x38,0x96,0xac,0x30,0x78,0xb6,0xeb, - 0x51,0x86,0x4e,0xa4,0x81,0x22,0x8e,0x50,0x84,0x14,0x9e,0xbc,0x33,0x79,0x22,0xb0, - 0xb0,0x1e,0xd9,0x6f,0xbc,0x87,0x07,0x81,0xec,0x34,0x97,0xad,0xb4,0x7a,0x31,0xa5, - 0x56,0x86,0x09,0xc3,0x34,0x59,0xe4,0xb1,0x4c,0xa4,0x9f,0xbd,0x89,0x7b,0xab,0x4c, - 0x51,0x4a,0x69,0xb7,0xe7,0x7d,0xf5,0xef,0xcb,0x23,0xf1,0x1d,0xe6,0x1c,0x44,0xf8, - 0x88,0x10,0x5d,0x58,0x1a,0x5a,0xda,0x7a,0x6e,0x27,0xa1,0x01,0x7b,0x73,0x27,0x89, - 0xa4,0x13,0xfd,0x33,0xd9,0x21,0x93,0x6c,0xe4,0xd4,0x3f,0x67,0xd8,0xa8,0x45,0x99, - 0x08,0x19,0xf7,0x26,0x9a,0x7c,0x27,0x96,0xa8,0xbf,0xb7,0x7b,0x07,0x3e,0xa7,0x30, - 0xfb,0x86,0xa0,0xfb,0x14,0x7b,0xf0,0xde,0x69,0xc6,0xb4,0x27,0xab,0xc0,0x3a,0xf0, - 0xee,0x10,0x17,0x4a,0x34,0xa3,0x40,0x0d,0x63,0x14,0x47,0xc9,0x55,0xe1,0x54,0x5a, - 0x25,0x73,0x89,0x83,0xfd,0x7b,0x11,0xbe,0xa7,0x4a,0xb1,0x27,0xd4,0xc2,0x79,0x92, - 0x91,0x98,0xc9,0x56,0x78,0x28,0x6d,0xb7,0xec,0xe6,0x46,0x37,0x2a,0x1c,0x58,0xdd, - 0x84,0xd3,0xba,0xdb,0x66,0xe6,0x74,0xe5,0xbd,0x58,0x98,0x78,0x90,0x10,0xec,0xaf, - 0x47,0xc4,0xb0,0x73,0xab,0x06,0xc7,0x35,0x8d,0xdc,0xa6,0xe4,0x53,0x39,0x26,0x21, - 0x50,0x8e,0xf2,0xed,0x37,0x9f,0xca,0x39,0x27,0x39,0x17,0x15,0x3d,0x40,0xb6,0x57, - 0xa3,0x7c,0xef,0xe6,0xf4,0x29,0x31,0xe6,0xc1,0x9c,0xc2,0x29,0x0a,0x5a,0x72,0x6c, - 0xf3,0xe4,0xd9,0xec,0x7f,0x6e,0xa2,0xc2,0xdf,0x85,0x49,0xd1,0x54,0xe8,0x39,0xf3, - 0x05,0xb4,0x2e,0x9a,0x42,0x30,0x63,0xe0,0xe8,0x16,0xba,0xc1,0xa2,0x16,0x1d,0x33, - 0x52,0x25,0x63,0xe6,0x6b,0x51,0x48,0x23,0x69,0x75,0x4c,0xd0,0xdc,0xca,0x87,0x88, - 0xfd,0x81,0x6b,0xe3,0x0f,0xad,0x3a,0x5d,0x32,0xa7,0xbb,0xc0,0x22,0xeb,0x64,0x6e, - 0x8c,0x7b,0x77,0xca,0x66,0xce,0x6e,0x9a,0x4c,0x3d,0x5d,0x70,0x88,0x18,0xde,0xb8, - 0x8d,0x85,0xc6,0x3c,0xa8,0xc8,0xa3,0x1b,0xa6,0xd4,0x99,0x7a,0x8a,0xb0,0x58,0xbb, - 0x2d,0x81,0xd8,0xad,0x98,0x3f,0xb3,0x87,0xa5,0x8c,0x14,0x9c,0x04,0x45,0x9d,0x29, - 0x2c,0x89,0xd3,0xb0,0x12,0x59,0xec,0x4b,0xcd,0x8d,0x50,0x20,0x62,0x13,0xdf,0xa6, - 0x4f,0xb3,0x0f,0x03,0xa7,0x8f,0x6d,0x78,0xc1,0x4f,0xb4,0xa7,0x45,0xf0,0xdb,0x93, - 0x37,0x8a,0x13,0x12,0x4d,0xc3,0xe5,0x80,0xe8,0x2c,0x7a,0xba,0x74,0xe1,0xe5,0x72, - 0x82,0x92,0x5a,0x03,0xc4,0xef,0x34,0xc5,0x1f,0x90,0xb5,0xb3,0x7e,0xb0,0x4b,0xe5, - 0x52,0x9a,0x6d,0xaf,0x45,0xa8,0x5f,0x8b,0x10,0x55,0x7d,0x22,0xb3,0xfb,0x93,0xb8, - 0x87,0x4b,0x48,0x54,0x76,0xbe,0x14,0x42,0x34,0xdb,0x18,0x66,0x8a,0xd4,0x34,0xd7, - 0xd2,0x1c,0xee,0xad,0x57,0x2a,0xf8,0x10,0xbf,0x91,0x1e,0xe9,0xb9,0x5e,0xd1,0xa1, - 0xc7,0x33,0xe7,0x3f,0xb6,0xb2,0x15,0xa7,0xed,0x5d,0x59,0xa5,0x75,0x22,0x5b,0xb3, - 0xf7,0x6c,0x96,0xad,0xb9,0xd5,0x5e,0xf4,0x46,0x28,0x9b,0xf3,0x9c,0x71,0xf1,0xd5, - 0xd9,0x64,0x20,0xd0,0xb1,0xda,0x32,0x6a,0x70,0x75,0x32,0x53,0x7c,0xb9,0x71,0x98, - 0x2b,0x09,0x51,0x1a,0x4d,0x16,0xba,0x1a,0x33,0x99,0x7c,0x3a,0x33,0xb8,0xfc,0x8b, - 0xdf,0x1a,0x0c,0x0a,0x2f,0x85,0x79,0x39,0xe4,0xd0,0x77,0x3a,0xba,0xf2,0x4b,0x85, - 0x87,0x6f,0x10,0x7d,0x44,0x1a,0xd3,0x9f,0x60,0x9a,0x53,0x3d,0x4b,0xfa,0xe2,0x4e, - 0x71,0x05,0x22,0x1e,0x60,0x03,0x5c,0x6f,0x60,0xbe,0x76,0xb1,0x87,0x00,0x64,0xdb, - 0x8c,0xdc,0x42,0x4c,0x67,0xb7,0x35,0x18,0x92,0x51,0x19,0x0f,0xa5,0x8d,0x07,0x8a, - 0x22,0x93,0xb7,0x7f,0xf0,0x21,0x3d,0xea,0x6c,0x96,0xa9,0x71,0xfe,0x0a,0x51,0xb3, - 0x20,0x19,0xeb,0xc7,0x46,0xb6,0xbb,0x2b,0xe3,0xba,0xc5,0x0c,0x2d,0x23,0xb9,0x5e, - 0xdd,0x7d,0x60,0xa8,0x16,0x99,0x12,0x52,0xab,0x96,0x80,0x88,0x18,0x7b,0xbe,0xe1, - 0xe9,0x05,0x53,0xba,0x6e,0xc1,0x19,0xc3,0x93,0x9d,0x34,0xdd,0xdf,0x8c,0xae,0x1f, - 0x64,0xf6,0xda,0xa5,0x9a,0xd3,0x6f,0xbe,0xab,0xf4,0xf5,0x53,0x50,0x72,0x57,0x23, - 0xc1,0x4f,0xd0,0x38,0x34,0xaa,0x22,0x6f,0x1c,0xfe,0xc0,0xb6,0x17,0xe1,0x09,0x64, - 0x80,0x00,0x40,0x31,0x67,0x4a,0xef,0x82,0xcd,0x05,0x80,0xd0,0x64,0x65,0xcc,0x97, - 0xc1,0x45,0xe0,0x96,0xc7,0xe3,0xf4,0x32,0xc0,0x91,0xce,0x16,0xa8,0xc8,0x4e,0x23, - 0x43,0x8c,0x81,0x7a,0x9a,0x4a,0xbd,0xe1,0x3e,0x66,0x87,0xd0,0x3b,0x6f,0x01,0xd0, - 0xb0,0x09,0x6e,0xc2,0x72,0x88,0xbb,0x6e,0x0d,0xca,0x16,0xd0,0x20,0xec,0x63,0x1b, - 0x6a,0x9c,0x86,0x3c,0xe7,0x6e,0xbd,0x36,0xac,0xbc,0xb4,0x44,0xfb,0xed,0xaf,0x0c, - 0x8e,0x1f,0xb4,0x69,0x94,0x8f,0x44,0x0a,0x4d,0x05,0x83,0x57,0x78,0x28,0x25,0xb8, - 0x50,0xa1,0x52,0x09,0xe1,0xb1,0xa5,0xd8,0x20,0x0a,0xe8,0x13,0xb5,0x5f,0x5b,0x87, - 0x72,0xf0,0x90,0xdd,0xd5,0xf0,0x7a,0x37,0x19,0x3f,0xa5,0x75,0xa9,0xc4,0x18,0xdd, - 0xad,0x1c,0xa4,0xbd,0xd8,0x6c,0x2c,0xfb,0x21,0xca,0xfa,0x55,0xb1,0x28,0x10,0xc0, - 0xac,0x1d,0x94,0xc7,0x0b,0x82,0xbd,0x89,0x91,0x5d,0x7a,0x82,0xa2,0xec,0x19,0xc0, - 0x2d,0x1e,0xbd,0xd3,0x71,0xd8,0xd3,0x73,0x1c,0xfa,0x89,0x6e,0xa8,0x9b,0x11,0xc9, - 0x2c,0x14,0xa8,0x03,0x6a,0xf3,0x25,0xe3,0x1e,0x12,0xf3,0x86,0x2a,0xec,0xbb,0xbc, - 0xd7,0xa0,0xbe,0xc3,0xae,0x4f,0xa0,0xc2,0x23,0xac,0x2b,0xeb,0xe5,0xad,0x2c,0xa1, - 0x80,0xc0,0xe9,0x7f,0xd0,0x27,0xe7,0xdf,0x3c,0xae,0xc7,0xb4,0x77,0xe1,0x72,0x90, - 0x1d,0x14,0xbf,0x0b,0x07,0xbf,0xe8,0xcf,0xa9,0x5d,0x3c,0xd6,0xab,0xcd,0x55,0x05, - 0x5c,0x7f,0xf4,0xef,0x93,0xde,0x7d,0xf5,0x61,0x8e,0x29,0xca,0x7e,0xd5,0x1a,0xdf, - 0x45,0x55,0x73,0xe0,0xb0,0x30,0x3c,0x66,0x9e,0x15,0x63,0xe5,0xff,0x78,0x0f,0xaf, - 0x42,0x35,0xd4,0xd0,0xbe,0x74,0xf9,0x44,0x9b,0x7e,0x3a,0x86,0x98,0xd3,0xe2,0xfd, - 0xa4,0xed,0x97,0xa7,0xd3,0x63,0xf2,0x51,0x3a,0xf5,0xbd,0xfb,0x34,0x82,0xc6,0xb1, - 0xa5,0xba,0x12,0xdd,0xed,0xbc,0xea,0x11,0xe5,0x8c,0x83,0x67,0xf7,0xd8,0x64,0x2c, - 0x29,0x1a,0x40,0x2a,0xf3,0x7a,0x6e,0x8f,0x95,0x57,0x5b,0xec,0x38,0x8c,0x46,0x94, - 0x1a,0xaf,0x41,0xee,0xb4,0x4f,0xc9,0x3a,0x6c,0x20,0x32,0x2f,0x6e,0x73,0xb8,0x4e, - 0x6a,0x01,0x98,0xf1,0xbe,0xea,0x28,0x2c,0xe6,0xd0,0x5a,0xaf,0xe8,0x87,0xb0,0x6f, - 0x52,0xe0,0x72,0xef,0x2f,0x64,0x67,0x3b,0x69,0xff,0x1f,0xa2,0xee,0xd6,0xd5,0xa8, - 0x62,0xe7,0x97,0xf1,0xd1,0x78,0x7f,0x6c,0x16,0x8a,0x64,0x1f,0x96,0xd7,0xe6,0x5d, - 0xca,0xb2,0x6a,0xbe,0xcc,0xb6,0x0c,0x17,0x45,0xfb,0x76,0x76,0xab,0xe9,0xc7,0x4d, - 0xf5,0x87,0xfd,0x7d,0x3a,0x91,0xfb,0x6c,0x11,0xf3,0xe1,0xe5,0x11,0xfb,0x94,0x2a, - 0xd4,0x73,0x9f,0xe0,0x50,0x7b,0x67,0x17,0x56,0xae,0xf8,0xe6,0x90,0x0b,0x20,0xc0, - 0x87,0xc6,0xd5,0xfb,0xbf,0xe2,0x17,0xd3,0xd8,0x80,0x10,0x54,0x3e,0x08,0xf2,0x5a, - 0x87,0x85,0x2b,0x65,0x78,0xcd,0x47,0xcf,0x45,0xcf,0xc2,0x56,0x5b,0x1d,0x96,0x27, - 0xb7,0x34,0xfb,0x71,0xb6,0x80,0xd9,0xa9,0xe6,0x14,0xcf,0x20,0x75,0x9d,0x39,0x71, - 0x7a,0x5c,0xcf,0x6e,0x96,0x43,0x51,0xb5,0x39,0x82,0x04,0x68,0xb6,0x00,0x45,0x24, - 0xf5,0x94,0x4f,0x3d,0xcb,0x70,0xdb,0x3d,0xfb,0x38,0x56,0x9c,0x69,0x76,0xdb,0xb7, - 0x01,0x8c,0xde,0x53,0x7c,0x20,0x06,0x41,0x2c,0x40,0xed,0x67,0x64,0x29,0xd9,0xb8, - 0x7a,0x0d,0x53,0x58,0x7a,0x0d,0xd2,0x55,0x1a,0x23,0x31,0x92,0x1b,0xe5,0x69,0x4d, - 0xa8,0x73,0xed,0x11,0x05,0xf3,0xf9,0x35,0x55,0x63,0xa3,0x7f,0x70,0xfc,0x7d,0x0b, - 0x6f,0x89,0x79,0xa0,0x63,0x48,0x1d,0x55,0x95,0x75,0x21,0xaa,0x6b,0x51,0x78,0x18, - 0xe6,0xed,0x02,0xcd,0xac,0xaa,0x7a,0x08,0xb2,0xcf,0x65,0xb7,0x0d,0x39,0x34,0xf8, - 0x08,0x07,0x63,0xff,0x79,0xeb,0x79,0x2e,0xa7,0xc5,0x8b,0xd4,0xda,0x31,0x13,0x66, - 0xae,0x0a,0x15,0x02,0x3b,0x05,0xb3,0x39,0x6c,0x94,0x9b,0xf0,0xf9,0x97,0x38,0xa2, - 0x92,0xc1,0xc1,0x41,0xc6,0x07,0xa5,0x70,0x86,0xc4,0x58,0x08,0xbc,0xfc,0xdd,0xae, - 0xfb,0x26,0xba,0xc0,0xe4,0x56,0x92,0xf0,0x6d,0x1b,0xa3,0x28,0xfa,0x6d,0x18,0x43, - 0x2b,0x31,0x46,0x4b,0x19,0xb8,0x54,0x9a,0x52,0xae,0x77,0xa9,0xb4,0xaf,0xab,0x3b, - 0x8f,0x5b,0xeb,0x9d,0x1c,0xe9,0x04,0x86,0xcf,0xc1,0x03,0x5b,0x50,0xed,0x20,0x86, - 0x0f,0x06,0x9e,0x0d,0x8f,0x3d,0x0c,0x5d,0xe9,0x56,0xfb,0x5d,0x07,0xf0,0x37,0x90, - 0xdb,0xff,0x6c,0x8a,0x6a,0xb2,0xd0,0x20,0xd6,0xd9,0x01,0xe9,0x73,0x61,0xfa,0x93, - 0xa2,0x68,0xc4,0x6d,0x34,0xd2,0x30,0xe3,0xa0,0x2f,0x1e,0xc9,0x21,0x0e,0x6d,0xac, - 0xad,0xff,0xc3,0x8e,0x54,0xdf,0xbf,0x31,0xe0,0xaa,0x09,0xe8,0x0c,0x0f,0xf4,0x04, - 0x28,0xaf,0xde,0x76,0xb6,0x1b,0x8b,0x8c,0x60,0x25,0xb5,0x20,0xe4,0xf7,0x93,0x5b, - 0x8a,0xd7,0x6c,0x91,0x13,0x48,0xd7,0x32,0x27,0x28,0xd5,0xc0,0x95,0xe5,0xe1,0xa4, - 0xce,0x9b,0x41,0xa5,0xc3,0xbf,0x16,0x1c,0x6b,0x60,0x16,0x1c,0x67,0x8b,0xe5,0x5e, - 0x06,0x38,0xb5,0xb5,0xc0,0xb3,0xd6,0xf1,0xe3,0x6a,0x4f,0x44,0x47,0x04,0x0e,0x48, - 0xd1,0x19,0x41,0x71,0xdd,0x6e,0x0e,0x97,0xcf,0x99,0x09,0x69,0xb6,0xc2,0xfd,0x69, - 0xeb,0x32,0x94,0x04,0xce,0xf8,0x4b,0x47,0xc6,0xc2,0x2e,0xc1,0xf0,0x5f,0xa7,0x78, - 0x62,0x17,0x5c,0xfd,0x66,0x05,0x67,0x27,0xc4,0x01,0xbf,0xaa,0x20,0xc0,0x49,0x9f, - 0xc6,0x1d,0x0c,0xca,0x61,0xa3,0xaa,0xdd,0x8d,0x24,0xf6,0x7f,0xf9,0x0f,0xbd,0xed, - 0x8f,0x33,0x39,0x6e,0x45,0x3c,0xdd,0xb5,0x9b,0x20,0x44,0xd4,0x6e,0x39,0x34,0x25, - 0x8c,0x9b,0x51,0x82,0x1e,0xfd,0x00,0x1a,0x86,0x1e,0x96,0x78,0x83,0xbc,0xb8,0x49, - 0x2e,0xf6,0x9c,0x4b,0x91,0x2c,0x49,0x5a,0x86,0xd5,0xc0,0x12,0xfe,0xf0,0x4f,0x8a, - 0x0e,0x15,0x43,0xfb,0x30,0xfe,0x69,0x1a,0x04,0xf4,0x13,0x7f,0x03,0xdf,0xac,0x42, - 0x83,0xd4,0xaa,0xd4,0xb3,0xa8,0xcb,0x45,0xa1,0xef,0xf6,0xed,0x53,0xe2,0x76,0x83, - 0x6a,0x87,0xea,0x10,0xc5,0xe4,0x7e,0xe5,0x42,0xa3,0x38,0xc4,0xe9,0xb2,0xe3,0x1e, - 0x4e,0x8f,0x01,0xf6,0x5a,0x89,0x00,0x52,0xf0,0x2e,0xcb,0x0d,0xac,0xcd,0x89,0xe2, - 0x57,0xac,0x2e,0x22,0xfa,0x86,0x43,0x56,0xa9,0x52,0xe7,0x32,0x28,0x6c,0x38,0x3a, - 0xe9,0x0b,0x9a,0x06,0x6e,0x8b,0xaf,0x12,0x30,0x9b,0x6b,0x04,0x5e,0x9f,0x30,0xfc, - 0xf4,0x44,0x7f,0x52,0xe4,0x8e,0x66,0x77,0x95,0x4d,0xf8,0x34,0xf2,0xea,0x73,0x6c, - 0x7d,0xab,0x61,0xb5,0x1a,0xf5,0xbd,0x12,0x46,0xb0,0x2e,0x41,0xf6,0x60,0x76,0xd5, - 0xfb,0x7e,0x45,0x55,0x5b,0x9d,0x5a,0x1e,0x3c,0xea,0xc1,0x69,0xd5,0xff,0xe5,0xf9, - 0xd2,0x18,0x02,0xfd,0xf8,0x68,0x6c,0x2e,0xa9,0xcb,0x17,0x31,0xa6,0x68,0xa1,0x47, - 0xf0,0xf5,0x2f,0x07,0x72,0x5d,0x02,0x29,0xb5,0x58,0x99,0x3e,0x80,0x28,0x7d,0x93, - 0x5d,0x97,0x2b,0x87,0x0c,0xbe,0xf4,0xda,0x44,0x47,0x97,0x31,0x58,0xa7,0xa8,0x2f, - 0x55,0xee,0xca,0xdb,0x0b,0x28,0xdb,0xc8,0x3e,0xeb,0x30,0x46,0x0c,0x96,0x7a,0xa6, - 0xa6,0x01,0xc8,0x63,0x28,0x79,0xf2,0xf7,0xb5,0xe1,0x04,0xee,0xda,0x64,0x8a,0x61, - 0xee,0x50,0x9f,0x58,0x26,0x7b,0xca,0x17,0x23,0x09,0x5e,0x8c,0xa4,0x62,0xbe,0x36, - 0xe2,0x03,0x15,0x76,0xac,0xbb,0xf7,0xfb,0xca,0x91,0xeb,0x1d,0x6e,0x67,0x33,0x7e, - 0x36,0x4d,0x27,0xdd,0x67,0x0f,0xa4,0x0b,0xa1,0x2b,0xbb,0x7e,0xef,0x62,0x36,0xb0, - 0xc8,0xbf,0xca,0xca,0xcd,0x6c,0x92,0xc2,0x82,0xd0,0x89,0x46,0xdc,0x32,0xcc,0xa9, - 0x1f,0x53,0x9f,0xae,0x02,0xd1,0x9c,0xbd,0x52,0xcc,0x27,0xeb,0x77,0xe8,0xa5,0xf3, - 0xc2,0xf5,0x45,0xbd,0x77,0x70,0x55,0x86,0x41,0xd5,0xdd,0xb2,0x53,0x8e,0x1a,0xe7, - 0x50,0x1c,0x26,0xd2,0xbf,0xef,0x47,0xb8,0x46,0xde,0xed,0x37,0xf0,0x10,0x3d,0xbe, - 0x85,0x55,0x2c,0x4e,0x10,0xe2,0x0e,0xe4,0xc5,0x44,0x10,0x66,0xe8,0x7e,0x48,0x32, - 0xa1,0xe2,0x3f,0xef,0xc9,0xa0,0x05,0x6e,0x84,0x4e,0x70,0x67,0x28,0x7f,0x25,0x7e, - 0x01,0x9d,0xba,0xfa,0x4c,0xe3,0x0f,0x29,0x45,0xdb,0xad,0x18,0xfa,0x8b,0x37,0x21, - 0x70,0x18,0xbe,0x17,0x30,0x71,0x69,0xc7,0xce,0x15,0xc9,0x05,0x99,0x86,0xb2,0xf3, - 0x8b,0xe5,0x42,0x46,0x83,0xc7,0x4f,0xb8,0xcf,0x5c,0xcc,0xad,0xdb,0x39,0x1c,0x6d, - 0xc2,0x5d,0x9d,0x76,0x3f,0x88,0x47,0xc2,0xcc,0x37,0xbf,0x80,0x7f,0xc8,0x59,0x6b, - 0xfc,0x9f,0xdd,0xe1,0xc8,0x78,0x93,0x2d,0x9f,0xc8,0x3c,0xd2,0x2d,0xf1,0x35,0x29, - 0x1b,0x59,0xd5,0x66,0x0c,0x79,0x7d,0xb1,0xe8,0xeb,0xef,0xdf,0x06,0xf0,0x26,0x77, - 0xcd,0xb1,0x71,0xe8,0x4d,0x3c,0x0d,0x51,0x83,0xe6,0xaf,0x8a,0x8d,0xf7,0x45,0x3a, - 0x8f,0x4e,0x75,0x6c,0xcb,0xe2,0x15,0xe7,0xc8,0xd8,0x72,0x62,0x8c,0x38,0xca,0x2b, - 0x06,0xb3,0x9d,0x3c,0xc6,0xc1,0x45,0x17,0x15,0xf3,0x05,0xd0,0x49,0x33,0x75,0x7c, - 0x6a,0x7c,0x68,0xdb,0x50,0x5b,0xa0,0x11,0xef,0xf2,0x61,0x78,0x00,0xf4,0x5e,0x31, - 0x6f,0x05,0x43,0xfd,0x6b,0xa0,0x21,0x20,0xe1,0xc6,0xf2,0x46,0x4c,0x60,0x0b,0x1d, - 0xdd,0x2a,0x38,0x92,0x65,0x57,0x40,0x41,0x0a,0xc8,0x6c,0x44,0xf6,0xa0,0xa1,0x45, - 0x16,0xd6,0xc9,0xc5,0x12,0x57,0x44,0x59,0xa7,0x3d,0xe9,0x1e,0x56,0xea,0x8c,0x17, - 0x02,0x95,0xf0,0x02,0x40,0xcf,0x3f,0x40,0xea,0xaf,0xd9,0x73,0xda,0xee,0x77,0xcf, - 0x00,0x74,0x4c,0x04,0x95,0x70,0x8b,0x25,0xbb,0x72,0xea,0x67,0x75,0x06,0x50,0xbd, - 0xfa,0x24,0x8e,0x52,0x7c,0x23,0xe8,0x2c,0xb6,0x19,0x80,0xf2,0x11,0xde,0x04,0x21, - 0x31,0xe3,0x03,0x58,0x58,0x0d,0xca,0xf9,0xc5,0xe6,0xcb,0xe5,0x5e,0xb7,0x51,0xd7, - 0xff,0x88,0x69,0x25,0x7c,0x62,0xd6,0x08,0x1a,0x86,0xa1,0x63,0xd1,0x3c,0x72,0x94, - 0xf7,0x73,0x66,0x50,0x12,0xb6,0xf6,0xc8,0x68,0xd3,0xf8,0xf1,0xff,0xee,0x9d,0x3e, - 0xd5,0xd8,0xb9,0x9a,0x6d,0x14,0x63,0x2a,0xe8,0x4e,0xc2,0xbc,0x58,0x70,0x23,0xc9, - 0x0f,0xcc,0xde,0xf0,0xff,0xd0,0x08,0x4d,0x8c,0x85,0x3b,0xca,0xbf,0xca,0x94,0xea, - 0x2e,0x5b,0x93,0xe4,0x9b,0x70,0x8a,0xae,0x4f,0x3c,0x81,0xdd,0x5f,0xa3,0xdb,0xa8, - 0xa2,0xf1,0x9c,0x79,0x75,0x09,0xda,0x43,0xcb,0x1d,0xca,0x6a,0x56,0x02,0xaa,0x62, - 0xbd,0x80,0x8b,0x44,0xcf,0x19,0xba,0x3e,0xce,0xd6,0xe1,0x7c,0xe6,0xac,0x1b,0xbb, - 0xb5,0x3f,0x62,0xbc,0x7e,0xe2,0xdb,0x52,0x4b,0x5f,0x2c,0x6e,0xd8,0x14,0x90,0xab, - 0xaa,0x7e,0xcc,0xae,0x03,0xbd,0x40,0x9d,0xfc,0x41,0xa2,0xcb,0x7a,0x83,0x33,0x2f, - 0x22,0x21,0xb3,0xc4,0x10,0x0c,0xeb,0xa3,0x62,0x09,0x79,0x9a,0x72,0x61,0x13,0x70, - 0x46,0x54,0x97,0x51,0xff,0xcb,0xfc,0x43,0x0e,0x9f,0x67,0x67,0xa4,0x0c,0x5d,0xf9, - 0x07,0xf7,0x1a,0xdc,0x44,0xe8,0x3f,0x27,0xf5,0xbf,0x8a,0xc5,0x0f,0xb0,0xba,0x79, - 0x00,0x4c,0xe5,0xae,0x44,0x17,0x28,0x97,0x6a,0xd1,0x96,0x47,0x3b,0x22,0xb0,0x12, - 0xa7,0x2c,0xdc,0x81,0x38,0x0b,0x0c,0x04,0x76,0x29,0xbc,0xdb,0x9d,0xb0,0xb8,0x80, - 0x09,0x1f,0xd6,0x73,0xc4,0x41,0xdb,0x5a,0x8e,0x6f,0x58,0x8d,0xd4,0x05,0x9e,0xe5, - 0x98,0x1b,0x51,0xa5,0xce,0x09,0x8d,0xc7,0x32,0x35,0xcf,0x57,0x6c,0x59,0x55,0x8f, - 0x5c,0x33,0x4d,0xc9,0x3b,0xd2,0x5a,0x11,0x07,0x76,0xdd,0x3c,0xd3,0xb9,0x7c,0xee, - 0x50,0x87,0xe9,0x6c,0xdc,0xe3,0x81,0xab,0xe1,0xd4,0x76,0x97,0xce,0xf5,0xa9,0xe8, - 0xd6,0x62,0x17,0x2f,0x9e,0x66,0x9a,0xa9,0xe1,0x1f,0x7e,0x86,0xce,0xbb,0x9c,0x6d, - 0x88,0xe1,0xa7,0xbe,0xaf,0x45,0x5f,0xb4,0x68,0x0e,0x48,0x5f,0xc9,0x2b,0x72,0x67, - 0x0d,0xd9,0x1a,0x57,0x00,0xd5,0x19,0xbd,0x23,0x66,0xa8,0x4f,0x42,0xae,0xef,0x0a, - 0x92,0xa4,0x52,0xac,0xb3,0xde,0x4e,0x15,0x87,0xd3,0x77,0x6c,0x7b,0x06,0x6e,0xfe, - 0xf3,0xd9,0x55,0x66,0xb2,0xdf,0x6f,0x09,0x59,0x00,0x3c,0x55,0x4c,0xef,0xa7,0x22, - 0x86,0x65,0x3c,0xcf,0xc6,0x41,0xa3,0x15,0x13,0x5f,0xad,0xea,0x5d,0xbc,0xcc,0xdc, - 0x12,0x2e,0x14,0xa0,0xb1,0x40,0x2d,0xcd,0x04,0xec,0x47,0x01,0xef,0xb2,0xff,0x84, - 0x3b,0xc5,0x7f,0x76,0xeb,0x62,0xaf,0xc0,0xf5,0x01,0x91,0x5b,0xf7,0x7b,0x58,0x19, - 0xa2,0x07,0x16,0xe7,0x95,0xac,0xb4,0x72,0xc2,0xea,0xc1,0xee,0xa4,0x2e,0x58,0x31, - 0x25,0x04,0x5a,0xf8,0x2d,0x83,0xfd,0xa1,0x3c,0x62,0x2f,0xa1,0xd5,0x49,0x59,0x08, - 0xa3,0x21,0x58,0xe6,0x1d,0x2e,0xfb,0x31,0x19,0xa5,0x98,0x4a,0x76,0x65,0x80,0xe1, - 0x33,0xa9,0x82,0x24,0x1c,0xa6,0xcd,0x25,0x3f,0x64,0x99,0x17,0x09,0xe6,0x76,0xb5, - 0xa0,0x60,0x8d,0x64,0x53,0x2e,0xc7,0xf4,0x05,0xf1,0x3f,0xb4,0x57,0xc5,0x95,0xc5, - 0xfa,0x7f,0xd9,0xcc,0xd0,0x2f,0x31,0x63,0x9c,0xcd,0x2e,0x16,0xc9,0x0a,0x77,0xa1, - 0x20,0xaa,0x88,0x51,0xb4,0x20,0x99,0x94,0x91,0x41,0x94,0x06,0xc4,0x6e,0x00,0x7a, - 0xab,0x0c,0x7d,0xf5,0x1c,0x68,0x4c,0xbb,0x54,0xc5,0x67,0x42,0x5e,0x98,0xca,0x74, - 0xcc,0x0f,0x27,0x98,0x36,0x63,0xbd,0x0f,0x22,0xec,0x9a,0x4e,0xdb,0x1e,0x87,0xf9, - 0x80,0x05,0x58,0xf0,0x05,0xd7,0x6d,0xbb,0x1c,0x8f,0x8a,0x2d,0xd8,0x6a,0x83,0x1e, - 0xea,0x8b,0x22,0x62,0x0c,0x76,0x9f,0xc8,0x29,0x6b,0xa6,0xdf,0xea,0xa5,0x96,0xcc, - 0x72,0xf2,0xd2,0x65,0x1c,0x6c,0x27,0x06,0xbf,0x43,0x52,0xfd,0x4d,0xc1,0x14,0xba, - 0xa7,0xa0,0xc9,0xd8,0x19,0x2d,0x2f,0x24,0xea,0x94,0x17,0x3b,0x85,0x67,0x83,0x54, - 0x10,0xa3,0x9b,0xea,0xb8,0x1f,0xe7,0x16,0x69,0x48,0x98,0xfd,0x25,0xc3,0x91,0xbb, - 0xe8,0x34,0x4b,0x2c,0x0a,0x6f,0x03,0x7c,0x67,0x42,0x5b,0x6c,0xc4,0x2e,0xdb,0x82, - 0x57,0x50,0xba,0x82,0xc7,0x8d,0x1e,0xa8,0x8b,0xf6,0x38,0x3b,0x73,0xb0,0x04,0x27, - 0x42,0x31,0x4b,0xf6,0x70,0x71,0xae,0xaf,0x8d,0xfa,0xa3,0xea,0x29,0x75,0xc5,0x6c, - 0x90,0x14,0x7a,0xa1,0x32,0x31,0x4b,0x3a,0xf0,0x86,0x3a,0xdf,0x2d,0xae,0x75,0x79, - 0xff,0xbe,0xf5,0x17,0x93,0x81,0x2b,0xb7,0x8a,0xd6,0xf6,0xea,0x04,0x8f,0x24,0xc2, - 0x44,0x1b,0x45,0xae,0x45,0xa1,0x94,0x1c,0xa1,0x4f,0x38,0xe6,0x7a,0x18,0x6c,0x2d, - 0x11,0x8e,0x15,0xd4,0xd2,0x8a,0xd8,0x78,0xc6,0x8c,0x8f,0xeb,0x09,0xe1,0xf1,0xbe, - 0x01,0xcd,0x1a,0x31,0x8d,0xf0,0x51,0x87,0x9f,0x5d,0x9d,0x8e,0xd6,0xa2,0x6d,0x28, - 0x81,0x6c,0x4d,0x25,0x73,0x75,0x45,0xf5,0x6e,0x16,0x0e,0xee,0x8d,0x0a,0x11,0x6e, - 0x0c,0x1e,0xdc,0x8d,0x9b,0x3e,0x14,0xee,0xfa,0x0c,0x06,0x2e,0xf8,0x70,0x76,0xbf, - 0x4a,0x3a,0x8a,0x7e,0xbb,0x3a,0xbb,0x20,0xee,0x4f,0x5c,0x55,0x5a,0x0b,0x23,0xc9, - 0xcb,0x29,0xd7,0x10,0x19,0xb2,0x34,0xa6,0x30,0xf1,0xcd,0x52,0x5b,0x38,0x77,0xbe, - 0xeb,0x14,0x4c,0xef,0x1a,0x3d,0x4f,0x27,0x12,0xa0,0xff,0xbf,0x90,0x76,0x47,0xcc, - 0x45,0xf0,0x9d,0xf7,0x09,0x78,0xba,0xcc,0x48,0x9f,0xce,0x61,0x64,0xd1,0x66,0xdf, - 0xaa,0x59,0xb1,0x9b,0xc6,0x8b,0x06,0xd9,0x82,0xf7,0xe4,0x4d,0x0d,0xd2,0x6f,0xab, - 0x2b,0x11,0x7f,0x37,0xaa,0x73,0xc5,0x01,0x3e,0x93,0x00,0xc0,0x11,0x3a,0x67,0x1b, - 0xc0,0x11,0x30,0xa3,0x69,0xe0,0x07,0xfc,0xc9,0xad,0x7b,0x9f,0x04,0xd2,0x58,0x26, - 0xd8,0x31,0x7f,0x06,0xe3,0xa3,0x98,0xa8,0xd0,0x54,0x48,0x2e,0xf3,0xa1,0x3f,0x72, - 0x69,0x2c,0x10,0x3b,0xea,0xe3,0x79,0xf4,0xd7,0xc2,0xc7,0xde,0x61,0xac,0x78,0x9e, - 0x21,0x2b,0xe5,0x9a,0xa7,0xa1,0x94,0x38,0xaf,0xb6,0x6e,0xd8,0x35,0x3d,0x3e,0xf3, - 0xd5,0x98,0x75,0xd3,0x4c,0x5e,0xda,0xc8,0xba,0xc3,0xc2,0x4c,0x58,0x75,0x76,0xe7, - 0x00,0x15,0xb9,0x72,0x10,0x1f,0xef,0x02,0x06,0xdf,0xdf,0x19,0x8f,0x78,0xf8,0xd0, - 0x87,0x06,0xd2,0xa8,0x74,0x5b,0x94,0x9a,0x4b,0x88,0xcf,0x39,0xaa,0x99,0x10,0x30, - 0xa1,0x89,0x0a,0x63,0x6a,0x9f,0x41,0x97,0xce,0x87,0x4a,0x3d,0xd0,0x7d,0x33,0x7d, - 0x24,0x5c,0x7a,0xd3,0xb6,0xb9,0x1b,0x0b,0xd5,0x8a,0x50,0x09,0x42,0xa5,0x37,0x6c, - 0x67,0x87,0x8d,0x75,0xeb,0xf5,0x5a,0xe8,0xca,0x3d,0xfa,0xa3,0x6f,0xfe,0x52,0x18, - 0x15,0x24,0xaa,0x6d,0x99,0x56,0x3e,0x7d,0xcc,0xc7,0xe0,0x07,0x25,0xab,0xf4,0x39, - 0x73,0x5f,0xdd,0x09,0xf7,0xce,0xa3,0xec,0xce,0x3f,0x09,0x56,0xfd,0xa8,0x3c,0xa9, - 0x85,0x3b,0x47,0x84,0x9c,0x0b,0x04,0x69,0x8e,0xc4,0xa3,0x4d,0x7c,0x74,0x42,0xb7, - 0x2c,0x37,0x5d,0xac,0x7d,0x1d,0x10,0x6b,0x4f,0xec,0xa9,0x55,0xd3,0x11,0xb6,0xc2, - 0x82,0x00,0xd0,0xbc,0x7c,0x5d,0xc5,0x0a,0x47,0x15,0x01,0x39,0xa2,0x5b,0xe7,0xb3, - 0x8e,0xcc,0x70,0xcb,0xbf,0x23,0xe3,0xef,0xb1,0x5c,0x16,0x90,0x2b,0xb8,0x8c,0xa4, - 0x6e,0x59,0x7c,0xa0,0xcb,0x78,0x63,0x7f,0x42,0x8e,0x40,0xe5,0xde,0x8f,0x1e,0xa5, - 0x87,0xf5,0x2c,0x52,0x57,0xd0,0x34,0x60,0xe7,0x96,0xac,0x37,0xf6,0xd4,0x76,0x12, - 0x86,0x6a,0x77,0xa4,0x4a,0x39,0x91,0xfc,0x90,0x8d,0xa4,0xa7,0x73,0x3a,0x7f,0x43, - 0x07,0xf7,0xdd,0xf5,0x4b,0xf0,0x82,0x87,0x79,0x2f,0x24,0xc5,0x95,0xd2,0x68,0x0e, - 0x58,0x95,0xcd,0x3c,0x69,0x3e,0x03,0xc6,0xc4,0x11,0x8c,0x77,0xe5,0x7e,0x25,0x46, - 0x26,0xd6,0x48,0xb9,0xf4,0xfa,0x76,0x90,0x55,0x78,0xa3,0xcb,0x9d,0xb0,0x64,0x75, - 0xc6,0x9a,0x56,0x52,0x71,0x0d,0x56,0x22,0x3b,0x2a,0x58,0x89,0xd4,0xf1,0xa5,0x3f, - 0x1b,0x90,0x5e,0x55,0xb6,0xbe,0x8d,0x0b,0x1c,0x9b,0xcf,0x56,0x84,0x59,0x0d,0x92, - 0x2b,0x9a,0xf5,0xd2,0x49,0xd7,0x24,0xa0,0x42,0xbb,0x45,0xd3,0xf1,0x6c,0xfb,0xd8, - 0xa2,0x47,0xde,0xa9,0xe3,0x27,0x24,0x55,0x93,0x55,0xd6,0xad,0x48,0xf7,0x8e,0xe8, - 0x4f,0x9d,0x86,0x1a,0x24,0xb5,0xa9,0x49,0xe9,0x84,0xba,0x3a,0x22,0x60,0x7d,0x8b, - 0xd0,0x35,0x37,0x73,0x34,0x41,0x65,0x54,0x1b,0xa7,0x37,0xae,0x33,0x01,0x51,0x9c, - 0x58,0x94,0xf6,0x51,0x48,0xf4,0xec,0x48,0x61,0xd6,0x9f,0x74,0x21,0x98,0x6c,0xcb, - 0x8d,0x92,0x62,0xca,0x49,0x0c,0x91,0x2a,0x7e,0x91,0xc1,0x6a,0x38,0x34,0xca,0x18, - 0x8c,0x93,0xbe,0xfa,0x5f,0x10,0x27,0xb0,0xc8,0x9c,0x7a,0xfa,0x40,0x52,0x0f,0x09, - 0x2a,0x90,0x27,0x22,0x55,0xff,0x61,0x9b,0x49,0x53,0xef,0xea,0x00,0x9e,0x57,0x7f, - 0x4e,0x30,0xa6,0xbf,0xbb,0x1d,0xc0,0x6b,0xce,0xdd,0x3f,0x03,0xa7,0xbe,0x3a,0xfb, - 0x63,0xcb,0xdd,0x64,0x0a,0x3b,0x77,0x60,0x00,0x90,0x87,0x8e,0xa5,0x6f,0x30,0xe1, - 0xa2,0xe1,0x70,0x72,0x9e,0xa7,0x02,0x0c,0xaa,0x05,0x8e,0x44,0xf6,0x7a,0x16,0x85, - 0xa1,0xdd,0x31,0x63,0xf8,0xab,0xe2,0x35,0x7d,0xc9,0x01,0xcd,0x1d,0x2f,0x3b,0x2f, - 0x22,0x18,0xcb,0x55,0x9b,0xd8,0x23,0x81,0x77,0xec,0x6c,0x53,0x2e,0x68,0xfb,0xa2, - 0xae,0x0b,0xca,0x1a,0x91,0x2a,0x2e,0x48,0x21,0x0b,0xb7,0x9b,0xa7,0xf2,0x70,0x00, - 0x83,0x0a,0xa0,0xb6,0x90,0x28,0xba,0xb7,0x81,0x65,0x74,0x06,0x8d,0x9a,0xd1,0xc3, - 0x0a,0xde,0xa9,0x43,0x11,0x42,0x47,0x49,0xc4,0xd7,0x2a,0xc5,0x3f,0x76,0x89,0xa4, - 0xde,0x01,0x19,0xd7,0x92,0x40,0x51,0x60,0x3f,0x56,0xe3,0xeb,0x24,0x26,0x86,0x56, - 0x85,0x6a,0x06,0x88,0x47,0xb1,0xb6,0x4a,0xb7,0x09,0x13,0xc4,0x95,0x25,0xf5,0xe8, - 0x6e,0xb8,0x80,0x1d,0xba,0x68,0xa1,0x76,0xb0,0x25,0x99,0x3e,0x15,0x72,0xa8,0x8c, - 0x1b,0x35,0xe3,0x4c,0x14,0x27,0xbe,0x56,0x55,0x16,0x3f,0xbf,0x9a,0x62,0xcb,0x79, - 0x7e,0xf6,0xb1,0xf5,0x3d,0x64,0xdf,0xc8,0x6a,0x0b,0x35,0x5b,0x54,0x9d,0x66,0x14, - 0xab,0x05,0xf8,0xae,0x98,0x24,0x92,0xac,0x9f,0xec,0x42,0xe8,0x5f,0x80,0x28,0x28, - 0x08,0xad,0xb2,0x3e,0x58,0xdd,0x38,0x65,0x4a,0x80,0x8e,0x3e,0x20,0x7c,0x40,0x3a, - 0xbf,0x60,0x33,0x2f,0xdb,0x0e,0x42,0x1a,0xfa,0x22,0x8d,0xcd,0x52,0xc5,0x8b,0xa5, - 0x36,0x0b,0xc1,0x7f,0x38,0x29,0xcb,0x1b,0xa3,0x42,0x80,0x4b,0x13,0x95,0xec,0x94, - 0x26,0x58,0xbc,0x6f,0x14,0x36,0x9c,0x74,0x81,0x5f,0xae,0x46,0xdc,0x8d,0x06,0x92, - 0x82,0x50,0xf3,0x76,0x90,0xb9,0x56,0x4b,0xc2,0x57,0x30,0x26,0x27,0x7b,0xa4,0xd1, - 0xa1,0x1d,0x89,0xe2,0x11,0xb8,0x75,0x01,0xbe,0x5f,0xed,0x81,0x19,0x3b,0x33,0xf9, - 0x1e,0xae,0x89,0x77,0xce,0xba,0x4d,0x28,0x00,0x5c,0xdc,0x8e,0xd4,0xd3,0x64,0xb2, - 0x06,0x38,0x7b,0x26,0x16,0x76,0x06,0x56,0x89,0x30,0x60,0x9b,0xd1,0x35,0xcf,0x93, - 0x67,0x31,0x76,0xb4,0x39,0x77,0xcb,0x03,0xe7,0xd8,0x8c,0x29,0x36,0xed,0x44,0x82, - 0xb0,0x3a,0x85,0xc5,0x81,0x33,0x6d,0x1f,0x81,0x91,0x5b,0x35,0xc8,0x75,0x0a,0xd1, - 0x2a,0x57,0xd3,0x9f,0xb5,0xf5,0x0f,0x47,0x08,0x33,0xd1,0x30,0xe2,0xef,0x93,0x67, - 0xc9,0x7b,0x46,0x74,0xb0,0x3e,0x76,0xaa,0x11,0x55,0x0e,0x5d,0xdb,0x38,0xb7,0xe8, - 0xa9,0x06,0xee,0xdd,0x94,0x34,0x9e,0x41,0xb0,0x5f,0xe0,0xba,0x90,0x76,0xfe,0xf6, - 0x25,0x6c,0x8f,0x58,0x19,0xc5,0x77,0x09,0xf6,0x55,0xa8,0x9f,0x98,0xf4,0x55,0x9b, - 0x3b,0x13,0xc5,0x63,0x1a,0x36,0xe8,0x4b,0x8a,0x1b,0xcd,0x8e,0x12,0x1f,0x6a,0x55, - 0xae,0xc0,0x65,0x48,0x15,0xae,0x6e,0xaf,0xbc,0xdc,0xd8,0x29,0x75,0x86,0x4e,0xd8, - 0x22,0x6a,0xb6,0xfb,0xc6,0x32,0xe9,0xf9,0xe6,0x51,0x8a,0x5c,0x11,0x7e,0x47,0xc9, - 0x2e,0x82,0xa7,0x66,0xef,0xe3,0xa8,0xcd,0x65,0x5c,0x82,0x4c,0xd8,0x84,0xf4,0xd9, - 0x22,0x8c,0x5f,0x7d,0xdd,0xfd,0x37,0x86,0xa8,0x3f,0xdf,0x8e,0x96,0x13,0x58,0x1b, - 0xfe,0x46,0x30,0x84,0xea,0xff,0x02,0x0f,0xfb,0x6d,0xb8,0x23,0x52,0x3b,0xf3,0x80, - 0x0d,0x8b,0xd0,0x94,0xeb,0xbe,0x98,0xc1,0xc9,0xcc,0xc7,0xdb,0x57,0xba,0x4e,0x27, - 0x09,0x2f,0x9e,0xe5,0x38,0x5f,0x49,0x8f,0x73,0xb6,0xed,0x03,0x35,0x7d,0xad,0x97, - 0x80,0x58,0x97,0xd7,0x36,0xc6,0xc2,0x14,0x64,0x3c,0x2f,0xdc,0x66,0xa1,0xdb,0x46, - 0x75,0x6a,0xe8,0xe4,0xe3,0xab,0x0f,0x10,0x68,0x5b,0x7c,0x75,0x77,0x6c,0x0e,0x96, - 0x04,0x47,0x88,0x16,0xf9,0x28,0x1b,0x32,0x0b,0x38,0x78,0x1b,0xc1,0xe3,0x5b,0xb9, - 0x77,0xea,0x55,0x38,0x35,0xe7,0x9d,0x1c,0x1c,0x1b,0x46,0xc6,0x22,0xe5,0x33,0xce, - 0xf7,0xc5,0x91,0xd5,0x96,0x60,0x1e,0x8c,0x32,0x51,0xf1,0xd8,0x36,0xe8,0x8a,0x27, - 0x89,0xd9,0x1f,0xec,0x9e,0xa0,0x97,0x2c,0xd8,0xac,0xb5,0xfc,0x63,0x59,0xb0,0x87, - 0x0b,0x32,0xfa,0xe1,0xe6,0xaf,0x5a,0x9a,0x13,0xc4,0xe3,0x3e,0x5b,0x50,0xe3,0x4f, - 0xbd,0xc8,0x1e,0xff,0x94,0xa5,0xf3,0xc6,0xa3,0x8b,0x6a,0x80,0xe7,0xfa,0xf1,0x9f, - 0xd1,0x2e,0xa3,0xe0,0x3c,0xaa,0x71,0xc5,0x6e,0xcd,0xea,0xbd,0xff,0x29,0x71,0xe0, - 0xaf,0x73,0xda,0x9e,0xe9,0xa3,0x89,0x4e,0xc3,0x71,0x92,0x2e,0xe8,0xe1,0x51,0x01, - 0x09,0xc6,0xe2,0xbc,0x9d,0xa5,0x81,0x5e,0x2c,0x6a,0xb0,0x63,0xfc,0xeb,0x19,0x2b, - 0x9e,0x32,0xdb,0x9f,0xc2,0x26,0x94,0x94,0x3f,0x18,0xb9,0x91,0x7d,0xe3,0x68,0x4a, - 0xc4,0x1f,0x99,0x21,0x3c,0xca,0xec,0x88,0x4b,0x42,0xf3,0xd5,0x2a,0xe0,0xa0,0xbd, - 0x15,0xd1,0xae,0x82,0x97,0xf1,0x4c,0x20,0x9a,0x1f,0x0f,0x44,0xd8,0x0d,0x2e,0xed, - 0xff,0x6e,0xbf,0xed,0x94,0x6e,0x66,0x63,0xc6,0xd7,0x2c,0xd4,0x8a,0xf7,0x9a,0xc4, - 0x7e,0x9a,0xff,0x4a,0xc8,0xf0,0x6f,0x8d,0x47,0xb7,0xcd,0x83,0x76,0xa5,0xbd,0x6e, - 0xa5,0xd2,0xf7,0x9d,0xc9,0xf1,0x35,0xdc,0x86,0xf3,0x4c,0x96,0x54,0x9d,0x64,0xb9, - 0x5a,0x3b,0xbe,0xee,0x5e,0xbd,0x6c,0xef,0x05,0xb4,0x92,0x8e,0x75,0x24,0xc8,0xa0, - 0xa9,0x4a,0xba,0x0b,0xcb,0xf1,0x87,0xad,0x24,0x4a,0x27,0xa3,0x71,0x6c,0xc5,0xb1, - 0xd4,0x39,0x9b,0xc1,0xd5,0x73,0xe2,0x1c,0x07,0x05,0x35,0x1f,0xbd,0xb4,0xfd,0x20, - 0x23,0x1a,0x16,0x3a,0xe3,0x02,0xd2,0x31,0x64,0x91,0x87,0x73,0x8c,0x0a,0xfd,0x8b, - 0x4f,0xf9,0xb1,0x2c,0xc9,0xb7,0x4e,0x0a,0x93,0x67,0x51,0x8a,0xf3,0x55,0x7c,0x34, - 0xc6,0xfd,0xbd,0x74,0x9c,0x66,0x2e,0xd8,0xd6,0x22,0x9e,0x54,0x14,0x93,0xb4,0x78, - 0x28,0x17,0xfd,0xe3,0xc0,0xf8,0x57,0xeb,0x13,0xd7,0xfd,0x3c,0xd1,0x71,0x17,0x60, - 0x50,0xf7,0xf5,0x08,0xc1,0xf9,0x3f,0x9f,0xeb,0x19,0xde,0x9b,0x7f,0x0c,0x34,0x64, - 0xc5,0xf8,0x3b,0xf4,0x09,0xfe,0xc1,0xce,0xef,0xd1,0x06,0xe6,0x36,0x15,0x3c,0x51, - 0xc4,0xf9,0x5a,0xbc,0xcc,0xd8,0x56,0xfc,0xee,0xd3,0xc6,0x2e,0x88,0xf2,0xf7,0x38, - 0x2a,0x13,0x39,0x98,0x9a,0xdb,0x5f,0x09,0x6f,0xba,0x67,0x6d,0xf7,0x43,0xd4,0x39, - 0x8b,0x12,0xd7,0x24,0x32,0x42,0x21,0x39,0xed,0x9d,0x4b,0x9d,0xbc,0x20,0x78,0x27, - 0x63,0xf0,0x10,0xc3,0x12,0xd5,0x80,0xa2,0x41,0xa5,0x6d,0xd9,0x93,0xbb,0x30,0x40, - 0x05,0x0e,0x37,0xb4,0xb0,0x81,0xae,0x52,0xcc,0x97,0x34,0x4a,0x30,0x65,0x79,0x83, - 0x89,0xdf,0x85,0x42,0x11,0x2c,0x29,0xdf,0x42,0x4a,0x76,0x21,0xad,0xfd,0x99,0x6e, - 0xd4,0x08,0x0e,0xaa,0x91,0x03,0xb5,0xae,0xc0,0x23,0xfb,0x37,0xd0,0x23,0x3a,0xb0, - 0x0a,0x0b,0xd5,0x4a,0x32,0xa6,0xc7,0x9f,0xa3,0xc7,0x2f,0x9b,0xad,0x9b,0x15,0x71, - 0x7c,0x05,0x58,0x12,0x79,0x49,0xfc,0x0b,0xe0,0x04,0x27,0x8b,0xac,0x9a,0x67,0x0d, - 0x81,0x44,0x45,0xc1,0xa5,0x86,0x81,0x7e,0x46,0xe9,0x2e,0x9a,0x2d,0x99,0xd9,0xd3, - 0x8a,0xda,0x93,0x5d,0x4d,0x3c,0xb1,0x7d,0xc5,0xef,0x26,0x8a,0x2c,0x98,0x86,0xf6, - 0x77,0x28,0x01,0xce,0x9b,0x6e,0xfe,0x2a,0x40,0x24,0xb2,0x39,0xd5,0xe5,0x71,0xe1, - 0x01,0x4b,0xd0,0x25,0x65,0x6b,0xdc,0x53,0x36,0x58,0x61,0x18,0xd6,0x6b,0x3c,0x51, - 0xab,0x6a,0x34,0x29,0x79,0xd5,0x5b,0xcb,0xec,0x08,0x74,0xd2,0x39,0xbc,0x08,0x3e, - 0x7c,0x02,0x93,0x6f,0x38,0xf4,0xc0,0x0f,0xcf,0x03,0x2c,0x3c,0x54,0x67,0x7a,0x98, - 0xf1,0x03,0x68,0xaa,0x3e,0x2f,0x23,0x95,0x2d,0x97,0x2d,0x93,0xa5,0x93,0x40,0x59, - 0xa8,0x4c,0x0a,0x65,0xac,0x6c,0x3a,0x38,0x56,0xc6,0x25,0x83,0xa4,0x92,0x23,0x08, - 0x73,0x03,0xc4,0x5c,0x1f,0x9e,0xd3,0x6d,0xf5,0x3b,0x2c,0x92,0x25,0x91,0x10,0x5a, - 0xf0,0x03,0x0b,0x19,0xc6,0x6d,0xdf,0x9b,0x49,0x47,0x24,0x82,0x24,0x90,0xfe,0x68, - 0xf7,0x5f,0x29,0x6c,0x23,0x72,0xc4,0x84,0x81,0xcf,0x0a,0x4c,0xfa,0xbf,0x0d,0x76, - 0x31,0x5e,0x4a,0x21,0xda,0x55,0xbc,0xc2,0x17,0xfe,0x9e,0x56,0xf6,0x24,0xad,0xbc, - 0xb0,0x5d,0x02,0xad,0x0d,0x70,0x52,0xde,0x98,0xfd,0xf5,0xe5,0x4e,0x7d,0x0c,0x77, - 0x24,0x30,0x4d,0x88,0xe2,0x93,0xb9,0xd3,0x91,0xcc,0x0d,0x37,0xf4,0xc8,0x3c,0xf2, - 0xd9,0x56,0x3b,0x3b,0xcd,0xcb,0x2c,0xef,0x61,0x2f,0x2b,0x1b,0x8d,0x8b,0xc4,0xd6, - 0xc2,0x1a,0x33,0x2b,0xcc,0xca,0xe3,0xe3,0x38,0x5a,0x23,0x0b,0x8c,0x8a,0x1c,0x99, - 0x86,0x10,0x3a,0x3a,0x4d,0xc9,0x51,0xe5,0xd9,0x77,0x2a,0x1a,0x0d,0x89,0x2d,0x75, - 0xa6,0x18,0x32,0x2a,0x4c,0xc8,0x6f,0xc8,0x1c,0xda,0x22,0x0a,0x0c,0x88,0x5f,0x17, - 0x4f,0xde,0x4d,0xa8,0x3e,0xa3,0x29,0x48,0xc3,0xa4,0xcc,0xa8,0xdb,0x7e,0x5e,0x90, - 0x39,0x92,0xd6,0x99,0x3d,0x42,0x51,0xf9,0x88,0xf6,0x87,0x2d,0x32,0xd3,0x97,0x0b, - 0x8a,0x08,0xb0,0x09,0xfe,0xf2,0x2c,0xf6,0xcc,0x18,0x47,0xfd,0xfe,0x8a,0x6e,0x7b, - 0x05,0x90,0xf1,0x22,0xb1,0x5b,0x81,0x51,0x63,0x94,0xd1,0x99,0x18,0xd4,0xf2,0x2a, - 0x2e,0xa7,0x39,0x33,0xc5,0xc3,0x00,0x0a,0x9d,0x1d,0x29,0x13,0x85,0x83,0x46,0xc8, - 0xd6,0xab,0x31,0x23,0xc4,0xc2,0x01,0x51,0x18,0x5d,0x21,0x03,0x84,0x82,0x68,0xb6, - 0x25,0xa8,0x38,0x32,0x45,0xc1,0x8c,0xeb,0x95,0x46,0x28,0x12,0x05,0x81,0xb0,0xfd, - 0x26,0xa2,0x30,0x22,0x44,0xc0,0x9f,0x1c,0xb9,0x1e,0x20,0x02,0x04,0x80,0xa4,0xff, - 0xfb,0xc1,0x0c,0x83,0xb7,0x50,0x0b,0xa6,0x5f,0xa0,0xd8,0x26,0x3f,0x04,0x50,0x16, - 0xec,0xc8,0xf1,0x16,0x97,0x96,0xf9,0x3c,0x41,0xdb,0x58,0x09,0x71,0x8d,0xb1,0x92, - 0xa1,0x29,0x56,0x0b,0x3f,0xe2,0x61,0xbb,0xc8,0x80,0xb5,0x27,0x57,0xec,0x1b,0x23, - 0x46,0x2c,0xc3,0x75,0x66,0xc6,0x99,0xf4,0xc7,0x36,0xe4,0xb0,0x38,0xf8,0xd5,0x22, - 0xb2,0x7e,0x3c,0xde,0x32,0x59,0xf9,0x10,0xe5,0x85,0x0f,0x99,0xa9,0x1b,0xe8,0x2f, - 0xf4,0xc7,0x12,0x72,0x95,0xad,0x6b,0x8f,0x47,0x1e,0x07,0x89,0xa8,0x1a,0xbe,0x01, - 0xf1,0x62,0xf3,0x52,0xa5,0xa3,0x5e,0x1c,0x1f,0xbd,0x0e,0x98,0x29,0x19,0xb5,0x44, - 0x05,0x83,0x55,0x28,0x34,0xe6,0xa9,0x77,0xb0,0xae,0x06,0x88,0x28,0x18,0x82,0x79, - 0xaf,0x0b,0x9a,0xf5,0xe3,0x74,0x36,0x6d,0xce,0xc0,0xd6,0xb8,0x1e,0x4c,0xd1,0x3d, - 0xac,0x76,0x14,0xf6,0x83,0x54,0x1c,0xe5,0x6b,0x8f,0x7a,0xd6,0x0c,0xa8,0x15,0xf8, - 0x00,0x87,0x98,0x51,0x9a,0x93,0x81,0x49,0x27,0xe9,0xaa,0xcd,0x3c,0x55,0xbb,0x69, - 0xbe,0x8e,0x51,0x3b,0x00,0x56,0x8c,0x05,0xe7,0x3e,0x53,0xae,0x3c,0x44,0x6a,0x28, - 0xec,0xd9,0x1d,0xb1,0xe1,0x53,0x5d,0x15,0x97,0xb7,0x0d,0x91,0xa1,0x13,0xfa,0xb2, - 0x85,0x40,0x15,0xa1,0xe0,0x52,0xaa,0x7e,0x38,0xa4,0x05,0x81,0xa0,0x12,0xe7,0xbb, - 0x71,0x81,0x1c,0xb0,0x61,0x51,0x33,0x96,0xbe,0x15,0x0c,0x90,0x21,0x11,0x90,0x28, - 0xbe,0x5b,0x14,0xa0,0x60,0x50,0x1b,0xc4,0x2c,0x42,0x04,0x80,0x20,0x10,0x44,0x60, - 0x00,0x1b,0x64,0x7a,0x6c,0xf1,0x9c,0xaa,0xe1,0x12,0x6f,0x55,0x0b,0xbc,0x6c,0x70, - 0x01,0xd3,0x54,0xe4,0x06,0xe6,0x3c,0x74,0x61,0x90,0x9c,0xe6,0xd4,0x79,0x44,0x61, - 0x08,0x19,0xfc,0x2d,0xd7,0x4d,0x6c,0x39,0x03,0x9e,0xa4,0xe1,0x80,0xf4,0x76,0x42, - 0x03,0x83,0x55,0x7f,0x43,0x38,0x2d,0x8a,0xe7,0xbd,0x9d,0x55,0xd1,0xf5,0x83,0x3d, - 0x02,0x60,0x1b,0x39,0xc9,0x4b,0xaf,0xe0,0x19,0xd7,0x0b,0x19,0x89,0x0b,0x74,0xc6, - 0x39,0x28,0x13,0x29,0xc8,0x4a,0xfc,0x0e,0x4a,0xd3,0x03,0x09,0x88,0x0a,0xc5,0xdd, - 0x2a,0xeb,0x1a,0x38,0x49,0x49,0xa8,0xeb,0x9d,0x7c,0x0a,0x18,0x09,0x09,0x15,0xf4, - 0x27,0x78,0x12,0x28,0x48,0x48,0x75,0x54,0x46,0x28,0x02,0x08,0x08,0x08,0x18,0xff, - 0x0f,0x08,0x59,0x68,0xdd,0xa8,0x6f,0x79,0xc9,0x5e,0xe6,0xab,0x9d,0xf7,0x70,0xce, - 0x2b,0x42,0xf1,0x5c,0x0e,0xf9,0x1e,0x28,0xe5,0xd1,0xee,0xbb,0x1e,0xd9,0x79,0xfe, - 0x53,0xd8,0x5f,0xab,0xcf,0x8c,0x24,0x23,0x49,0x53,0xe7,0x50,0x07,0xfc,0xa1,0x1f, - 0xf2,0x9b,0x17,0x71,0xad,0xf6,0xbf,0x7c,0xc9,0xb7,0xc7,0x9b,0x7f,0x0c,0xf6,0xb8, - 0x1d,0x80,0x19,0x31,0xc1,0x43,0x4c,0x08,0x93,0xd3,0x09,0x11,0x81,0x03,0xc0,0x3c, - 0xaa,0x3e,0x11,0x21,0xc0,0x42,0x44,0x18,0xc3,0x56,0x01,0x01,0x80,0x02,0x9f,0xc3, - 0x09,0x85,0x18,0x30,0x41,0x41,0xe7,0x69,0x80,0x5f,0x08,0x10,0x01,0x01,0xef,0x22, - 0xce,0x12,0x10,0x20,0x40,0x40,0x80,0x19,0xcb,0x9d,0x00,0x00,0xa0,0xea,0x80,0x0d, - 0xba,0x40,0x3b,0xa1,0xe7,0xdd,0x4e,0xb6,0x98,0xeb,0xa8,0xdb,0xa5,0x03,0xbf,0x11, - 0x8c,0x0d,0x33,0xa5,0x1f,0x8e,0x7e,0xc1,0x83,0xc1,0xe6,0xa4,0xa4,0xc2,0x04,0x84, - 0x0f,0x00,0x97,0x95,0x7b,0xa0,0xf7,0x67,0x21,0xed,0x6a,0x5a,0xb8,0xe0,0x61,0x6e, - 0xc2,0x63,0x4d,0x17,0x9f,0x8e,0x67,0xaf,0x2a,0xb5,0x5d,0xc6,0xdf,0x67,0xe8,0xca, - 0xe9,0x90,0x20,0x7b,0x36,0x4a,0x2e,0xe1,0xf7,0xed,0x8b,0x64,0x54,0xf4,0xed,0x44, - 0x84,0x13,0xe0,0x96,0xcf,0x27,0xcd,0xe5,0xaa,0xe4,0x27,0x0a,0x7d,0xba,0x1f,0x5a, - 0x86,0xad,0x81,0x7a,0x9a,0x4a,0xc3,0x81,0xb2,0xe2,0x68,0x1a,0xba,0x6b,0x19,0xcf, - 0x78,0xa3,0x99,0x5d,0xd3,0xdc,0x07,0x93,0xc7,0xc2,0x66,0x45,0x52,0xc8,0x1a,0x05, - 0x6b,0x68,0x50,0x3d,0xb9,0xd7,0x4c,0xb3,0x58,0xe7,0x56,0x5f,0x3e,0xc9,0xf1,0x47, - 0x4a,0x96,0x35,0x2d,0x5b,0x86,0x44,0x0f,0xc8,0xe6,0x4e,0xc2,0xa4,0xc8,0x94,0xf6, - 0x69,0xd9,0xbd,0xbc,0xb6,0xf5,0x70,0xd8,0x2c,0xfe,0xab,0xd2,0x31,0xc9,0xa4,0xdb, - 0x0a,0x4d,0xc9,0x63,0xf3,0x49,0x2d,0xc8,0x29,0x0b,0xd9,0xce,0x9b,0xb6,0xb5,0xb7, - 0xc2,0xdb,0xc2,0x4e,0x1e,0xd7,0xe1,0x8a,0x22,0xce,0x17,0x12,0x38,0x88,0x6c,0xe2, - 0xf8,0x38,0xc9,0x4c,0x64,0x6d,0x9e,0x8b,0x45,0xb8,0x6d,0xfc,0x2c,0x6d,0xb8,0x5a, - 0x70,0xb1,0xc7,0x52,0x94,0x2d,0x2d,0xf9,0x3f,0xed,0xad,0xe1,0x5a,0xfc,0x0a,0x32, - 0x04,0x89,0xeb,0x59,0xe4,0x0f,0x9a,0x06,0xe5,0xe9,0xec,0x4c,0xa8,0x6f,0x96,0x78, - 0x20,0x52,0x84,0xbf,0x54,0xab,0xcb,0xa1,0xbc,0x52,0xcc,0xa1,0x74,0x30,0x34,0x6f, - 0xd4,0x72,0x33,0x7c,0x35,0x5d,0x7a,0x39,0x62,0x31,0x48,0x27,0xd0,0xae,0x06,0xef, - 0x5d,0xb3,0x85,0x01,0xe0,0x6f,0xc8,0xa5,0x5d,0x3c,0x6c,0x9a,0xe6,0x8f,0x22,0xee, - 0x78,0x8c,0x59,0xcb,0x9f,0xef,0x9d,0xb5,0x16,0xfe,0x22,0x84,0x50,0x8c,0xe1,0xd4, - 0xa5,0x02,0x40,0xc0,0x3e,0xc8,0xef,0xf3,0x98,0xe9,0x00,0x1a,0x8f,0xd5,0x8a,0x17, - 0xe1,0x15,0x9c,0x94,0x3f,0x75,0xa1,0x78,0x75,0x15,0x8a,0x78,0x98,0x27,0x15,0x45, - 0xd3,0xbb,0xfb,0x45,0x3f,0x90,0x73,0x5b,0x13,0xfd,0x10,0x16,0xec,0xab,0x45,0x61, - 0x4a,0x76,0xcb,0x6d,0x5a,0x74,0xdd,0xd9,0xf9,0x17,0x5d,0xe5,0xbc,0xda,0x56,0x80, - 0x64,0xa5,0xef,0x67,0x50,0xfa,0xc2,0x08,0xc9,0xf8,0x2d,0x09,0x8f,0x85,0xda,0x62, - 0xc0,0xc8,0xc8,0x6f,0x73,0x9d,0x9a,0xca,0x82,0x0b,0x25,0x0d,0x73,0xd6,0x11,0xeb, - 0x53,0x87,0xf9,0x19,0x4d,0x99,0x49,0x25,0xe0,0x5e,0x81,0x29,0x13,0x38,0x25,0x49, - 0x0a,0x93,0xdb,0x15,0x9b,0x8b,0xa2,0xc9,0xed,0x50,0xdb,0xae,0xc5,0x99,0x5e,0x48, - 0xe2,0x5e,0x96,0xae,0x30,0x97,0xd6,0x71,0x83,0xbe,0x96,0xab,0xb0,0x5f,0x70,0xa6, - 0xe3,0xe0,0xae,0x2d,0x75,0x1d,0x4a,0x8b,0x47,0x54,0xd2,0x8f,0x5d,0x7e,0xe7,0xda, - 0xa0,0x7a,0x81,0x47,0xd1,0xfc,0xbb,0x7b,0xea,0x56,0xdf,0xe8,0xfe,0xde,0x37,0x5d, - 0xfb,0x80,0x91,0x55,0x29,0x94,0x1f,0xea,0xed,0x1b,0xe7,0x7c,0x90,0xdd,0x97,0x26, - 0x22,0xc0,0xde,0x83,0xfd,0xb3,0x98,0xa8,0x94,0x54,0xe6,0xa3,0xbf,0x82,0x9f,0x13, - 0x88,0x8d,0x7e,0xb3,0xe2,0x5c,0xb8,0xf4,0xd7,0xc2,0x47,0x45,0x3b,0x82,0x21,0x27, - 0x0b,0x80,0xb7,0x65,0x6b,0x0f,0x16,0x38,0xaf,0xb6,0x8f,0x8f,0xbc,0xef,0x41,0xe2, - 0x8f,0x67,0xbf,0x87,0x7e,0x21,0xda,0xc8,0xe7,0xd3,0x42,0x48,0xbd,0x61,0x60,0x82, - 0x0a,0xc4,0x47,0xd6,0x7d,0xe6,0x48,0x9c,0xbb,0x65,0x30,0x7e,0xe3,0x19,0xd1,0x95, - 0xc5,0x85,0x8e,0xd3,0x14,0xc5,0x83,0x0d,0x2f,0x47,0x2c,0x88,0xaa,0x64,0xe1,0x85, - 0x32,0x47,0x61,0x34,0x90,0xc8,0x49,0x9c,0x33,0xa5,0xe7,0x05,0x29,0x3b,0x21,0x56, - 0x83,0xc7,0x69,0x46,0x9e,0x0a,0x07,0xf7,0x32,0x64,0xd1,0x84,0xc9,0x3a,0x7c,0x8e, - 0x8d,0x23,0x19,0xbf,0x12,0x07,0x30,0xd7,0x4c,0xcc,0xcc,0xbe,0xa9,0x4b,0x02,0x5c, - 0x0b,0x7c,0xe8,0x9a,0x19,0x89,0x7f,0x9a,0x1d,0x49,0xfe,0x2d,0x1f,0xab,0xe7,0x1c, - 0xe7,0x08,0x67,0xfc,0x96,0x0e,0xb3,0xd6,0xc4,0x3e,0x77,0xdc,0xd2,0x45,0x3a,0xe7, - 0x8d,0x3e,0x58,0x20,0xad,0x70,0xe4,0x3f,0x4d,0x8b,0x13,0xbb,0x34,0xf9,0xc9,0xbb, - 0xb1,0xec,0x36,0x2e,0x56,0x07,0xb6,0x99,0x44,0x82,0xa0,0x79,0xb5,0xbe,0x0b,0xab, - 0xdf,0x8d,0xd0,0xad,0x4d,0x00,0x2a,0x90,0xb4,0x69,0x9c,0x1c,0xa8,0x10,0x3d,0xa4, - 0xac,0xc2,0xa0,0x4e,0x1e,0xce,0xb3,0xcb,0x18,0x71,0x44,0xf7,0x23,0x8d,0x35,0x40, - 0x8b,0x24,0x2b,0x2f,0x9b,0xa6,0x8c,0x04,0x07,0x18,0xed,0x1d,0x20,0x32,0x25,0x71, - 0xee,0x3b,0xa5,0x77,0x3a,0x54,0x7f,0x53,0x2e,0x64,0x07,0x37,0x88,0x32,0x0b,0x63, - 0xc9,0x9d,0x79,0x67,0x3b,0x55,0x6c,0x3a,0x47,0x61,0x86,0x45,0xbf,0x5a,0x42,0x8b, - 0xcf,0x57,0xfb,0x17,0x35,0xb6,0x6b,0x37,0x65,0x76,0x16,0x31,0x28,0x14,0x73,0xa0, - 0x25,0x38,0xf3,0x07,0x34,0x1e,0x6b,0xc0,0x83,0x7b,0xdf,0xb3,0x21,0x25,0x44,0xdb, - 0xee,0xd6,0xa1,0x64,0xb6,0x44,0x52,0x63,0xea,0x79,0x95,0x17,0x30,0xfa,0x52,0xac, - 0x84,0xf0,0x2e,0x56,0x5c,0x57,0xbc,0xea,0x94,0xd1,0xbd,0x7c,0x1c,0xc7,0xc5,0xd0, - 0xac,0xf2,0xbb,0x56,0x24,0x1d,0xce,0xf0,0x1b,0xd9,0xab,0x72,0xfe,0x5d,0x53,0xac, - 0x04,0x35,0xe9,0x26,0xa5,0xa1,0x7a,0xe0,0xe1,0x93,0x85,0xf5,0xab,0x5c,0x14,0x9a, - 0xa9,0x8e,0x74,0xdf,0x56,0xb3,0x60,0x4a,0x3e,0x2d,0x11,0x31,0x97,0x4e,0x70,0x95, - 0x7f,0xd7,0x99,0x3e,0xce,0xfb,0x45,0x3e,0x3d,0x84,0x0c,0x4d,0x91,0x52,0x04,0x91, - 0x74,0x2e,0xe4,0xb0,0xd4,0x65,0x21,0x55,0x14,0xf9,0xe9,0x35,0xf8,0x55,0x4e,0x3b, - 0x7b,0x24,0xac,0xf1,0x40,0x1a,0x80,0x8a,0x4c,0x24,0x89,0xb7,0x16,0x7e,0xa0,0xb9, - 0x2c,0x37,0xb8,0x47,0x1c,0xbf,0x50,0x6b,0xe2,0x71,0xb0,0x64,0x15,0x3e,0x16,0xeb, - 0x29,0x32,0xf8,0x7f,0xc0,0x30,0xc1,0x18,0x71,0x9d,0xa0,0x76,0xed,0x56,0x1f,0xcf, - 0x4e,0x4b,0xe0,0xeb,0x57,0xbc,0xcc,0x09,0x42,0x73,0xbf,0x1e,0xb0,0xde,0xaf,0xa5, - 0xc5,0xbd,0x3b,0x21,0x47,0x1e,0x7f,0xad,0x6c,0xd1,0xba,0x1f,0xdd,0x4f,0xc3,0x3f, - 0x02,0xdb,0xc7,0xea,0xa8,0xd2,0x2e,0x18,0x20,0x4a,0xd8,0x21,0x54,0x80,0x08,0x94, - 0x51,0x5c,0x5c,0x87,0xb0,0xfe,0xe1,0x7b,0xbc,0x7d,0xa6,0x90,0x73,0x6c,0x01,0x3a, - 0xe8,0x99,0x41,0x1d,0x1b,0xdd,0xee,0x53,0xa2,0x74,0x86,0x9e,0x90,0x10,0xb6,0x20, - 0x20,0xfc,0x36,0x24,0x30,0xdc,0xc4,0x30,0x41,0x83,0x1b,0xc9,0x43,0x98,0xe7,0xd1, - 0xeb,0x96,0x7f,0x75,0x58,0x8b,0xf4,0x02,0xa9,0x06,0x8e,0xe0,0x0e,0xcf,0xe4,0xf5, - 0xd6,0x66,0xb6,0xc4,0x70,0x35,0x6b,0x44,0xb2,0x2b,0xfb,0x85,0x5d,0x45,0xf2,0xcc, - 0xb1,0x46,0x87,0x3b,0xf8,0xa4,0xe5,0x03,0x29,0x24,0x94,0x5f,0xb9,0x34,0xe2,0x9b, - 0x38,0x86,0xdf,0xc0,0x78,0xc5,0x3b,0x71,0xc0,0x27,0xf9,0x5d,0xb8,0x25,0xb9,0xad, - 0xff,0xf5,0x39,0xa9,0xef,0xd5,0xcf,0x29,0x7f,0x7e,0xf2,0x2e,0x18,0xb3,0xb1,0xa8, - 0xc5,0xa6,0x31,0xad,0x53,0x86,0xbb,0xa4,0xd1,0xbb,0xd8,0x23,0x13,0xc2,0x11,0x4b, - 0x63,0x78,0x95,0x99,0x73,0xe8,0x4e,0xe9,0x54,0xf8,0xf2,0xd0,0xda,0xbe,0xca,0x1b, - 0xa9,0xa6,0xcd,0x62,0xf1,0x19,0xae,0xa0,0x7d,0x99,0x59,0x26,0xb2,0x89,0x68,0xbb, - 0x44,0xd1,0xf8,0xfd,0x5c,0x83,0xd2,0x7d,0x72,0xe8,0x51,0x9d,0x40,0xf9,0x74,0xfd, - 0x29,0x00,0xec,0xcc,0x97,0x20,0xbc,0x89,0x81,0x6d,0x1e,0x7d,0xdb,0x3f,0x11,0x52, - 0x61,0xcc,0x01,0x5e,0xd0,0x6a,0x12,0xff,0x02,0x7c,0x8d,0xe1,0x6e,0xc5,0x5f,0xf9, - 0xd7,0x1f,0xb5,0xd9,0x37,0x22,0x05,0xeb,0xc3,0xeb,0x85,0xf9,0x87,0xc4,0x47,0xff, - 0x0e,0xb6,0x92,0x46,0xb3,0x76,0xaf,0x11,0x72,0xff,0x5a,0x1f,0x74,0x01,0x34,0x6f, - 0xd4,0x72,0x3b,0x95,0xbc,0x3d,0x22,0x31,0xee,0xd7,0x1e,0x48,0xe3,0x8a,0x3d,0x7f, - 0x5d,0xb3,0x32,0xa1,0x3f,0x30,0x54,0xb2,0xdc,0x70,0xab,0x01,0xd2,0x7f,0xf6,0xee, - 0xc9,0x61,0xe5,0x8a,0xb3,0x87,0x1d,0xf1,0x98,0xf7,0xf5,0xb7,0xb1,0xa8,0x04,0xb3, - 0x52,0x95,0x9a,0x54,0xa0,0x9f,0x6a,0x61,0x42,0x59,0xf2,0x75,0xf6,0xd0,0x29,0x3e, - 0xba,0xe8,0xc8,0x25,0x7d,0x23,0x7f,0xf0,0xab,0x44,0x68,0x96,0x8c,0x00,0x0d,0x3e, - 0x43,0x95,0x83,0x47,0xd9,0xf4,0xd2,0xa7,0x70,0xfd,0x97,0xe2,0x53,0xa9,0x60,0x3c, - 0xab,0x13,0x93,0x5d,0x11,0x33,0x7a,0x00,0x7f,0x97,0x1f,0xdb,0xbd,0x42,0x78,0x05, - 0xdd,0xbb,0xc2,0xf3,0x58,0x3a,0xd4,0xae,0xa0,0xfa,0xf7,0x51,0x7b,0xac,0xda,0x38, - 0x88,0x38,0xeb,0x6f,0x2b,0x3a,0x26,0x47,0xd5,0xbb,0xdd,0x82,0x67,0x62,0xc6,0x7a, - 0xbe,0xb7,0xf9,0x04,0x59,0xb9,0xb3,0xcb,0x1f,0x3f,0xd5,0xb2,0xb2,0xd7,0x5f,0x84, - 0xb9,0x60,0x8e,0x8d,0xc6,0x3b,0xae,0x31,0x51,0x69,0x1f,0xfa,0xd7,0xa7,0xc4,0x25, - 0x22,0x47,0x41,0x3d,0x78,0x2a,0xbe,0x62,0xea,0xec,0x97,0x68,0x22,0x3e,0x09,0xd6, - 0x7d,0x29,0x0c,0xdd,0x50,0xdf,0x5e,0xeb,0x5b,0xe9,0x5d,0xf5,0xb3,0x2f,0x22,0x20, - 0xa9,0x6a,0x99,0x5c,0xb8,0x95,0xff,0x63,0x81,0xca,0xa8,0xd7,0x59,0x3c,0x88,0xf6, - 0xf1,0x4a,0xae,0x2c,0xa9,0x3c,0x01,0xf6,0xa7,0x11,0x7f,0xee,0xe1,0x1b,0x60,0x33, - 0x26,0x7f,0xde,0x8f,0xe1,0x03,0x05,0xbf,0x42,0x50,0x98,0x24,0x3f,0x57,0x3e,0xea, - 0x05,0xc3,0xea,0xe7,0xb6,0xe1,0x00,0xcc,0xb8,0x60,0xe8,0x54,0x11,0x3a,0x1b,0xa6, - 0x73,0x37,0xe0,0xf4,0x86,0x0f,0x5d,0xdc,0xea,0x64,0x35,0xaa,0x3d,0xa1,0x2a,0x7d, - 0x78,0x22,0x9b,0x29,0x36,0x02,0x01,0xcc,0x30,0xa0,0xd8,0xca,0x77,0xe7,0xbd,0x43, - 0x31,0xb2,0x9e,0xc3,0x34,0x72,0xb0,0xfc,0x8e,0xa6,0xb5,0x5c,0x3d,0xb6,0x56,0x6a, - 0x67,0x8f,0x49,0xcf,0x13,0x05,0x42,0x81,0x95,0x61,0xd8,0x6e,0x3c,0xa7,0x3c,0x83, - 0x06,0x56,0x9e,0xdf,0x92,0x66,0x96,0x92,0x1c,0xd6,0x5b,0x96,0xd8,0xa6,0x96,0x21, - 0xe5,0xb1,0xb2,0x95,0x14,0xe1,0xbb,0x45,0x0f,0x25,0x7e,0x86,0xcd,0x72,0x1a,0xf5, - 0xf9,0xeb,0x67,0xfd,0x02,0x75,0xc9,0x55,0x24,0x0a,0xb0,0xd2,0xce,0x13,0x54,0x97, - 0xf8,0x0a,0xec,0x9f,0x9d,0x3d,0x7c,0xc9,0x07,0x34,0xfc,0xcf,0x1b,0x5d,0xd8,0x74, - 0xec,0x86,0xf5,0x83,0x77,0xf8,0x4d,0xbf,0x39,0x69,0xe3,0x31,0x9e,0x1e,0x8d,0xe8, - 0x9b,0x7e,0xed,0x9b,0x99,0xcb,0x2d,0xb2,0x26,0xf9,0xe5,0xaa,0x1c,0xef,0x9b,0x01, - 0xf3,0xb0,0x55,0x6a,0x91,0xae,0xc4,0x9b,0xa6,0xc8,0xac,0xe2,0xcf,0x47,0xcb,0xc6, - 0x97,0x7f,0x82,0x41,0x1d,0x00,0x7b,0x48,0xa4,0x48,0xbe,0x0d,0x55,0x81,0xbe,0x4a, - 0x12,0x3c,0x54,0x4e,0x13,0xa2,0x4d,0x5f,0xa5,0xc1,0x37,0x6b,0x3f,0x41,0x4b,0xc6, - 0xad,0x7f,0x3b,0xff,0x3e,0x8d,0x45,0xfb,0xec,0x4d,0x9d,0xfb,0xdc,0xe5,0x20,0x6e, - 0xbe,0xab,0x84,0x82,0x4b,0xf0,0xf4,0xbb,0x62,0x6f,0x60,0xf8,0xe7,0xcf,0x3f,0xa2, - 0x26,0x6e,0x77,0x96,0xcd,0x70,0x39,0xa1,0x7b,0x95,0x07,0x06,0xad,0x5e,0x6d,0x81, - 0xf0,0x3f,0x02,0x0b,0x48,0xa3,0x06,0x41,0xe2,0x02,0xa7,0xe5,0x1f,0x10,0x17,0x23, - 0x3f,0xcc,0xf6,0x97,0xb3,0x23,0x1b,0x3f,0x69,0x0e,0x7f,0xb5,0xcd,0x5e,0xa7,0xe9, - 0x78,0xd6,0xda,0x46,0x74,0xbd,0x15,0x12,0x6e,0x75,0x4f,0x04,0xda,0x09,0x0a,0xb0, - 0xd0,0x68,0xae,0xb6,0x1d,0x37,0x2a,0x6e,0x8c,0x07,0xba,0x05,0x3d,0x78,0x66,0x00, - 0x59,0xf5,0x20,0x57,0x97,0x77,0xb2,0x10,0xb8,0x5b,0x8d,0x17,0xf2,0x57,0x7b,0xb1, - 0x58,0x4a,0xf5,0x6f,0xd7,0x37,0xc8,0x6a,0x50,0xe2,0xab,0x67,0x1c,0x75,0x0b,0xf5, - 0xb5,0xe3,0x1f,0xf1,0x54,0xb5,0x4e,0x8d,0x91,0xd7,0x66,0x0e,0xdd,0x38,0xed,0x91, - 0x73,0x9d,0xd0,0x13,0x46,0x39,0x40,0x27,0x8c,0x7a,0x9e,0xae,0x0a,0xef,0x23,0x84, - 0xf6,0xce,0xd9,0x17,0x49,0xd9,0x6d,0xaa,0x84,0x28,0x6c,0x25,0x83,0xf5,0xe8,0x3b, - 0xf1,0x99,0x90,0x58,0x77,0xe9,0xfc,0x48,0xbb,0xae,0x60,0x5f,0x29,0x79,0xb2,0x34, - 0xd3,0x3d,0xbe,0x9e,0x55,0xfe,0xb1,0x6e,0x3e,0xf2,0xac,0xea,0x16,0xee,0x38,0x4a, - 0xc4,0x1f,0xb0,0x52,0x1c,0x16,0x85,0x85,0x07,0xd0,0x38,0x0d,0x31,0x50,0x21,0x38, - 0xe4,0x43,0x64,0x3e,0xa4,0x2b,0x88,0x4e,0x24,0xd3,0x89,0x67,0x1f,0x5d,0x49,0x4a, - 0x2b,0x30,0x2b,0xde,0x3f,0x7c,0x80,0x85,0xc1,0x00,0x3b,0x0e,0x5c,0xbf,0x32,0x3e, - 0xa3,0xa1,0xc5,0x15,0x1a,0x24,0x06,0x42,0xbf,0x9d,0x14,0xe3,0xd0,0x40,0x5e,0x99, - 0xea,0x33,0x08,0x74,0x1d,0x61,0x5b,0xc3,0x13,0x9c,0xd2,0xa8,0xdc,0x03,0xc0,0xf2, - 0x96,0xdf,0xe3,0x1c,0x69,0xab,0xc5,0xdf,0x3d,0xe3,0x3d,0xa3,0xcc,0x9f,0x0f,0x90, - 0x01,0x36,0x88,0x99,0x12,0x2d,0x4f,0xbc,0x2a,0x31,0xe7,0x05,0x53,0x55,0x57,0x33, - 0x20,0xa5,0x80,0x41,0x16,0x54,0xc5,0x62,0x52,0x40,0x68,0x9a,0x42,0x29,0x5b,0x61, - 0x7b,0xaa,0xa8,0x14,0x0e,0x2a,0x7e,0x48,0x7f,0x0b,0x07,0x40,0x24,0x62,0x15,0xb2, - 0xee,0xab,0xf0,0xad,0x9e,0x6b,0xd5,0x72,0xe0,0xb7,0xae,0x3f,0x27,0xfa,0x5f,0x22, - 0xa1,0x69,0xa9,0x15,0x86,0xac,0x59,0x73,0x91,0x7c,0x19,0x69,0xc4,0x66,0x3c,0x88, - 0x69,0x88,0x62,0x33,0x3c,0x24,0x2c,0x10,0x20,0xf9,0xda,0x4e,0x7a,0x85,0x89,0xe3, - 0xf0,0x02,0x2e,0x5e,0x9d,0x25,0x5e,0x4b,0x43,0x25,0x1a,0x7a,0x05,0x6f,0x1b,0x0c, - 0x8c,0x3a,0xbb,0x4f,0x3b,0x26,0x6d,0xad,0x29,0xe5,0x91,0xeb,0x84,0x6e,0x82,0xe8, - 0xd3,0x9e,0xe3,0xec,0x1a,0x3b,0x7d,0xbd,0xca,0xe2,0xfe,0xfd,0x78,0x68,0x24,0xe9, - 0x0b,0x8c,0xc6,0xae,0xf3,0x0e,0xa8,0x61,0xe7,0xc5,0x53,0x60,0x69,0x8c,0xfd,0xf9, - 0xd7,0x1c,0xb4,0xd8,0x0b,0x60,0xe6,0x08,0xff,0x46,0xd2,0x78,0xdc,0x3d,0xf4,0xe9, - 0x0a,0x4e,0x9b,0x41,0x8a,0x63,0x1d,0x89,0x8a,0x7c,0x6b,0x2a,0x18,0x2e,0x12,0xbb, - 0x6a,0x40,0xb5,0xd8,0x1b,0xef,0xd8,0xbf,0xc3,0x54,0xcb,0x71,0xc3,0x69,0x47,0xfe, - 0x4a,0x62,0xdc,0x81,0x34,0x60,0xb0,0xc2,0x97,0x35,0xac,0x4a,0xdc,0x7d,0xeb,0x61, - 0x37,0x9f,0x08,0x90,0x25,0x50,0xbc,0xa3,0x7b,0x35,0xcb,0x54,0x31,0xde,0x7b,0x0c, - 0xcb,0x20,0xb0,0xb5,0x80,0x39,0x2d,0x5e,0x28,0x00,0x68,0xe2,0xf6,0xc2,0x33,0x39, - 0xc9,0x1e,0x9f,0x4f,0x90,0x53,0xa6,0xae,0x42,0x11,0x0c,0xb7,0xa8,0x88,0xe3,0x64, - 0x11,0x4b,0x42,0xa2,0x53,0xb4,0xd7,0xe5,0x66,0x24,0xab,0x15,0xd2,0x83,0x4e,0x2c, - 0x2b,0x11,0x45,0x36,0x9f,0xbe,0xdb,0x8d,0xe1,0x5d,0xf8,0x0b,0x77,0xe5,0xfd,0x3e, - 0x80,0xbb,0x9d,0xe5,0x30,0x3e,0x24,0x1c,0xf6,0x14,0x8b,0xee,0xf2,0xdd,0xcd,0x2d, - 0xa3,0xc3,0x49,0x37,0x31,0x1f,0x99,0x93,0xa2,0x47,0xdc,0xf1,0xab,0xaf,0xf9,0xfb, - 0x46,0x7b,0x06,0x80,0x84,0x23,0x15,0x52,0x20,0x8a,0x92,0x50,0x3c,0xc3,0x70,0x14, - 0xdc,0xba,0xcf,0xfa,0xd2,0xf8,0x18,0x21,0x82,0x1d,0x16,0x9c,0xd8,0x66,0xfc,0xf6, - 0xc0,0x48,0x7a,0xeb,0x53,0x0b,0x29,0x35,0xcb,0x1a,0xf7,0x55,0xf8,0x7c,0x4a,0x6a, - 0xb3,0xb6,0xce,0xfb,0x52,0xea,0x39,0x20,0x65,0x56,0x2b,0xdf,0x42,0x1e,0x92,0xb7, - 0x69,0xee,0x62,0xae,0x7b,0xbc,0x2e,0x8a,0x2b,0x5e,0xec,0x6b,0xd6,0x63,0xf6,0x2b, - 0x45,0x0f,0xf6,0x0c,0xd4,0x32,0x2c,0xf9,0x23,0xf6,0x5a,0x0a,0xfb,0x5d,0x39,0x60, - 0x99,0x21,0xbf,0x4f,0xbb,0x5c,0x2f,0x01,0xfa,0x13,0xed,0x6a,0x56,0x76,0xf7,0x2a, - 0x99,0x04,0xf7,0x0d,0x46,0x30,0x1b,0xf8,0x6b,0xcf,0x27,0xf5,0x24,0xf0,0x7e,0x9e, - 0x34,0x2b,0xc0,0x46,0xeb,0xad,0x0e,0x07,0x67,0x22,0x0a,0x36,0xd3,0x70,0x70,0x01, - 0x53,0xc5,0x29,0xa4,0x26,0x2e,0xfd,0x35,0xe4,0x3e,0xd8,0xbd,0x56,0xec,0xe4,0x39, - 0xef,0x10,0xb1,0x65,0x98,0xe2,0x17,0xbb,0x40,0x66,0x91,0x23,0x51,0x72,0x0f,0x8a, - 0x09,0x8e,0x11,0x87,0xb6,0xc3,0x8d,0x51,0x0d,0x91,0xf3,0x8a,0x76,0x18,0xe0,0x4e, - 0xba,0x9f,0xbe,0xc2,0xb4,0x0f,0x0a,0x04,0xa4,0xa4,0xf8,0x2a,0xb7,0xeb,0x29,0x34, - 0xf8,0x86,0x50,0xad,0x64,0xa5,0xf8,0xb4,0x13,0xc3,0xa1,0x7e,0xbe,0xe7,0x9c,0x25, - 0x6d,0x05,0x25,0x73,0xa5,0x66,0xf3,0xa5,0xde,0xc2,0x45,0x97,0xda,0xe9,0xd7,0x43, - 0xf0,0xa7,0x5e,0xd2,0x63,0xe5,0x71,0x1d,0xa4,0xe7,0x01,0xd7,0xc3,0x87,0xdd,0xaf, - 0xc6,0x85,0x22,0x07,0xbf,0x2a,0x92,0x39,0x56,0xac,0xb2,0xd2,0x18,0x53,0xd5,0x64, - 0x23,0x56,0x0d,0x8e,0x3e,0xc9,0x42,0x38,0x03,0x6d,0x32,0x1e,0xfc,0xf6,0xd8,0x74, - 0xe4,0x87,0xfb,0x0a,0x98,0xfa,0x9c,0xc9,0x60,0x37,0xd3,0xd7,0xdc,0xec,0x94,0x2a, - 0xdf,0x24,0x2b,0x13,0x41,0x29,0x78,0x3d,0x05,0xb9,0x0f,0x5d,0x66,0x8e,0x42,0x4e, - 0x79,0x8c,0x22,0x57,0xe2,0x97,0x0a,0xca,0xb1,0x73,0x72,0x62,0xa0,0xa0,0xd0,0x4a, - 0x70,0xad,0xb2,0x5b,0x05,0xc0,0x12,0x7d,0xcc,0xc2,0x6a,0x38,0xa3,0xf6,0xc0,0x6e, - 0x73,0x8d,0xe3,0x46,0x33,0x57,0x1b,0xa9,0x4d,0x8a,0x70,0xeb,0x82,0xd4,0x4b,0x5f, - 0xf0,0x8f,0x70,0xbf,0xbd,0xb4,0x13,0x19,0xe9,0xce,0x04,0x0d,0x38,0xf1,0x74,0xb3, - 0x0e,0x3f,0xe5,0xe0,0xcb,0xd2,0xcb,0x07,0xae,0xdd,0x8c,0x48,0xd8,0xfd,0x6b,0xa8, - 0x4e,0x43,0x12,0x93,0xba,0xb5,0xc3,0xcc,0x4b,0x0e,0xeb,0x56,0x5f,0x5a,0xe5,0x81, - 0xd8,0x39,0x45,0x07,0x49,0xb1,0xce,0xdc,0x8c,0xdf,0x48,0xe0,0xf2,0x42,0xe5,0x62, - 0xbb,0x06,0xa9,0xd0,0x33,0xa3,0x82,0x82,0xb7,0x7c,0x2c,0xb6,0x75,0x62,0x9e,0xa4, - 0xcd,0x37,0xe5,0x36,0x32,0xfb,0x2d,0xea,0xc3,0x5d,0xd4,0xcf,0x97,0x92,0x3c,0xda, - 0x31,0x38,0x6c,0xa5,0x3d,0xbe,0xf9,0xc9,0x8c,0xf7,0xee,0xee,0xe6,0x99,0x64,0xa5, - 0x4d,0x55,0xc5,0x39,0xdd,0xb4,0x77,0x83,0xea,0x96,0x41,0x0d,0xb5,0x16,0xb9,0x73, - 0x06,0x87,0x6b,0xd5,0xcf,0x1c,0x47,0x0c,0x90,0x97,0x29,0xa5,0xb4,0x07,0x78,0x12, - 0xe9,0x3c,0x19,0x2e,0xd9,0xd8,0x75,0xd4,0x06,0xaa,0xef,0x41,0xd9,0x57,0x8a,0xf8, - 0xd2,0xfa,0x4e,0x87,0x0e,0xa6,0x28,0x36,0x86,0x8b,0xea,0x36,0xd8,0x56,0xe4,0x8d, - 0x64,0x28,0x4b,0x8d,0xb4,0xd6,0x49,0x26,0x8f,0x9a,0xe7,0x27,0x59,0x55,0x49,0xf9, - 0x5a,0x66,0x17,0x60,0x9f,0x16,0x05,0x0a,0xf7,0x74,0xac,0x37,0x58,0x54,0x40,0x6b, - 0x52,0x9f,0xa6,0xcb,0xbe,0xad,0x5f,0x94,0xff,0x91,0xfc,0xce,0xef,0x98,0x48,0x7a, - 0x53,0x9e,0x96,0x9e,0xdf,0xc2,0x7b,0x0c,0x92,0x54,0xde,0xff,0x3a,0x32,0xe0,0xc3, - 0x2e,0x9c,0xbe,0xdb,0x1b,0x15,0xe0,0x14,0xba,0x09,0xff,0xff,0x1d,0x34,0xe8,0xca, - 0x67,0x2e,0x5e,0x3d,0x8c,0x3f,0x7b,0x9b,0xab,0x74,0x10,0x8d,0x7f,0x8f,0x04,0x04, - 0x40,0x10,0xb8,0x2c,0xb3,0x8c,0x10,0xdc,0xc1,0x02,0x13,0x62,0x44,0x2c,0x68,0x0d, - 0x88,0x8c,0xce,0x12,0x32,0x61,0xbf,0xb1,0xc1,0x80,0x80,0x04,0x72,0x20,0x41,0x21, - 0x81,0x06,0xf9,0xef,0x79,0x66,0x16,0x1e,0x14,0x40,0x94,0xa1,0x8c,0x4a,0xd2,0x10, - 0x0f,0x0a,0xcf,0x12,0x30,0x30,0x79,0x71,0xdc,0x4e,0x59,0x28,0xdd,0x98,0xef,0x1e, - 0xb7,0xd8,0x44,0xa2,0x36,0x4a,0x0e,0x52,0x46,0x08,0xd4,0x23,0x51,0x6b,0xd8,0x97, - 0x01,0xf0,0xa8,0x14,0xa3,0x28,0x7f,0x81,0xdf,0x05,0xdc,0x33,0xd2,0x6b,0x29,0x83, - 0x04,0xf3,0x81,0x7a,0x9a,0x4a,0x30,0x6f,0x12,0x32,0x41,0xa2,0xd0,0x93,0x4d,0x16, - 0x02,0x09,0xb7,0xd5,0x5b,0x99,0xb1,0xfb,0xe1,0x91,0xe7,0x55,0xf0,0xc7,0x71,0x2f, - 0xf7,0x82,0xfa,0x28,0xa6,0x08,0xfe,0xba,0x40,0x42,0x13,0xa8,0x04,0x91,0x40,0x85, - 0xfe,0x84,0x2e,0x7e,0xf2,0x26,0x1a,0xc5,0x49,0x92,0x61,0xb8,0x05,0x9c,0xd4,0xa9, - 0x61,0x3a,0x02,0x06,0x1c,0x7e,0x54,0xd0,0x48,0xd1,0xa9,0xc2,0x23,0x95,0xef,0x3e, - 0xa8,0x2b,0x3f,0x7f,0xbd,0x21,0x33,0xbd,0x91,0xbe,0xa1,0xc2,0x2e,0x29,0xe1,0xb6, - 0xd6,0xf3,0x86,0x5f,0xcd,0x6e,0x2d,0x95,0x4a,0x42,0xd2,0x9d,0x96,0x4c,0xb1,0x5d, - 0x60,0x72,0x7d,0x63,0x15,0xf8,0xb6,0xf8,0xb7,0x6d,0x6d,0x58,0xd4,0x6f,0x1d,0xa6, - 0xb0,0x0d,0xe5,0x92,0x94,0x68,0x3b,0xef,0x36,0x0f,0xd3,0xaf,0x59,0x28,0x49,0xa8, - 0x34,0x4d,0x0b,0x66,0x91,0xba,0xf7,0x3b,0x48,0x9b,0x6c,0x7c,0x56,0x63,0x2a,0x86, - 0xb1,0x4c,0xfc,0xea,0xe6,0x78,0x54,0x48,0x91,0x5b,0xae,0x57,0xa6,0xdf,0x31,0x4e, - 0xcc,0x15,0xf4,0xfe,0xe3,0x99,0x9c,0x40,0xa7,0x1e,0xe2,0x2e,0x9a,0xb4,0x2b,0x86, - 0x35,0xec,0xfd,0xee,0x6a,0x7a,0x17,0x51,0x08,0x56,0x72,0x54,0x2a,0x62,0xfe,0x60, - 0xa3,0x13,0xf5,0xb1,0x34,0xc6,0x1c,0x57,0xe5,0xa3,0xe3,0x82,0x9a,0xd6,0xb9,0xdc, - 0x00,0x0b,0x54,0x40,0x6e,0x90,0xf0,0x10,0x6a,0x5b,0x44,0xe5,0x52,0x74,0x12,0x3f, - 0x2f,0xbe,0x48,0x50,0x67,0x1b,0x18,0x82,0x4d,0xaa,0xdc,0xf4,0x73,0x75,0x3a,0x30, - 0x1d,0x84,0x85,0xc5,0xb6,0x32,0x95,0xfc,0x5c,0x13,0xd5,0xe5,0xf2,0x76,0xb0,0x71, - 0x81,0x08,0x8d,0xd4,0xb7,0x33,0x35,0x33,0x65,0xa2,0xdd,0xf5,0xf3,0x77,0x58,0x09, - 0x0e,0xb5,0xd8,0x26,0x30,0x3e,0x5b,0x07,0x60,0x98,0x17,0x5f,0x98,0x34,0x8e,0x09, - 0x2b,0xb4,0xf6,0x5a,0x89,0x77,0x26,0x9c,0x6a,0x19,0x35,0x54,0x3d,0x15,0x43,0x18, - 0xa2,0x11,0x8f,0x6a,0xdb,0x1a,0x32,0xaf,0x7c,0x3e,0xf6,0xd6,0x2d,0xe7,0x4b,0xc8, - 0xab,0x10,0x38,0x1f,0xbc,0x5b,0xa1,0x9d,0x57,0x84,0x4b,0xe3,0xd7,0xa7,0x39,0xf6, - 0xdd,0xe9,0x42,0x48,0x6a,0x84,0xc6,0x48,0x76,0xdd,0xd6,0xec,0x7a,0x7c,0xf9,0xfc, - 0xa4,0x1f,0xf7,0x5e,0x3a,0x5f,0x0b,0xc7,0x09,0x1f,0xde,0xfc,0x7b,0x7d,0xb8,0x0b, - 0x29,0x58,0x07,0xc1,0x44,0x3a,0x07,0x69,0xfc,0xeb,0xd7,0xed,0xfa,0x7e,0xf8,0xd8, - 0x26,0x13,0xf7,0x0d,0x54,0x30,0x59,0xad,0x02,0x6e,0xdf,0xfd,0xfb,0x7f,0xa3,0x5d, - 0x47,0x8c,0x22,0x11,0xb7,0x90,0x8f,0x13,0x4e,0x6f,0x33,0xac,0xb5,0x1f,0x20,0xb8, - 0xe4,0xe7,0x53,0x03,0xb8,0x0e,0x46,0xb2,0xc7,0xc9,0x82,0xc9,0xa2,0xa3,0x37,0x61, - 0xa5,0x97,0x1f,0x8e,0xb0,0xd5,0x75,0x5d,0xae,0xc0,0x4a,0xa3,0x88,0xb4,0x9d,0xfd, - 0x64,0xe5,0xd1,0x1e,0x38,0x91,0xb4,0x51,0x85,0xcc,0xb9,0x23,0xf1,0x8d,0x3e,0xad, - 0x4c,0x2f,0xa0,0x62,0x99,0xa6,0x7f,0x7d,0x13,0x86,0x98,0x19,0x74,0xe9,0x17,0xa3, - 0xb8,0xd7,0x80,0xd4,0x16,0x5b,0x81,0x61,0x12,0x81,0xfc,0x6a,0xd4,0xeb,0x9c,0x5b, - 0xa4,0x99,0x56,0x46,0x1b,0xaa,0xf6,0x47,0x3b,0xcf,0xf7,0x7a,0x28,0xe6,0x4a,0xad, - 0x5f,0x78,0xb3,0x4e,0x34,0xa1,0x5f,0x2a,0x4b,0xca,0x19,0x48,0xf3,0x89,0x96,0xe0, - 0xed,0xee,0x32,0x05,0x98,0xfc,0x12,0xe4,0xce,0xc0,0xf2,0x11,0x54,0x84,0x03,0x54, - 0xc4,0xed,0xd2,0xee,0x15,0xcf,0x5a,0x7a,0x58,0x44,0x1d,0xa9,0x36,0x4f,0x97,0x41, - 0x45,0xce,0x07,0x7d,0x12,0x05,0xbe,0xdb,0xc0,0xc5,0x9b,0xed,0x08,0x2c,0x82,0xf9, - 0x21,0x97,0x3b,0x70,0x43,0x04,0x43,0x48,0xc7,0x63,0x3b,0xce,0x1f,0xab,0x3c,0xa5, - 0x34,0x8f,0xea,0xb5,0xbf,0x2b,0x2a,0x6f,0xc1,0xc8,0xb2,0x51,0x56,0x80,0x68,0xab, - 0xb0,0xcf,0xca,0x5a,0x60,0xad,0x2a,0xfb,0x57,0x69,0x1a,0x41,0x7b,0xeb,0x98,0x4e, - 0xe5,0xf1,0xe4,0x5f,0xe1,0x8e,0x77,0x2c,0x48,0xec,0xdb,0xad,0x5d,0xe0,0x35,0xb4, - 0xc5,0x24,0x83,0x9d,0x19,0x5a,0xf0,0x7d,0x07,0x77,0xf3,0xa0,0x3e,0xe0,0xdc,0x00, - 0x25,0xf2,0xfe,0x9b,0x97,0xb6,0xb4,0xc5,0x40,0xe4,0xdd,0x4d,0x9f,0x44,0x14,0xc2, - 0x27,0x9e,0x2c,0x74,0x94,0x3b,0xd8,0x96,0x98,0x65,0x3c,0x70,0xe7,0xf2,0x1d,0xd3, - 0xb4,0x9d,0x2d,0x83,0x15,0x3a,0x95,0xad,0x68,0x5f,0x16,0xbd,0x9f,0x86,0x4d,0xd3, - 0xb8,0x1e,0x56,0x75,0x37,0xfb,0x45,0x81,0x55,0xdc,0x5e,0x4c,0x1c,0x54,0x0c,0xdc, - 0xe0,0x60,0xdc,0x16,0xcb,0xbb,0x36,0x93,0x04,0xdf,0xf4,0xe6,0x76,0xf4,0x32,0x40, - 0x23,0x3a,0xe8,0x34,0xb5,0xbd,0x1e,0xf6,0x66,0xf7,0xfc,0xf6,0x77,0xf5,0x83,0xb1, - 0x4d,0x30,0x85,0x87,0x58,0x3d,0x34,0x90,0xdc,0xba,0xf5,0xe7,0xf6,0xf6,0x8e,0x20, - 0x79,0x3c,0x18,0x35,0x93,0xb1,0xbd,0xf3,0x83,0xd3,0xfd,0xf7,0xf7,0xf7,0x5e,0x08, - 0x2d,0xc0,0x20,0x7e,0x60,0xb7,0x99,0xb0,0xcf,0x5d,0xb8,0x1c,0x5f,0x38,0xea,0xdc, - 0x35,0x22,0xa4,0x9a,0x9e,0xb4,0x0c,0x86,0x9a,0x98,0x9e,0xae,0xc9,0x2e,0x25,0x69, - 0x8e,0xaa,0xc7,0xcb,0xf8,0xb7,0x26,0xf5,0x34,0xd5,0xed,0xf5,0x4b,0x85,0x37,0x63, - 0xad,0x60,0xe5,0x61,0x1e,0xf7,0x11,0x59,0x5e,0xbe,0x0a,0x00,0x20,0x86,0x01,0xc2, - 0xc5,0x0a,0xee,0xf9,0x9f,0x63,0x75,0xd5,0x0c,0x9e,0xf6,0xee,0x7e,0xfc,0x51,0x85, - 0xfb,0x58,0x42,0x40,0xb2,0x4b,0xc9,0x4a,0x69,0x3d,0xfe,0xfe,0x7f,0xfd,0xcc,0xb1, - 0x7b,0x62,0x87,0x8f,0x52,0xb3,0xf3,0xee,0x6e,0x7e,0xf7,0xef,0xfe,0xfe,0xc8,0xec, - 0x44,0x3a,0xe7,0xda,0x30,0xbb,0xaf,0x13,0x4c,0x54,0xff,0xff,0xcd,0x90,0x80,0x00, - 0x55,0x40,0xf8,0x86,0x98,0x71,0x69,0xf0,0x0c,0xc1,0x91,0xfb,0xe7,0x64,0x88,0x89, - 0x17,0x41,0xd2,0xeb,0xb2,0x63,0x32,0xe0,0x1d,0xc9,0x3c,0x53,0x49,0x6e,0x01,0x25, - 0x05,0x02,0xf9,0x87,0x18,0x7a,0x12,0x6b,0x4d,0x21,0xc9,0x2f,0x54,0xf6,0x09,0x0d, - 0x87,0x03,0x9c,0xa7,0x14,0xd6,0x09,0x7b,0x4d,0x4b,0x2d,0xea,0x66,0x67,0x7b,0xae, - 0xa3,0x61,0xd3,0xbe,0xa7,0xf0,0x6b,0xea,0x43,0xe4,0xeb,0x6b,0xf1,0xe0,0x63,0x03, - 0x8f,0x99,0xb0,0x5b,0xb0,0xa0,0xdf,0xa3,0xe0,0x78,0xe6,0x96,0xce,0x5a,0x68,0x12, - 0x06,0x1a,0xb9,0x77,0x4b,0x33,0x2a,0x1f,0x18,0x99,0x7e,0x3b,0x0b,0xf9,0x31,0x76, - 0x12,0xab,0xde,0x0f,0xa1,0x86,0x63,0x2f,0x38,0x06,0x80,0xfd,0x2e,0x96,0xc3,0xac, - 0x2c,0x48,0x42,0x35,0x07,0x2e,0x10,0xda,0x0f,0x4c,0x88,0x27,0xdc,0x3c,0x98,0xbc, - 0x2d,0x49,0x3e,0x0c,0xba,0x6b,0x20,0x3a,0x55,0x69,0x9b,0xe3,0xee,0x6d,0x10,0xfd, - 0x8e,0x0a,0x0b,0xa1,0x79,0x25,0x17,0x7d,0x2f,0xb4,0x37,0x4f,0x74,0xa5,0x8e,0x08, - 0x8f,0x0b,0x98,0xc2,0x45,0xb3,0x9b,0x29,0xd9,0x49,0xd2,0x36,0x5d,0x3f,0xe2,0x02, - 0xdb,0xa0,0xba,0xb7,0xa3,0xd8,0x6d,0x82,0xa1,0x43,0x2d,0x12,0x74,0xb3,0xa1,0x32, - 0x8b,0x73,0x9c,0xbe,0xe8,0x50,0x19,0x86,0xb3,0x42,0x0e,0x86,0xe6,0x0e,0xe7,0x13, - 0x55,0x53,0xbb,0x7f,0xea,0x92,0xe8,0x7b,0xea,0x00,0xec,0xc8,0x21,0xf3,0x6e,0x5f, - 0x1f,0x6b,0x68,0xbf,0x7b,0xf0,0x05,0x9b,0xdb,0xb2,0x26,0xfd,0x14,0x0f,0x04,0x80, - 0x78,0xf8,0x6c,0xbe,0xb2,0x18,0x2c,0xc0,0xd0,0x58,0xa5,0xa6,0xe7,0x74,0xde,0xb0, - 0x26,0xe9,0xec,0xd5,0x75,0x3e,0xe5,0xc2,0xef,0x34,0x48,0xbf,0xf5,0x25,0x4f,0x28, - 0x82,0x11,0x03,0x75,0xf4,0x3d,0x64,0xd3,0x6e,0x37,0x2d,0xa7,0x65,0x76,0x02,0x1d, - 0x24,0xe6,0xed,0xd4,0xf9,0xb8,0x64,0xc3,0x6f,0x36,0x39,0xcf,0x46,0xfe,0xc4,0x72, - 0x62,0x14,0xc4,0xbb,0x4e,0xcb,0x33,0x1b,0x83,0xc2,0xd2,0x6b,0xcb,0x22,0x42,0xd6, - 0x0f,0x13,0x18,0x8f,0xe2,0x56,0x1a,0x56,0xa8,0xd8,0xa7,0x9f,0xe5,0x4a,0x0d,0xfe, - 0x8e,0x77,0x7e,0x60,0x45,0x8a,0x2e,0x9f,0xc0,0xbb,0xdd,0xf0,0x03,0x00,0x49,0xfa, - 0x8c,0xea,0xe6,0x86,0x37,0x54,0xf1,0x6e,0x1c,0xda,0x5a,0x3f,0x52,0xfa,0xc6,0xb1, - 0x37,0xb3,0x01,0x6e,0xba,0x10,0x3f,0xfb,0xec,0x44,0x72,0x8b,0xe9,0xd4,0xfd,0x69, - 0x33,0x19,0x6b,0xeb,0x21,0xf6,0x66,0x9f,0xf8,0xf5,0x3a,0xe6,0xda,0x1c,0x37,0x37, - 0xc3,0x08,0x85,0x6f,0xbc,0x28,0xbe,0xfa,0x64,0x06,0x37,0xe7,0x29,0xd6,0x51,0x50, - 0xbb,0xb0,0x8e,0x42,0x0e,0x3f,0xbf,0xf3,0x7c,0xf7,0xb6,0xee,0x7d,0x67,0x61,0x2a, - 0xca,0x09,0xe8,0xca,0xa4,0x81,0xb5,0x16,0x6c,0x1c,0xfb,0x02,0x9b,0xe0,0x7c,0xf0, - 0xfe,0xa9,0x6e,0x56,0x3a,0xad,0x21,0x8a,0xb9,0xc2,0x9e,0x83,0x07,0x82,0x3f,0x96, - 0x7a,0x11,0x26,0xb7,0x20,0x93,0x4b,0xae,0x0b,0xe8,0x2a,0xc9,0x91,0x71,0x37,0xeb, - 0xdf,0xc0,0xb1,0xdb,0x4e,0x49,0x7f,0xfc,0xed,0x1f,0x64,0x58,0x0c,0xc2,0xe0,0xa6, - 0x22,0xc0,0xc0,0x04,0x4a,0x0d,0x20,0x62,0xc4,0xc6,0x14,0x44,0xf8,0xaf,0xb8,0xb6, - 0x23,0xc1,0x7b,0x92,0x61,0x7d,0x3c,0xb5,0x64,0x56,0xb3,0x34,0xd2,0xe5,0x21,0x97, - 0xcc,0x38,0xaa,0xe5,0x92,0x53,0xa0,0xe4,0x25,0x19,0xb0,0xf8,0x63,0xe6,0x29,0x3a, - 0x85,0x83,0x76,0xba,0x93,0x52,0x8d,0xcc,0x86,0x30,0x40,0x35,0x10,0xe7,0x5a,0xc5, - 0xaa,0xcb,0xd5,0xa4,0xab,0x50,0xe7,0x9d,0xbf,0xa7,0x95,0x26,0x16,0x99,0x43,0x58, - 0xa4,0x78,0x90,0x6a,0xce,0x96,0x30,0x66,0x8c,0xca,0xc6,0x04,0xec,0xba,0x60,0x9c, - 0x3d,0x82,0x99,0x75,0x4b,0x0a,0x0e,0x23,0x8a,0xd0,0x94,0x88,0x8a,0xf8,0x71,0x52, - 0xd3,0x5f,0x12,0x25,0xe5,0x38,0x81,0x57,0x4a,0xd1,0x69,0x9f,0xc5,0x1a,0x22,0x0a, - 0x0c,0xc8,0xe8,0xff,0xae,0x38,0x62,0x59,0x54,0x42,0xd8,0x2c,0x65,0xec,0x2a,0x1a, - 0x0d,0xc9,0x52,0xee,0x15,0xa6,0x8e,0x5a,0x45,0x19,0xfa,0x3c,0xb9,0xed,0x23,0x27, - 0x8c,0x8a,0x4b,0x25,0x1e,0xa2,0xf4,0xd5,0x2d,0xac,0x4b,0x2d,0xf2,0xee,0x2b,0x87, - 0x8d,0x8b,0x03,0x21,0x1a,0xde,0x94,0xeb,0x4c,0x6a,0x02,0x3d,0x4b,0xef,0x7a,0x0d, - 0x9e,0x83,0x5b,0x7c,0x66,0x70,0x0d,0x77,0x85,0xc3,0x65,0x91,0xab,0x8f,0x68,0x5a, - 0x0c,0xba,0xb9,0xa4,0x3b,0x06,0x41,0xda,0xa2,0xfd,0xc1,0xdb,0xac,0xd1,0x5c,0x7b, - 0x8a,0x09,0xb5,0xad,0x65,0x23,0xca,0x4f,0x4b,0x60,0x08,0x14,0xf0,0x51,0x15,0x5d, - 0x32,0x0e,0x93,0x57,0xf4,0xeb,0x8b,0xa8,0x2e,0xa3,0x2f,0x34,0xdd,0x01,0x01,0x82, - 0x4f,0xb4,0x2e,0xf1,0x2c,0xff,0x90,0xec,0xbb,0xed,0x9f,0xf5,0xf8,0x6c,0xac,0x92, - 0x94,0x1c,0x7f,0x9c,0xb1,0x25,0x63,0xfa,0x1a,0xf1,0x9c,0xaf,0xed,0xb5,0xda,0x87, - 0xa4,0xf7,0xa4,0x58,0x03,0xb6,0xde,0xd4,0x64,0x05,0x5a,0xcc,0x23,0x1f,0xc9,0xb4, - 0x16,0x1e,0x09,0xe0,0xad,0xbc,0xfd,0x82,0x1d,0x9d,0x1c,0xb0,0x14,0x95,0xf4,0x78, - 0x26,0xe4,0x1f,0xbd,0xa0,0x0b,0x68,0x42,0xad,0x34,0x20,0x1d,0xa7,0x97,0x4b,0x30, - 0xe7,0x6a,0x82,0x34,0xf0,0x38,0x46,0x6c,0x90,0x94,0xbc,0x21,0x3b,0x83,0x96,0xc3, - 0x9e,0x6b,0xde,0x4c,0x45,0x46,0xd9,0x91,0x38,0x29,0xde,0xad,0xd8,0xea,0x5a,0x31, - 0x83,0x1a,0x46,0x38,0x56,0x0b,0x44,0xec,0x44,0x52,0xc6,0x79,0x46,0xc1,0xc2,0xad, - 0x2d,0xf8,0x12,0x51,0x8b,0xbc,0xb6,0xd8,0xee,0xdc,0x02,0x58,0x6c,0x06,0x2f,0x45, - 0xce,0x9d,0xaf,0x41,0x8a,0xbd,0xb2,0x4a,0x92,0xd6,0xc6,0xc5,0xc2,0xb8,0xdd,0x89, - 0xa4,0xd5,0x77,0xe8,0xa4,0x75,0x3b,0x49,0x6e,0xde,0xca,0xd5,0x4b,0xcf,0x3a,0xe9, - 0x23,0xfe,0xf6,0xf8,0xa5,0xf4,0x05,0x9c,0x4e,0xbe,0x9a,0xb9,0x69,0x9f,0x4d,0x20, - 0x45,0x93,0x1f,0xbc,0xef,0x83,0x5d,0xe5,0xcd,0x59,0xfe,0xe2,0x87,0x8a,0xd5,0x7f, - 0xd8,0x00,0xee,0x9d,0x85,0xbd,0x06,0xc8,0x1f,0x42,0xc7,0x75,0xcc,0x0d,0x66,0xb4, - 0xd2,0x61,0xd6,0xc9,0x9a,0xa9,0x64,0x11,0x57,0x0a,0x88,0x95,0x68,0x61,0xbb,0x21, - 0x5a,0x29,0xa2,0x71,0xbf,0x0e,0xde,0x19,0x16,0x5a,0x91,0x1d,0x68,0x72,0x2f,0xef, - 0xe1,0x9c,0xe2,0x44,0x11,0x40,0x68,0x07,0x89,0x24,0x54,0xf4,0x0e,0xcf,0x98,0x7f, - 0xdf,0xae,0xa8,0xc4,0xb0,0x3a,0x31,0x63,0xc5,0x5d,0xa6,0x54,0xde,0xc7,0xf8,0x73, - 0x11,0x3d,0xdf,0xf4,0x91,0x24,0x3f,0xc3,0x09,0x26,0xda,0x05,0xda,0x40,0x71,0x7f, - 0x57,0x4b,0xab,0xe3,0x13,0x27,0x89,0x03,0xa9,0x07,0x85,0x75,0x91,0xb6,0xbc,0xc2, - 0x82,0x3c,0xa0,0xe4,0x0a,0x89,0x68,0xc5,0xc4,0xa4,0x9d,0xe6,0x70,0x04,0x41,0x32, - 0xf8,0xd8,0xcf,0xd6,0x31,0xd5,0x78,0xd4,0xe2,0xea,0x4b,0x01,0x71,0x85,0x79,0xbf, - 0x00,0x02,0xd0,0xa7,0xb0,0x56,0x01,0x74,0xfc,0x40,0x8b,0x64,0x71,0x24,0x10,0x6d, - 0x24,0xba,0xf7,0x7c,0x30,0x21,0x48,0x56,0x62,0xe8,0x5d,0xf1,0xc5,0x7f,0x7a,0x63, - 0xd2,0x40,0x4e,0x6e,0x2b,0x0c,0x6c,0x2e,0xa1,0x47,0x8a,0x2e,0x5c,0xbd,0x72,0x3c, - 0xb8,0x00,0xff,0xe5,0x11,0x52,0x8a,0x7e,0x71,0xc4,0x1b,0x4f,0x0a,0x07,0x7b,0x63, - 0x5a,0xa2,0x79,0xe5,0x4b,0xb1,0x45,0x2e,0x23,0x2e,0x8f,0x33,0x8b,0x6e,0x8c,0x63, - 0x04,0x69,0x8f,0xf1,0x19,0x10,0x42,0x75,0x6e,0x07,0xf9,0x30,0xd8,0x0b,0x43,0xae, - 0x88,0x08,0x92,0x55,0xfb,0x23,0x47,0xea,0xca,0x17,0xe8,0x93,0x5c,0xbd,0x6a,0x14, - 0xaa,0xb2,0xdf,0xde,0x39,0x9d,0xee,0x1a,0x78,0xd6,0x6d,0xf8,0x2f,0x22,0xce,0x2b, - 0x7d,0x08,0xe3,0x44,0x52,0x3f,0x6b,0x81,0xfd,0x81,0x3a,0x2b,0xd2,0x20,0xf0,0xb1, - 0xa1,0x40,0x91,0x5c,0x38,0x34,0xa1,0x91,0xfc,0x82,0xbb,0xc3,0xdb,0xb2,0x3e,0x07, - 0xd3,0x9b,0x43,0x77,0x11,0x55,0x34,0xe9,0xc1,0x56,0x6a,0xd7,0x53,0xd4,0x8c,0x17, - 0xd6,0x9a,0x90,0xb3,0x90,0xbb,0x3c,0xfc,0xc0,0x57,0xe4,0x51,0x9a,0xfa,0x01,0x06, - 0x5b,0x99,0xbd,0x55,0xee,0x9d,0x31,0xf4,0x43,0x54,0xc9,0x47,0x10,0xd6,0x89,0x16, - 0x5e,0x52,0x0a,0x7d,0xce,0xfc,0x39,0xf9,0x42,0x55,0x93,0x50,0xd0,0x03,0x24,0x6b, - 0x24,0x19,0x10,0x94,0xb2,0xcb,0xbc,0xc9,0xe0,0x50,0xb4,0xa4,0x67,0xf6,0x34,0xa2, - 0xc8,0xaf,0x18,0x71,0x70,0x39,0x7c,0x85,0xc2,0xea,0xdc,0x09,0x73,0xae,0x47,0x43, - 0x18,0x34,0x9c,0xcd,0x17,0xba,0x4c,0x83,0x15,0x50,0xad,0x1c,0xd2,0xed,0x33,0x8c, - 0x48,0xdc,0x42,0x2a,0x5a,0xaf,0xe6,0x02,0x87,0xea,0xf5,0x71,0xad,0x75,0x3d,0x6a, - 0x84,0xa5,0xbc,0x7f,0x67,0x3e,0x36,0xe5,0xc9,0x5e,0x7a,0xdf,0x1b,0xfe,0xba,0xe7, - 0x8a,0x58,0x6e,0x1d,0x95,0x34,0x3a,0x45,0x38,0x22,0x1a,0xfc,0x35,0x82,0x7f,0xae, - 0x5d,0x15,0xa7,0xe9,0x19,0x59,0x33,0xe0,0x4b,0x81,0x97,0xde,0xd7,0xfc,0x3e,0x9f, - 0x61,0x7f,0x3f,0xee,0x3f,0x4b,0x45,0xcb,0x12,0x19,0x1b,0x39,0xe7,0x37,0x26,0xca, - 0x6d,0x11,0xd0,0xae,0x67,0xc3,0x28,0xdd,0x4a,0x6d,0x69,0xb0,0x5b,0x2e,0x30,0x04, - 0xc0,0xa5,0x35,0x8e,0x15,0xb7,0x3e,0xfa,0x02,0x50,0xa5,0x1e,0xf9,0x8a,0x0d,0xd4, - 0xca,0xbe,0x77,0xd9,0x5b,0x5d,0x50,0x6d,0x96,0xac,0xb7,0xac,0x17,0xf5,0x75,0x31, - 0xe3,0x50,0xf7,0x80,0x50,0x07,0x21,0xd1,0x47,0x52,0x64,0x0d,0x3d,0x70,0x5b,0x79, - 0x0a,0x3f,0xce,0xfa,0x14,0x5b,0x24,0xe4,0x1c,0xd2,0xee,0xfe,0x48,0x4d,0xec,0xed, - 0x96,0xae,0xf1,0x0a,0x66,0x76,0x69,0xdf,0x01,0x7a,0x9e,0xee,0xf6,0x65,0x9a,0x86, - 0x73,0x7f,0xa8,0x83,0x90,0x93,0xc9,0xdf,0x72,0x39,0xa9,0x16,0x87,0x60,0xb9,0x79, - 0xa4,0x73,0xf6,0xe9,0xaa,0x83,0xc6,0xb7,0xb1,0xa4,0xe0,0xdf,0x32,0x4e,0x5f,0x4a, - 0xa1,0xc8,0x62,0x35,0x26,0xeb,0x8f,0x11,0x76,0xa8,0x88,0x41,0xab,0xeb,0x7a,0x64, - 0x85,0x81,0x10,0xaa,0x97,0x5e,0x6d,0xed,0x46,0x07,0xf8,0x09,0x09,0xee,0xd6,0x05, - 0x80,0xc4,0xb8,0x52,0x7f,0x97,0x96,0x23,0xd8,0x6b,0x61,0x9a,0xf0,0x3d,0x1f,0x31, - 0x05,0xb0,0x74,0xaf,0x17,0x1c,0x20,0x8b,0x22,0x38,0xfd,0xeb,0x2a,0x3f,0x9d,0x4d, - 0x22,0x77,0x7b,0x0c,0x27,0x4f,0x08,0xc2,0xc8,0x07,0xaa,0x1f,0x75,0x47,0xfe,0xe1, - 0xfc,0xea,0x6a,0x1a,0x25,0xaf,0x1a,0x72,0xec,0xcf,0xe6,0xba,0x29,0xc5,0x98,0xae, - 0x7b,0x37,0x78,0x0f,0xe3,0xab,0x6d,0x4e,0xc0,0xcc,0xeb,0xdc,0xc3,0x1e,0x50,0xd1, - 0x26,0xca,0x8b,0x7b,0x3c,0x21,0x1f,0x6f,0x6e,0xcd,0x81,0xc0,0xdb,0xba,0xa2,0xa8, - 0xaf,0x73,0xf9,0xca,0x7a,0x35,0x4c,0x42,0xc1,0x3a,0xaa,0x99,0xdc,0x1b,0x20,0xa7, - 0xac,0x86,0x78,0x67,0x19,0x7f,0x9d,0xba,0x03,0x8f,0x4e,0x9c,0xdd,0xe5,0xb7,0xcd, - 0xce,0x73,0x23,0xcb,0x92,0xec,0x3b,0x73,0x27,0xff,0x48,0x9f,0x7d,0xe1,0xef,0xab, - 0x70,0x80,0x1f,0x79,0x95,0x22,0xe9,0x15,0xcc,0x8f,0x76,0x8f,0xdb,0xe0,0x5c,0x40, - 0xa8,0x9e,0xfd,0x7f,0x53,0x90,0xa7,0x05,0x62,0x01,0x90,0x11,0xf6,0xf4,0xec,0x82, - 0x0a,0xd3,0xb0,0xa7,0x14,0x1e,0x04,0x37,0x6b,0x5b,0xc4,0xc5,0x5e,0xee,0x85,0x07, - 0xe4,0xf9,0xb5,0x8a,0xac,0x1f,0xe5,0x21,0x64,0x6a,0xbf,0xc5,0xb5,0xe2,0x2f,0x76, - 0xa3,0x13,0xb5,0xe5,0x5e,0x9a,0xea,0x36,0x63,0x61,0x87,0x5e,0x8b,0x9c,0x5a,0x1e, - 0x4d,0x9b,0x39,0xc7,0xce,0x5e,0x0a,0xcb,0x19,0x5d,0x40,0x04,0x09,0x94,0x14,0x56, - 0x57,0xb3,0x4a,0x3e,0x48,0x78,0xd6,0x70,0xe7,0x6c,0xf0,0xf1,0xd6,0x7d,0xb2,0xf1, - 0x59,0x43,0x52,0x1f,0xb0,0x87,0xae,0xe3,0xe0,0x47,0x35,0x6a,0x73,0xf0,0x0d,0x93, - 0x49,0x1c,0x10,0xf7,0xab,0x57,0x45,0x23,0xbb,0xd1,0xf9,0x15,0xf1,0x46,0xfa,0xf8, - 0x03,0x15,0xff,0x8c,0x5b,0x98,0x6f,0xfb,0x0f,0xf8,0x8f,0x9f,0xdd,0xca,0x00,0x78, - 0xe4,0xfd,0xd0,0x4b,0xbf,0xbd,0x06,0x8b,0xcc,0x78,0x84,0x57,0x74,0x96,0xc3,0xac, - 0x65,0xfe,0xfe,0x72,0x59,0x45,0xcf,0x29,0x6c,0xd0,0x4b,0xdc,0xdf,0xe5,0x06,0xc8, - 0x29,0x87,0x34,0xfd,0x4a,0xd9,0x07,0x48,0x86,0xb5,0x86,0x8e,0x5c,0xc9,0x62,0x28, - 0xac,0x94,0xc0,0x13,0x27,0x31,0x26,0x67,0xcd,0x78,0x3b,0x6c,0x7d,0x1a,0xdf,0x58, - 0x0d,0xfd,0x21,0x97,0xc7,0x27,0xb4,0xc5,0x03,0x08,0x09,0x80,0x1c,0x58,0x92,0xb9, - 0x0d,0xd2,0x98,0xcd,0xf6,0x1a,0xe5,0x3a,0x26,0x3f,0xad,0xc1,0x5d,0xf8,0x17,0x59, - 0x2f,0x24,0x58,0x07,0xb9,0x8e,0xed,0x7f,0xd3,0xba,0x87,0xd8,0x5c,0xbe,0x3a,0xf3, - 0x62,0xaf,0x2b,0x22,0xfd,0x42,0x82,0x0f,0x7f,0x08,0xc0,0x37,0x2c,0x43,0x56,0xa5, - 0x31,0xae,0x77,0x53,0xd3,0x29,0xc7,0xb0,0x36,0x44,0xc8,0xc7,0x7b,0xce,0x57,0xf0, - 0xe6,0xc7,0x2a,0x80,0x03,0x3d,0xc8,0x21,0x21,0xfd,0x85,0xca,0x31,0xcd,0x9b,0x62, - 0xe5,0x6f,0x81,0x11,0xee,0xd0,0xd9,0x19,0x2e,0xce,0x0f,0x46,0xbd,0x0f,0x97,0x7b, - 0x28,0x91,0x12,0xc0,0x7a,0x99,0xc2,0xe4,0x54,0x27,0xaf,0x16,0x7c,0xfb,0x72,0xa3, - 0x25,0xaa,0xb0,0x16,0x9f,0x29,0x63,0x00,0xc3,0x5a,0xe6,0xac,0xc7,0x6a,0x11,0xc5, - 0x96,0x39,0x51,0x07,0x33,0x2a,0xbd,0x12,0xa8,0xf0,0x88,0x90,0x37,0x39,0x9d,0xaa, - 0x7a,0x78,0x69,0x17,0x10,0x8c,0x67,0xc1,0xa2,0x43,0xeb,0x8a,0x27,0x68,0x64,0xe8, - 0x09,0x48,0xb8,0xf2,0x73,0x19,0x6c,0x1d,0xa1,0xa9,0xf4,0xcd,0x5b,0x88,0x75,0xe0, - 0x09,0x72,0xf4,0x29,0xf0,0xc8,0x99,0xbc,0x5f,0x1b,0x0c,0x3e,0xfe,0xdc,0x0f,0x5a, - 0x61,0x21,0x7c,0x10,0x61,0xaa,0xbf,0xba,0xe3,0x40,0x53,0xa4,0x41,0xca,0x9a,0xe8, - 0xf3,0x9a,0x67,0x82,0x9a,0xaa,0x09,0xb8,0xcf,0x79,0xc7,0xb9,0xc3,0x94,0x96,0xdb, - 0xab,0x53,0xaa,0xcc,0xf3,0x76,0x33,0x28,0x04,0x57,0x12,0x68,0x07,0xb8,0x10,0x5a, - 0xb8,0x54,0xd6,0x92,0x28,0x3d,0xb6,0x0b,0x65,0xbb,0xdb,0x1a,0x78,0xcd,0xef,0x26, - 0x40,0x25,0xd9,0x4c,0xbb,0x6e,0x71,0x1f,0xc4,0xb1,0x9f,0x72,0xdd,0x75,0x2a,0x99, - 0xb7,0x72,0x73,0xbd,0x99,0xda,0x01,0x7b,0x78,0xe6,0xfd,0x1d,0x9a,0x6b,0x04,0x79, - 0x21,0x52,0x82,0xb1,0xb0,0xfe,0x40,0x53,0x5c,0xfd,0xac,0x37,0x04,0x7a,0x72,0xb8, - 0xc0,0xbe,0xd8,0x67,0x01,0x9e,0xb0,0xc3,0x4b,0xa7,0xc5,0xa6,0x94,0x1d,0x85,0x37, - 0x5d,0x92,0xbf,0x76,0x92,0x9d,0x45,0x1d,0x0b,0x03,0xc5,0x21,0xe6,0x93,0x18,0x82, - 0x91,0xf2,0x1b,0xe6,0xdd,0x5f,0x63,0x88,0x08,0x50,0x59,0x4e,0x7c,0x8e,0x25,0x80, - 0x62,0xc0,0x74,0x45,0xd3,0x57,0x86,0xf1,0x06,0x74,0x9f,0x06,0x92,0x8b,0x6c,0x82, - 0x25,0x27,0xcd,0xb2,0xf2,0x56,0x64,0x37,0xa1,0x49,0xe7,0x67,0xd0,0xaa,0x95,0xde, - 0x8c,0xa6,0xcf,0xc7,0x4d,0x2d,0x52,0x63,0x54,0x7f,0x79,0x9e,0x2c,0x89,0x3a,0xa3, - 0x00,0x0c,0x19,0x05,0x32,0xcf,0x55,0xdd,0x02,0x58,0x60,0xc4,0xac,0xc8,0x38,0xbd, - 0xa7,0x9e,0xe0,0x6d,0x3b,0xaa,0xf5,0x5b,0x18,0x5b,0xf1,0x5c,0xf8,0x67,0x98,0x1d, - 0xc2,0xf8,0x22,0x0f,0x01,0x31,0x0d,0x4b,0x11,0xf4,0xa0,0x80,0xda,0x1c,0x07,0xc9, - 0xb0,0xb7,0x47,0x01,0xae,0xc5,0xa9,0xb8,0x09,0xf5,0x0c,0x27,0xfb,0xc8,0x09,0xb0, - 0x29,0x14,0x08,0xee,0x81,0xba,0x8e,0x19,0x04,0xfb,0xa1,0x80,0x5a,0x17,0x64,0xbe, - 0xd5,0xa3,0x39,0xbf,0x6b,0x9d,0x36,0x46,0x0b,0x51,0xec,0x49,0x89,0x3e,0x9a,0x43, - 0x48,0x19,0x4c,0xae,0x15,0xe2,0x3e,0x56,0x46,0x50,0x79,0x2c,0x92,0x27,0x1c,0xc9, - 0x25,0xb3,0xff,0x90,0x45,0x7b,0xac,0xce,0x4b,0xa1,0x57,0xb0,0x2e,0x14,0x36,0xa8, - 0x8d,0x09,0xe5,0x78,0xf8,0x32,0xc8,0x06,0x69,0x08,0xad,0xfc,0xb3,0xd4,0x97,0xb7, - 0xf0,0x43,0xfa,0x86,0x12,0x92,0xca,0x32,0xe7,0x60,0x96,0x86,0x20,0x44,0x6d,0xa9, - 0xa4,0x8a,0x68,0x9f,0xf6,0x10,0x02,0xa1,0x3d,0x6e,0xe8,0x41,0x49,0x8d,0xe1,0x36, - 0xe1,0xc0,0xdb,0xfc,0xf7,0x52,0xa7,0x21,0x79,0xae,0xe5,0x1a,0x3d,0x33,0xa9,0x32, - 0x41,0x28,0xd6,0xe7,0x9f,0xe1,0x6d,0x41,0x0f,0x52,0x83,0xa4,0xa9,0x4c,0x76,0x20, - 0xf9,0xd9,0xf8,0xc2,0x66,0xfe,0xa0,0xe8,0x47,0x04,0x74,0x75,0x7f,0x6c,0xff,0xa1, - 0x83,0x28,0x28,0x7b,0xba,0x51,0x7c,0x90,0x8f,0x86,0x07,0x89,0xb6,0x66,0xb5,0xbd, - 0x6f,0x65,0x46,0x1b,0x6a,0x8f,0xb1,0xea,0x3c,0x4d,0xa8,0x8f,0x33,0x67,0xbb,0xef, - 0x6c,0xe3,0xa1,0x55,0xc3,0x52,0x2b,0x60,0xe9,0x64,0x06,0x89,0x2f,0x7d,0xf1,0x0a, - 0xc4,0xa3,0xe7,0xfc,0x64,0x07,0x4c,0x8a,0xa7,0x19,0x25,0x5c,0x96,0x39,0x39,0x9e, - 0x19,0xb6,0x2c,0x20,0x2d,0x04,0xcb,0x4a,0xec,0x16,0x4b,0x5b,0xfc,0x4f,0xf4,0x30, - 0xf4,0x1f,0xb2,0xc8,0x4a,0xa2,0x15,0x8a,0xb0,0xcc,0xcd,0x13,0x51,0xec,0xeb,0x97, - 0xe1,0x10,0x3d,0x8f,0x76,0x9a,0x8f,0x59,0x32,0x6a,0x2c,0xbd,0x6b,0xa2,0x5a,0xb4, - 0xa2,0x81,0xfe,0xca,0x6e,0xf6,0x4c,0x8b,0x25,0xc3,0xa9,0x6e,0x58,0xac,0x54,0xfe, - 0x6e,0x89,0x2a,0x73,0xb2,0x59,0x6c,0xcf,0xa4,0x2e,0x85,0x04,0x29,0x72,0x9c,0x8c, - 0x44,0xed,0x44,0x8f,0x62,0xa7,0xf3,0x59,0x3a,0xc1,0x7c,0x10,0xb6,0x66,0x12,0x25, - 0xee,0x8b,0x60,0xdb,0xfb,0x1e,0xc0,0xca,0xa9,0x60,0x42,0x4e,0x7e,0x4b,0xe4,0x0e, - 0x52,0x65,0x24,0x78,0xc9,0xde,0x0e,0x51,0x50,0x7f,0xd4,0x08,0x1d,0xfd,0xba,0xa0, - 0xcc,0xba,0xe9,0xdd,0x7d,0xa0,0x2f,0x98,0x5d,0xc1,0xa6,0xd4,0xbf,0x20,0xf3,0xbd, - 0xc2,0xd0,0x46,0x47,0xfc,0xf0,0xa0,0xd0,0x9c,0x07,0xd3,0x9a,0x76,0xa5,0xd0,0x7f, - 0xa5,0x26,0xab,0xa2,0x35,0x0d,0x1d,0xa7,0x30,0x96,0xf5,0xa2,0x1c,0x22,0x6c,0xe6, - 0x20,0xa6,0x6b,0x35,0x2f,0xcf,0xec,0x80,0x10,0xb8,0xfa,0xe6,0xf6,0x24,0x52,0xe6, - 0xa8,0x13,0xa7,0x52,0x0f,0x51,0x83,0x70,0xd1,0x5c,0xa4,0xe7,0x1c,0x5d,0x12,0x33, - 0xae,0x99,0xe1,0xfc,0xf9,0x43,0xb1,0x1d,0x1b,0xb4,0xcb,0x2b,0x9f,0x6c,0x6d,0x93, - 0xed,0x6a,0xb4,0x2a,0x52,0xc8,0xc6,0x11,0x4b,0x2a,0x79,0xf5,0xfb,0x5c,0x33,0x77, - 0xef,0x43,0x98,0xa6,0xb3,0x3e,0x88,0x2f,0xb9,0xba,0xce,0x89,0x95,0x09,0xee,0x16, - 0x5b,0x62,0xbf,0x1a,0x27,0x46,0xab,0x84,0x59,0xcc,0x86,0xae,0xde,0x52,0xc0,0x0f, - 0xc0,0xd7,0xa7,0xcf,0xf0,0x0f,0x5e,0x41,0x17,0x77,0xcf,0x2d,0x4a,0xd3,0x45,0x67, - 0x73,0xd9,0xbb,0x70,0x75,0x6a,0x2a,0xb3,0x6d,0x1b,0x6c,0xbf,0x35,0xd0,0xa2,0x35, - 0xa1,0x31,0xc0,0x13,0x27,0x09,0x0e,0x98,0xec,0x8b,0xf8,0xef,0x97,0xa6,0x70,0x6a, - 0xbd,0x95,0xfb,0x17,0x0c,0x46,0xee,0xd5,0x01,0x88,0x0a,0x78,0x0f,0xb8,0x31,0x54, - 0xcd,0x9a,0xaf,0xf0,0xeb,0xfc,0xef,0x09,0x42,0xd1,0xb5,0x10,0x5a,0x5e,0xe9,0x2b, - 0xd2,0x3e,0x55,0x30,0xd7,0x45,0xad,0xc4,0x81,0x0a,0xfe,0x79,0x87,0x5b,0x4c,0x48, - 0xc8,0x4a,0x13,0x9b,0xf9,0x91,0x6d,0x53,0x6b,0xc1,0x91,0x42,0xbb,0x23,0x2e,0xc0, - 0x1c,0xb4,0x19,0x53,0xe8,0x87,0xff,0xf0,0x20,0xe5,0xe5,0x66,0x12,0x91,0x0c,0x12, - 0x8f,0x5a,0x62,0xc5,0x94,0x6c,0xea,0xde,0x79,0x2e,0xf1,0x27,0x83,0x6f,0x07,0x95, - 0xa1,0xbc,0x1a,0xe6,0xb3,0xbe,0xc9,0x37,0x09,0x60,0xc7,0xd7,0xf1,0xe6,0x7e,0x79, - 0xd4,0x0c,0xb8,0xac,0xd2,0xe9,0x6a,0x88,0x20,0x0b,0xcd,0x84,0x1c,0x62,0x31,0x22, - 0xe4,0x69,0xc0,0x70,0x15,0x24,0x67,0x37,0x89,0x4e,0x80,0x71,0xff,0x68,0xc3,0xb1, - 0xbb,0x97,0x3e,0x2e,0x1d,0xd0,0x08,0x66,0x25,0xf9,0x20,0xcd,0x73,0xe9,0x77,0x6d, - 0x49,0x04,0x75,0xa5,0x9b,0x28,0x11,0xf8,0xa0,0x4c,0xa3,0x15,0xf0,0xbc,0xc2,0x25, - 0x84,0xa5,0xe4,0x35,0xf3,0xd9,0xb6,0xd9,0xeb,0x08,0xb4,0xce,0x60,0xc7,0x02,0x85, - 0xe8,0xf6,0xd4,0xfe,0x1d,0xac,0x22,0xc6,0xe5,0x44,0xc4,0xde,0x79,0xec,0xca,0xce, - 0x42,0x90,0xda,0x1f,0x7d,0x95,0x2e,0xad,0x88,0xfe,0x02,0x46,0x9b,0x9a,0xcb,0x25, - 0x1e,0xa0,0x74,0xda,0x70,0x28,0xe4,0xc8,0x6a,0x0b,0xbd,0xdf,0xe5,0xc4,0x7c,0x71, - 0xc0,0xfd,0xf9,0x8b,0xd8,0x2c,0x45,0x9b,0xce,0xc1,0x23,0x91,0x68,0x17,0x58,0xa7, - 0xe0,0xdc,0x35,0x2f,0x7f,0x43,0x62,0x18,0x53,0xe0,0x49,0xdb,0xa7,0xa4,0x4b,0x51, - 0x63,0x0d,0xcb,0xd9,0x67,0x4c,0x01,0xe2,0x21,0x2a,0x51,0x94,0x25,0x2e,0x75,0x64, - 0xe9,0xf0,0x2c,0x1d,0xc3,0xa4,0xc0,0xcb,0x34,0x0f,0x68,0x0c,0x13,0x86,0x7c,0x42, - 0x81,0x53,0xd4,0x1b,0xd9,0xc1,0x2c,0x4e,0xcc,0x5d,0xac,0x94,0x19,0x6f,0xb4,0x63, - 0x51,0x9a,0x1d,0x34,0x05,0x03,0x7f,0xeb,0xec,0xa7,0x26,0x47,0x05,0x6a,0xad,0xad, - 0x93,0x9a,0x66,0xc5,0xb4,0x7c,0xb9,0x3a,0x1b,0x0f,0x2f,0x56,0x88,0x62,0xf2,0x77, - 0x48,0x82,0xb2,0x6a,0x82,0xfa,0x63,0x11,0x18,0x85,0x4e,0xd3,0x1a,0x82,0xe8,0xb3, - 0x00,0xb2,0x78,0x34,0x3a,0x3b,0x5c,0xf5,0xe5,0x85,0xac,0xc3,0x8f,0x7b,0xdb,0x43, - 0x1b,0xba,0xa4,0xa6,0xc0,0xa8,0xa4,0x50,0x17,0x15,0x0f,0x07,0xf7,0xf8,0xd4,0x32, - 0x80,0xbb,0xe0,0xf1,0xe2,0x1a,0x0c,0x85,0x81,0x06,0xea,0xd4,0x53,0xf7,0xda,0xef, - 0xdb,0xe2,0x61,0x46,0x98,0x3d,0x61,0x0d,0x02,0xc8,0x8f,0x5b,0x18,0x13,0xaa,0x1b, - 0x0b,0x10,0x3e,0xb1,0xc7,0x2a,0x68,0x95,0x4a,0xb5,0x97,0xca,0x93,0x7b,0x19,0x6b, - 0x5d,0xb4,0x62,0x74,0x08,0x74,0x4e,0x4b,0x4b,0xd4,0x8d,0x4f,0x5b,0xd4,0x03,0xad, - 0x49,0xb5,0x3f,0x3d,0xb8,0xe5,0x92,0xee,0x09,0xfc,0x3b,0xde,0xda,0xdc,0x53,0xa9, - 0x5e,0x24,0x68,0x15,0x1c,0xed,0x79,0x84,0x02,0xaa,0x08,0x2e,0xc5,0xd4,0xd5,0x4c, - 0x52,0x1d,0x06,0x48,0x1a,0x51,0x6d,0xaf,0xa0,0x77,0xe8,0xd8,0xd9,0x19,0x35,0x23, - 0x2d,0x5d,0xd5,0x6e,0xc4,0x7d,0x69,0x84,0x92,0x33,0x86,0x36,0xf9,0x2a,0xf4,0x68, - 0x56,0x5d,0xff,0xad,0xa2,0x93,0x1f,0x0c,0x0b,0x61,0xe9,0xd8,0x59,0xc3,0x74,0xa7, - 0x2a,0x12,0xec,0xa5,0x6b,0x86,0x39,0x84,0xe8,0xcd,0x12,0x1f,0x57,0xa2,0xe9,0x02, - 0x83,0x82,0x47,0x75,0xb7,0x29,0x0d,0x10,0x24,0x4e,0xa3,0xa4,0xd4,0x58,0xaa,0xfb, - 0x6a,0x6c,0xb2,0x14,0x87,0xa9,0x6a,0xad,0xae,0xa5,0xf2,0x37,0x2c,0xe8,0xc9,0x02, - 0xb7,0x69,0x81,0xed,0x7d,0x53,0x4f,0x25,0x2d,0xcd,0x89,0xa2,0xda,0x80,0x85,0xfb, - 0xb6,0x45,0xea,0x93,0xcf,0xbc,0x01,0xc9,0x69,0xce,0xfd,0x4d,0xbd,0xee,0x1e,0x7b, - 0x8b,0x29,0x0c,0x7e,0xfd,0xe0,0x57,0x1e,0x9e,0x3d,0x62,0x75,0x67,0x05,0x7f,0xc1, - 0x3f,0x8f,0x4c,0xa6,0x1f,0xaa,0xe3,0xc0,0xb8,0x55,0x82,0x96,0x5b,0x80,0xf2,0xd0, - 0xb2,0x2b,0xdb,0xf7,0x24,0x09,0x76,0x61,0x6f,0x6b,0x91,0xc9,0xe4,0xeb,0xeb,0x40, - 0xbf,0x36,0xb0,0x45,0x72,0x58,0x20,0x17,0x62,0xce,0xc1,0x85,0xf4,0x54,0x2a,0x1f, - 0x3f,0x63,0x9a,0xf0,0xb0,0xa5,0x4d,0xdb,0xef,0x88,0xa0,0x5b,0xef,0x25,0xa8,0xd8, - 0x8e,0x87,0x6e,0x40,0x13,0xb7,0x44,0x3c,0xa4,0xc6,0xc4,0x02,0x6e,0xe1,0xf9,0x0b, - 0xbf,0x51,0xfa,0x0b,0x49,0xc6,0x0e,0x19,0xac,0xd4,0xcd,0x16,0xcc,0x27,0x8b,0xd9, - 0x01,0x85,0xd6,0xe0,0x12,0x06,0x69,0xa4,0x26,0xaf,0x9b,0x22,0x2c,0x4a,0x44,0x66, - 0x7a,0xe0,0xdc,0x7a,0x91,0x5a,0x70,0x0c,0x0c,0x83,0xad,0x6b,0x04,0x51,0x14,0x66, - 0xe6,0x3c,0x15,0x35,0x90,0x5b,0xd6,0x09,0x32,0x6b,0x84,0x78,0xbe,0x6e,0x5d,0x77, - 0x44,0xdf,0xeb,0x53,0x63,0xcc,0xe3,0x2d,0xba,0x8f,0xe5,0x0d,0xbe,0xfd,0x0d,0x72, - 0x64,0x3e,0xe3,0x4b,0x99,0xae,0xe0,0x3c,0x0d,0x6f,0x0a,0x8c,0x53,0x32,0x02,0xba, - 0x87,0x15,0xac,0x87,0x10,0xde,0x0a,0x02,0x0c,0x01,0x23,0xd5,0x00,0x71,0x3e,0x50, - 0xce,0xd5,0x13,0xcc,0xcc,0xb8,0x6a,0x8b,0x8e,0x60,0xab,0x48,0xf8,0x0c,0x7b,0x61, - 0xa0,0x17,0x35,0xc0,0x90,0x2e,0x4b,0x9f,0x0d,0x23,0x9c,0x58,0x15,0x51,0x13,0x71, - 0xc7,0xa5,0x2e,0x7f,0x9f,0xfe,0x38,0xb1,0x63,0x91,0xdb,0x9b,0x00,0x55,0xdb,0x80, - 0x87,0x41,0xe7,0xc4,0x87,0xd8,0x4b,0xf1,0x4d,0xdb,0x8c,0xc1,0x8b,0xfb,0x7b,0xf2, - 0xa4,0x98,0x40,0x44,0x7f,0xbd,0x7c,0xcf,0x98,0x88,0x48,0x85,0x1b,0xfa,0xf2,0xfc, - 0x84,0xd4,0xdb,0xbe,0x7c,0x2f,0x47,0x1c,0x17,0x8d,0x41,0x94,0x92,0xf9,0x92,0x11, - 0x06,0x48,0xec,0x11,0xc3,0xac,0xbd,0xd3,0x12,0x78,0x6d,0x0f,0x41,0x4c,0x91,0x8c, - 0xc7,0xbb,0xd8,0x2f,0x2c,0xf5,0x71,0x40,0xcd,0x47,0xa3,0xee,0x7a,0x55,0xf1,0x48, - 0xd5,0x08,0x63,0x9c,0x6d,0xa2,0x92,0x3f,0x9a,0x64,0x84,0x0f,0x01,0x26,0x80,0x2f, - 0xdb,0x6c,0xd9,0x2b,0x3e,0xbe,0x83,0xc9,0x17,0x47,0xe7,0x9f,0x6d,0x05,0xef,0xb3, - 0xea,0x16,0x3c,0xf9,0x56,0x98,0xfb,0x44,0x60,0x76,0x53,0xcc,0x89,0x0d,0xa6,0xcf, - 0x41,0xdd,0x7e,0x3e,0x2a,0xf3,0xe0,0x81,0xe3,0x7a,0xa7,0x6a,0x5a,0x3f,0x75,0x25, - 0x44,0x44,0xf6,0xce,0x0c,0xd9,0xe8,0xe3,0xef,0x03,0x49,0xcb,0x8b,0x3c,0x39,0xb2, - 0x51,0x35,0x77,0xbc,0xcf,0x31,0xe1,0x2b,0xea,0xeb,0xac,0x41,0x85,0x2d,0x90,0x2a, - 0xd2,0x60,0x35,0xde,0x9b,0x12,0xbf,0xdb,0x42,0x52,0x3f,0xdb,0x99,0xbe,0x3a,0xf3, - 0x38,0xaf,0xca,0x19,0x34,0x4e,0x2e,0x09,0xcd,0xc6,0x34,0x3a,0x86,0x94,0x1b,0x92, - 0x04,0x69,0xa0,0xd6,0xc5,0x12,0x8d,0xa2,0x51,0x49,0xfb,0x30,0x85,0xa4,0x90,0xf2, - 0xbc,0xad,0xc1,0x3a,0x98,0x4e,0x10,0x61,0xdc,0xef,0x76,0xd6,0x0a,0xc9,0x31,0xc1, - 0x76,0x0c,0x2e,0xb9,0x49,0x67,0x1f,0xc0,0xad,0x03,0x3e,0x02,0x3a,0xc6,0xa0,0x7f, - 0x26,0x89,0x0d,0x26,0x31,0x64,0x6a,0x9f,0xb5,0x3f,0x88,0x78,0x9a,0x35,0xcd,0x48, - 0x81,0x32,0x83,0x36,0xf8,0x74,0x02,0x8f,0xe0,0x20,0xfe,0x4c,0x63,0xc1,0x18,0x49, - 0x25,0x05,0x1c,0x47,0x10,0x71,0x42,0xe3,0x70,0xeb,0x43,0x76,0xee,0x87,0x22,0x33, - 0x0e,0x81,0x7d,0x37,0x78,0x56,0xb4,0x8b,0xe1,0x37,0xce,0x5c,0x53,0x64,0x62,0x49, - 0xbf,0x05,0xa1,0x0b,0xf9,0x87,0x32,0xa5,0xa1,0x79,0xcc,0x1e,0x5c,0x24,0x06,0xf3, - 0xa8,0x81,0xec,0x14,0xf2,0xaf,0x1c,0x4a,0xa2,0xa8,0xbd,0xcd,0xc5,0x09,0x49,0xf2, - 0x2b,0x0c,0x61,0xfe,0x56,0x81,0xbf,0xbb,0xd8,0x42,0xf2,0x23,0x08,0x1e,0x8b,0xfb, - 0x0b,0x23,0x28,0x83,0x45,0xdd,0x3b,0x24,0x20,0x3a,0x73,0xb7,0xfb,0xbd,0x04,0x08, - 0x06,0x87,0x76,0x2e,0xf1,0xbd,0xde,0x1a,0xf5,0x31,0xb2,0xc2,0x45,0xe7,0xd4,0x2b, - 0x58,0x63,0xf0,0xb2,0x99,0x7a,0x11,0xfc,0x15,0xd9,0xe2,0xfd,0x64,0xed,0x47,0xaf, - 0xa8,0x2c,0x77,0x2f,0x71,0x9f,0xff,0xfa,0xd5,0x44,0xd7,0x8f,0x6f,0x6f,0x29,0x49, - 0x88,0xcf,0x9a,0x3f,0x68,0x4a,0x24,0x3e,0x09,0xed,0xec,0x44,0x2b,0xfe,0x95,0x53, - 0x44,0x6d,0xfb,0x97,0x0a,0xf6,0x6a,0x88,0xe0,0x90,0x73,0x55,0xaa,0x30,0x46,0x6b, - 0x82,0x1c,0xf2,0x07,0x5a,0xb7,0x0d,0x4f,0x88,0xb0,0x2e,0xab,0x9d,0xda,0x65,0xc0, - 0x1b,0x1f,0xa3,0x29,0x7e,0xbf,0x4b,0x94,0x1f,0xf9,0xcb,0x3f,0xf4,0xa6,0x07,0x90, - 0x02,0x15,0x0d,0xaa,0x35,0xe6,0x07,0xb5,0xc0,0xd3,0xab,0xb1,0x9a,0xf6,0xe7,0xf8, - 0xfa,0x65,0xd3,0xc2,0xd3,0x0b,0x2b,0xba,0x97,0xc8,0xb4,0x4a,0x40,0xd9,0xf1,0x97, - 0xe9,0x8f,0xf6,0x65,0xbf,0xea,0x22,0xf6,0x82,0xd6,0x4a,0x16,0xf1,0x22,0x66,0xed, - 0x43,0x69,0x78,0xf4,0x36,0xc9,0xd6,0x11,0x5d,0xc7,0x47,0x07,0x5e,0xdb,0x05,0x75, - 0x4a,0xa6,0x21,0xae,0x6d,0xaa,0x2c,0x02,0x6f,0xea,0x0e,0x86,0xc3,0x78,0x0a,0x73, - 0x89,0x92,0x22,0x92,0xee,0xcc,0x28,0x9d,0x4b,0xb8,0x16,0xea,0xea,0x2c,0x0a,0x7a, - 0x42,0xd8,0xd0,0x06,0x3d,0xed,0x14,0xbc,0xca,0xf4,0x3b,0x28,0xfe,0x6f,0x78,0x6b, - 0x09,0x92,0x60,0x7c,0x62,0x7a,0x77,0xe8,0x53,0x57,0xb4,0xa2,0x20,0xd1,0x8e,0x1d, - 0xab,0xb4,0x3d,0x82,0x55,0x90,0x0e,0x4b,0xc8,0xbb,0xcf,0x23,0x02,0xd6,0x0c,0xc9, - 0xd5,0xe1,0x25,0x8c,0x2e,0x41,0x2e,0xe5,0xea,0xab,0x62,0x9f,0x42,0x73,0xdb,0x5c, - 0x75,0x6a,0xf5,0x4e,0x3b,0x39,0x38,0x35,0x68,0x6f,0x4c,0x1e,0xd7,0xd0,0x45,0x27, - 0xc9,0x6c,0x38,0xb6,0x64,0x81,0x6d,0x06,0x57,0x32,0xb7,0x43,0xa9,0xd3,0xf6,0x3b, - 0x42,0x85,0x8d,0xb2,0xc3,0xc0,0x9f,0x64,0x3b,0xd6,0x49,0x1f,0x57,0xd2,0xdb,0x60, - 0x47,0x3f,0xde,0x9d,0x7f,0x36,0x9c,0xb0,0x54,0xc8,0xcf,0x35,0xaa,0x33,0x10,0x42, - 0x01,0x8e,0x0c,0x08,0xf1,0x55,0x18,0x37,0x2e,0x20,0xcf,0x8e,0x9d,0x76,0x59,0x81, - 0x8d,0x3d,0x21,0x38,0x10,0x77,0x37,0xd2,0xa8,0xe2,0x97,0x99,0xae,0x46,0x77,0x27, - 0x91,0xc1,0x1f,0xe6,0x7d,0xe3,0xc6,0x40,0xf1,0xaf,0x6c,0x24,0xef,0x25,0x5e,0x9a, - 0x66,0x3b,0xd8,0xbd,0xde,0xd5,0x38,0xe6,0xbf,0x4d,0x47,0x4f,0xa2,0xf5,0x7a,0xa9, - 0xf8,0xe9,0xb5,0x57,0x97,0xb7,0x53,0x6f,0x24,0x68,0xe9,0x69,0x6f,0xb8,0x41,0x4b, - 0x6f,0x1c,0x41,0x54,0xa2,0xc2,0xf5,0x98,0x17,0x3b,0x31,0xfa,0x5b,0x32,0xad,0x43, - 0xef,0x8a,0x50,0x66,0x36,0xf8,0x6a,0x80,0x43,0x4a,0xe9,0x14,0xdd,0x9c,0x62,0xf9, - 0x2c,0x85,0xfc,0x3c,0x18,0xe4,0x50,0x22,0x4d,0xca,0x94,0x82,0x92,0x65,0x00,0x9f, - 0x4e,0x69,0x8d,0xef,0x81,0x8b,0x32,0x2b,0x26,0xd8,0x3a,0x01,0xd9,0x3c,0xa3,0x1a, - 0xb4,0x77,0xc2,0x01,0x4c,0xde,0x0d,0x13,0x0e,0xda,0xcd,0xbc,0xb7,0x6c,0x3b,0x79, - 0x89,0x2b,0x43,0x95,0xbf,0x7d,0xbf,0x39,0xd1,0x46,0x1f,0x21,0x0b,0x1f,0x74,0x28, - 0x6e,0xaa,0xc1,0x7a,0xc6,0x4d,0x20,0xc0,0xce,0xfe,0xf0,0x55,0x62,0x79,0x29,0xa9, - 0x83,0xcf,0x91,0x79,0xbe,0x12,0xd6,0xe8,0x73,0xc7,0x68,0xfa,0x01,0x81,0x1d,0x4d, - 0x6f,0x0d,0x83,0xe1,0xe8,0xa3,0xb3,0xf6,0x1e,0x71,0x62,0x50,0xb2,0x3b,0x69,0x1b, - 0x53,0x3e,0xcd,0x67,0x13,0x0b,0x39,0x00,0xae,0xaf,0x58,0x4b,0x03,0x0e,0x74,0xe0, - 0x20,0x30,0x92,0x82,0x5f,0x35,0x54,0xe3,0x9f,0xdd,0x67,0x97,0x8a,0x5f,0x66,0x87, - 0x07,0x9c,0x8f,0x99,0xed,0x1a,0xaa,0x00,0x9a,0xb1,0x4f,0x45,0x0f,0x5c,0xb0,0xfc, - 0x65,0xf0,0x25,0xc1,0x26,0xe6,0x3f,0xa7,0x47,0x7f,0x66,0xd4,0x8e,0x51,0xad,0x82, - 0xd5,0x3d,0x08,0x02,0x32,0xa5,0xe2,0x4c,0xc1,0x7e,0xee,0x06,0x0f,0x5c,0xf1,0xf2, - 0x38,0xd6,0xde,0x7e,0xc1,0xd8,0xf0,0x1c,0xbf,0x29,0xe5,0x04,0xda,0x59,0xdb,0xeb, - 0xd3,0x04,0x8a,0xd1,0x34,0xe5,0x6b,0x01,0xe3,0x58,0xf4,0x73,0xd6,0x7f,0xa2,0x6c, - 0x13,0x99,0x5a,0x54,0x32,0x6b,0x5a,0xfe,0x85,0x7b,0xe0,0x05,0xd2,0xf0,0x5a,0xfe, - 0x57,0xc6,0x50,0xee,0x4c,0x3a,0x2f,0x59,0x0c,0xb3,0x82,0x15,0x56,0x7d,0xb4,0xe5, - 0xae,0xb0,0xf6,0x10,0xc7,0x35,0x27,0x9b,0x00,0x27,0xe5,0xdd,0x42,0x5b,0x56,0x18, - 0x24,0x26,0xf0,0x0d,0x2d,0x16,0x29,0xb0,0xef,0x91,0x6d,0x80,0x07,0x4c,0x5a,0xe9, - 0xef,0x45,0xd9,0x19,0x57,0x5c,0xa7,0x56,0x8d,0x98,0xc4,0x5c,0xc2,0x0f,0x17,0x4b, - 0x5a,0x94,0xcd,0xa0,0x39,0x6e,0xf9,0xd9,0x12,0x57,0xec,0x45,0x7e,0xf5,0x3f,0xcb, - 0x28,0x1c,0xb5,0x34,0xab,0x34,0xcd,0x08,0x72,0xd8,0x0b,0x0c,0xfc,0xff,0x7d,0xc1, - 0x13,0x09,0xea,0xbe,0x95,0x29,0x26,0xfe,0x46,0x10,0x86,0x9c,0x3c,0x82,0xa6,0xd4, - 0xd6,0x4a,0xe3,0x81,0x07,0x37,0x4b,0xcf,0x07,0xe7,0x42,0x8d,0xbf,0x7e,0xfe,0xd6, - 0x2f,0x83,0xfe,0xc4,0x87,0xe2,0xca,0x0a,0x6d,0x88,0x87,0x7d,0xdd,0xfd,0x5a,0x1d, - 0xa3,0x06,0xde,0xa4,0xd3,0x8b,0x1a,0x24,0xe3,0x46,0x71,0xca,0x56,0x42,0x70,0x40, - 0x4d,0x0e,0xe2,0x07,0x65,0xb0,0x60,0xb2,0x44,0x7a,0xe6,0x84,0xa4,0xc2,0x51,0x2f, - 0x21,0x88,0xd5,0x9a,0xfb,0x61,0x99,0xcd,0xa3,0x62,0x15,0x5a,0xb8,0xe1,0x69,0xb1, - 0xcb,0x88,0xb7,0x2d,0xb0,0x30,0x61,0xb3,0xc4,0xb8,0x4d,0xc6,0xff,0x0f,0x96,0x42, - 0x22,0x1f,0x14,0x5a,0x34,0x90,0x87,0x68,0xe7,0xeb,0xc0,0x22,0x54,0x04,0x68,0x70, - 0x05,0xd7,0x14,0x6b,0x70,0x67,0xbf,0x8d,0x80,0x9e,0xdb,0x0a,0x31,0x45,0x9b,0xb1, - 0x9e,0x49,0x95,0x5f,0xb0,0xf3,0x59,0x8c,0x01,0x1d,0x0f,0x17,0xae,0xc9,0x9f,0xb9, - 0xe4,0x4a,0x0a,0xe9,0x72,0x18,0xbe,0xf5,0xe7,0x5b,0xa7,0x78,0xd5,0x66,0x06,0xea, - 0x8a,0x0b,0xbc,0xa8,0x78,0x68,0x28,0xca,0xca,0x00,0xac,0x9c,0x92,0xab,0x6a,0xb8, - 0x59,0x82,0xf1,0xed,0x67,0x29,0x92,0x3a,0xe8,0xc3,0xd2,0x28,0x3a,0x96,0xc7,0xf9, - 0xc4,0x05,0xfc,0x7f,0xf2,0x09,0xc8,0x39,0x6b,0x4c,0xad,0x88,0x12,0xc9,0x8f,0xfb, - 0x0b,0x43,0xad,0x24,0x98,0x5e,0xf4,0xdb,0x4b,0xa8,0xe5,0x98,0x32,0xe8,0x54,0x64, - 0xad,0x41,0xbb,0x73,0x34,0xf9,0x6c,0x89,0x2a,0x93,0x25,0x84,0x42,0x2e,0x0e,0x2a, - 0xac,0x0e,0x93,0xbc,0xee,0x62,0xcb,0x0b,0x7f,0x21,0x6b,0xf8,0x7b,0x9a,0xaf,0xdb, - 0x9e,0x06,0x13,0xc9,0x96,0xc5,0x2d,0x44,0x2b,0xe1,0xd1,0x54,0xdc,0x6f,0x8f,0x41, - 0x8d,0x9f,0xca,0x22,0x3c,0x6e,0x3d,0x99,0xc8,0xc5,0x1b,0x78,0xb4,0xe2,0x40,0x70, - 0x7a,0x1f,0xd2,0x25,0xdb,0x13,0x16,0x42,0x81,0xaf,0xcd,0xa2,0x95,0x7b,0x46,0x6e, - 0x82,0x1c,0xb2,0xad,0xf9,0xe0,0xe3,0xb4,0x15,0x9c,0x67,0xbc,0xd4,0x8e,0x65,0xc5, - 0xaf,0x1f,0xc3,0xbd,0x30,0xbe,0xd5,0x9d,0x77,0xdf,0x9b,0x4d,0x96,0x3f,0x47,0x6a, - 0x02,0x15,0xf5,0xa7,0x79,0x3c,0xdd,0x2d,0x97,0xfe,0x26,0x15,0x1c,0x93,0xa3,0x3f, - 0xc3,0x92,0xc5,0xb7,0x22,0x5a,0x6a,0xcd,0x99,0xcf,0xc4,0xa2,0x41,0xf4,0x8c,0x49, - 0x9a,0x1f,0xea,0xac,0x2b,0x98,0x0b,0x40,0x1c,0xc0,0x5d,0xe5,0x67,0x34,0x45,0x3f, - 0x91,0xf5,0xa3,0xb8,0xb1,0x97,0x55,0x0c,0x96,0xfd,0x15,0xf5,0xe4,0x82,0x09,0x39, - 0xda,0x5a,0xc8,0x12,0x79,0x8e,0x86,0xda,0xe5,0xb6,0xe3,0x39,0xd0,0x07,0x8e,0x5c, - 0xc9,0x17,0x50,0x7f,0x0a,0xa3,0x4a,0x38,0x83,0xe9,0x3a,0xde,0xa6,0x87,0x6e,0xdc, - 0x46,0x92,0x4d,0xcd,0x46,0xb7,0x8d,0xcb,0x42,0xf2,0x21,0x2f,0x44,0xd4,0x67,0xcd, - 0xbf,0x15,0xb0,0x74,0xed,0x78,0x29,0x49,0xaa,0xf5,0xad,0x33,0x0f,0x16,0x9a,0x7b, - 0x2b,0x12,0x54,0x02,0xbf,0x19,0x67,0xbd,0x09,0x2a,0x06,0xcd,0x79,0x64,0x50,0xe4, - 0x8d,0x51,0x8e,0x59,0xd3,0x2c,0xcc,0xaf,0x59,0xf7,0xe8,0x8c,0x7c,0x8e,0x4b,0x30, - 0xe7,0xd6,0x95,0xdc,0x53,0x0d,0xcd,0x7c,0x31,0xe0,0x7a,0xfe,0x2f,0xd0,0xeb,0x5b, - 0xe2,0x16,0xe1,0x2c,0x19,0xbb,0xef,0x7a,0x96,0xf3,0x4e,0xf2,0x7e,0xaa,0xcb,0xfd, - 0x4a,0x04,0x30,0xa7,0xbd,0x3e,0x17,0xec,0x02,0x8e,0x16,0x79,0xa5,0x26,0xef,0x60, - 0x45,0xa0,0xf0,0x28,0x68,0x55,0xe4,0x40,0x07,0xbf,0x03,0x83,0xa8,0x63,0x10,0x42, - 0x04,0x8e,0x38,0x5c,0xfc,0x10,0x40,0x50,0x04,0x81,0xe1,0x24,0xb0,0x1e,0x59,0x81, - 0xa6,0xf7,0x71,0x39,0xbe,0xe0,0x49,0x41,0x85,0xe2,0x21,0x55,0x3f,0xb3,0x49,0xb3, - 0xcd,0x8e,0x69,0x8b,0x87,0x02,0x41,0xce,0x72,0x81,0x15,0xb2,0x3e,0x92,0x6a,0x82, - 0x4a,0x9f,0x80,0xe8,0x0b,0xe6,0x4e,0x5b,0x2e,0xc9,0x67,0x95,0x02,0x39,0xfe,0x76, - 0x25,0x47,0xe8,0x56,0x95,0xf2,0xbb,0x4a,0xae,0xb4,0xc2,0x8b,0xf6,0x3e,0xc7,0xb7, - 0xc6,0xca,0xe3,0x9f,0x96,0xa6,0x8e,0x10,0xb6,0x84,0xa3,0x66,0x3d,0x56,0x3f,0xbb, - 0x47,0x4a,0x66,0xd3,0xd7,0x3d,0x84,0x9f,0xc7,0x7c,0x7e,0x8c,0x24,0xa5,0x28,0x02, - 0xaf,0xed,0xf2,0xfd,0x3e,0x75,0x25,0x20,0x4a,0x39,0x8c,0xda,0x7d,0x88,0x7a,0x17, - 0xac,0x03,0x6a,0x82,0x5b,0x08,0x5a,0x9a,0x69,0x44,0x78,0x3b,0x7f,0x9b,0x79,0x16, - 0x2f,0x8c,0xf5,0x32,0x77,0x5b,0xa2,0xaf,0xb0,0x48,0xed,0x03,0xd4,0xeb,0x53,0xf9, - 0x0f,0x88,0x7b,0xec,0xbb,0x76,0x43,0xb9,0xcc,0xd3,0xa4,0xbb,0xcf,0xeb,0x9d,0xb1, - 0x83,0x21,0xe2,0x4e,0x1e,0xac,0x41,0x92,0xf6,0x8e,0xe2,0xcc,0xd3,0xae,0x13,0x2b, - 0x3a,0x9b,0xe8,0x86,0x1f,0xad,0xba,0xe3,0xf8,0x10,0xa4,0x72,0xa0,0xac,0xfe,0xd0, - 0xed,0x8a,0x83,0xe1,0xd3,0xec,0x37,0x6e,0x27,0x9f,0xf1,0x66,0xdf,0x6e,0x23,0x7b, - 0x02,0x02,0xeb,0x5f,0x57,0x76,0x03,0x5c,0x32,0xc0,0x9b,0xd1,0x92,0xad,0xb3,0xe0, - 0x67,0x7c,0x20,0x98,0x1a,0x44,0x4b,0xd1,0xc7,0x83,0x0f,0xd6,0xf4,0xe6,0x66,0x78, - 0x86,0x97,0x8a,0x26,0x53,0xf3,0x60,0x50,0x85,0x75,0x0b,0xdb,0x46,0x08,0x2f,0x8b, - 0x07,0x9f,0xf7,0x94,0x9a,0x11,0x4e,0xd0,0x90,0x76,0xfd,0xb7,0x00,0xab,0xfb,0x36, - 0x04,0x19,0x6e,0xc6,0xdd,0xbe,0x45,0x0e,0x0e,0xdb,0x7d,0x2e,0x4c,0xf9,0x7b,0x24, - 0x02,0x19,0x5f,0x39,0x30,0x95,0x8c,0xea,0x8f,0x25,0x4b,0xd7,0x61,0x5b,0x35,0x22, - 0x80,0x85,0x54,0xc7,0x27,0xb1,0x6b,0x01,0x1f,0x58,0x58,0x94,0x88,0x96,0x1b,0xfb, - 0x4d,0x27,0x58,0xd6,0xae,0xb2,0x8d,0x90,0xda,0x77,0x55,0x95,0x80,0x59,0x95,0x2f, - 0x3d,0x6c,0x87,0x55,0x01,0xcf,0x2b,0xcb,0x0c,0x46,0x9b,0x95,0x00,0x7a,0xc9,0x68, - 0xae,0xd0,0x59,0xe0,0x3a,0x6a,0x99,0xc5,0xb1,0x04,0x76,0xd0,0xdb,0xe8,0x56,0x18, - 0x28,0x43,0x25,0xd9,0xd4,0xaa,0xe7,0x25,0x6b,0x98,0x3f,0x3a,0x2d,0x71,0x3f,0xf9, - 0x0f,0xff,0xb4,0x77,0x44,0x01,0x8e,0xf5,0xd3,0x54,0x08,0x49,0xde,0x98,0x2d,0x79, - 0x01,0x96,0x4a,0x70,0x54,0x58,0x16,0x4a,0x91,0x2d,0xf7,0xae,0xfb,0x29,0x06,0x27, - 0x2f,0xc3,0x26,0xee,0xbb,0xa7,0x70,0xc6,0xee,0x79,0x61,0x11,0x8b,0x7f,0x35,0x51, - 0x54,0x93,0x8e,0x70,0x22,0xff,0x49,0x1a,0x1c,0xdd,0x5a,0x0e,0x7b,0xf2,0x18,0x4f, - 0x9e,0x71,0xe2,0x4b,0xfe,0x0f,0xac,0x60,0x91,0xd8,0x27,0xf0,0x7a,0x51,0x36,0xdf, - 0x0a,0x30,0xff,0xe4,0x13,0xfd,0xbf,0xd3,0x3f,0x2b,0x6f,0xff,0xff,0xff,0xdb,0x9f, - 0x7f,0x8e,0x7a,0xa4,0x10,0x21,0x51,0x46,0xd6,0x48,0xae,0x09,0x9a,0x19,0xef,0xed, - 0xc2,0x43,0x28,0x62,0x32,0x33,0x20,0xcf,0xed,0x4c,0xe1,0x47,0x65,0xe8,0xc1,0x39, - 0x70,0xd9,0x91,0x15,0xd8,0x39,0x12,0xa3,0x76,0xc8,0xaf,0x49,0xb1,0x66,0x4b,0x4b, - 0xb2,0xea,0xe9,0xbe,0x97,0x2e,0xb6,0xd7,0xd1,0xbe,0xb9,0xbf,0xd0,0x13,0x10,0x7f, - 0x28,0x9f,0xb8,0x3b,0x9d,0xa2,0xf3,0x67,0xee,0x21,0xd7,0x11,0x8b,0x99,0xeb,0xf0, - 0xdf,0x26,0xb0,0x50,0xee,0xa0,0x02,0xf4,0x3b,0xea,0xe6,0x1d,0x72,0xb7,0x41,0xc5, - 0x86,0xc1,0xc1,0x05,0xd8,0x8d,0x69,0x50,0x63,0x39,0xfe,0x3f,0x27,0xfa,0xd9,0x33, - 0x70,0x62,0xdb,0x93,0x95,0x15,0xf9,0x03,0xa1,0x70,0xdf,0x41,0x32,0x61,0xb9,0xee, - 0x18,0xf5,0x7d,0x8e,0xa2,0x0a,0xea,0xac,0x60,0xb0,0xb4,0x00,0x6d,0xcc,0x32,0x5f, - 0xcb,0x0b,0x0f,0x98,0x29,0x9b,0xc0,0x2c,0x6d,0x4f,0xa4,0x04,0xfe,0xc4,0xfb,0x8b, - 0x3e,0xc0,0xbb,0xca,0x46,0x22,0x5b,0x39,0xfb,0xae,0x06,0x40,0xeb,0xe2,0x43,0xb8, - 0x28,0x8b,0x4b,0x08,0x71,0xa6,0x93,0xac,0x68,0xb4,0x88,0xb9,0xc3,0xc6,0x7a,0x8f, - 0xc8,0x1c,0x7f,0xc8,0x0c,0x9c,0x2c,0x6f,0xeb,0x13,0xf6,0x31,0xf9,0x09,0x6a,0x7c, - 0x68,0x83,0x5d,0xd8,0x0d,0x4e,0x9a,0x41,0xf3,0x30,0x4c,0x5b,0xf8,0x08,0x78,0x39, - 0x0a,0x88,0xcb,0x59,0xf9,0xd7,0xff,0x06,0x5c,0x31,0xed,0x45,0x79,0xc3,0x5d,0x6c, - 0x60,0x4b,0xf5,0xbd,0xd9,0xf0,0x23,0x60,0xa8,0x2f,0x64,0x9f,0x06,0xf2,0xbd,0x3c, - 0xd7,0xad,0xba,0x65,0xcb,0xab,0x6c,0x22,0xe0,0xd8,0x06,0x57,0xf4,0xfd,0x77,0x12, - 0x97,0xfb,0x5c,0xbc,0x5a,0x52,0xb4,0xb0,0x0a,0x1a,0x0c,0xa7,0x1f,0x35,0x50,0x7a, - 0x51,0x01,0x85,0x68,0x84,0x99,0x2d,0xf1,0xe4,0x5d,0xc7,0x2e,0x1b,0x16,0x8d,0x81, - 0xa2,0x15,0x0d,0xaa,0xdd,0xe6,0xe2,0xc2,0xc6,0xd4,0xbb,0x01,0x7d,0xd8,0xb9,0x2c, - 0x22,0xaf,0xbc,0xd9,0x3b,0xda,0xb7,0x82,0xe0,0x43,0x82,0xc0,0xae,0x25,0x97,0xd2, - 0x5c,0x51,0xf4,0xf4,0xde,0xcc,0x39,0x0d,0x40,0xf8,0xd6,0x74,0xd0,0xd8,0x2f,0x39, - 0x7c,0x57,0x55,0x47,0x3a,0xee,0x6f,0x03,0xc6,0x8d,0xb5,0xe7,0xbb,0x7b,0x14,0xc5, - 0x06,0xa8,0x65,0x49,0x80,0x73,0x05,0x1e,0xd4,0x57,0x4c,0x47,0x0c,0x67,0xf7,0x5d, - 0x89,0x87,0x14,0x08,0x62,0x7c,0xe9,0xbd,0x6e,0x5a,0xee,0xa8,0x91,0x99,0x36,0x66, - 0x85,0x14,0xae,0x0e,0xb9,0x33,0x64,0x3a,0xe1,0x01,0x65,0x9b,0xd8,0xd8,0xb3,0xeb, - 0x53,0x7f,0x2b,0xfe,0x88,0xb3,0x17,0xb6,0xcf,0x5e,0x57,0xbd,0x20,0x77,0xf0,0x71, - 0xe9,0x59,0x1f,0xda,0x58,0x9d,0x21,0x5d,0x4a,0x5d,0xcb,0x4e,0xd3,0xa6,0x3d,0x20, - 0x66,0x51,0x7c,0x33,0x53,0xb5,0x6c,0x13,0x6c,0x4d,0xb6,0xef,0x2f,0xf7,0x46,0xdd, - 0xfa,0x60,0x26,0x40,0xc6,0x36,0xf2,0x6b,0x48,0x57,0xe4,0x7e,0xf3,0xa5,0xba,0xb2, - 0x25,0x68,0xdf,0xdd,0x66,0xb7,0xa9,0x9b,0x15,0xa3,0xd3,0x0f,0x7a,0xde,0x64,0x5b, - 0x11,0xb7,0x4e,0xae,0x96,0x36,0xc1,0x86,0xed,0x6d,0xa7,0x7f,0x7b,0x17,0x58,0x25, - 0xa5,0x9f,0xc0,0xad,0x1e,0xaf,0x9c,0xa7,0x66,0xcd,0x8e,0x0a,0xf7,0x85,0x10,0xfc, - 0xa9,0x8c,0x3b,0x25,0x13,0xa1,0x00,0xe2,0xbe,0xce,0xe4,0xc7,0xf6,0xa1,0x95,0x61, - 0x3f,0xe7,0x61,0x23,0x1c,0xe0,0x77,0xa1,0xcd,0x1f,0x8f,0x0a,0x77,0x4f,0xd4,0x79, - 0x04,0x8e,0x2b,0x93,0xfd,0x3a,0x59,0x72,0x3c,0xce,0x8b,0x09,0x76,0x42,0x5a,0xf2, - 0xd8,0x2b,0x5f,0x01,0xc0,0xae,0xe7,0x9d,0xa7,0x17,0x5f,0x41,0xab,0xeb,0x56,0x7f, - 0xcd,0x34,0x57,0x64,0x77,0x6b,0x23,0x04,0xc5,0xf2,0x10,0xea,0xbe,0x24,0xc5,0x21, - 0xa2,0xea,0xa2,0xb6,0x35,0xe6,0x8a,0x61,0x0f,0xdd,0x45,0x14,0xef,0xe9,0x96,0x20, - 0xb3,0x21,0x29,0xde,0x2a,0xe5,0x3c,0x91,0xbc,0xe7,0xf3,0x75,0x28,0xe1,0x7b,0x7f, - 0xa9,0x57,0x82,0x5d,0xc8,0x69,0x38,0x2e,0xef,0x33,0x24,0xdd,0x30,0x35,0x51,0xe1, - 0x8e,0x84,0xb9,0x6d,0x6d,0xc5,0x1a,0x59,0xcf,0xe1,0xbc,0x06,0x75,0xda,0x22,0x6d, - 0x73,0x07,0x04,0x3a,0x7d,0x05,0xe3,0xaf,0xb4,0xde,0xe5,0x1b,0x37,0x2b,0x52,0x74, - 0xf1,0x74,0xcd,0xff,0x9e,0x30,0x04,0x59,0x8e,0x74,0x2b,0xcf,0xfe,0x4a,0x71,0xb4, - 0x2a,0x23,0x23,0x57,0x1f,0x1c,0xb2,0x53,0xf6,0xc1,0xd6,0x32,0x7c,0x3e,0x14,0x5d, - 0x6c,0xad,0x4a,0x2c,0x7d,0x9b,0x72,0x6a,0x17,0x7a,0xa0,0x7f,0xfc,0xee,0xc3,0x39, - 0xec,0xb8,0xb9,0xae,0xe2,0x01,0x8c,0x11,0x43,0x38,0x77,0x8d,0x5e,0x8e,0x13,0x7f, - 0x66,0xa4,0x95,0x58,0xfc,0x8f,0xf9,0x9d,0xc9,0x7e,0xfc,0x7a,0xd9,0xbe,0x26,0x0e, - 0xa6,0xc7,0xb1,0x75,0x0c,0x3d,0x14,0xf2,0xc5,0x58,0xe2,0x06,0x9f,0xf3,0x98,0xed, - 0x86,0xee,0x40,0xe5,0x0d,0x17,0xd3,0x36,0x05,0xb8,0x8e,0x86,0xb6,0x5e,0x6f,0xfd, - 0x07,0xcd,0xc3,0xaf,0x5f,0xa3,0x31,0x41,0xe2,0xe3,0x25,0x56,0x57,0xb2,0x4d,0x3d, - 0xea,0xd1,0x38,0xe4,0x81,0x3a,0xe2,0xb2,0xe3,0x52,0x1d,0xc4,0x56,0x70,0x3e,0xc0, - 0x85,0x8f,0xe1,0x00,0x60,0x16,0x4a,0x80,0x95,0xb1,0xca,0xca,0xd5,0xb6,0xa8,0x30, - 0x5c,0xb5,0x70,0xd3,0xd6,0x1a,0xc6,0xb5,0x69,0xaa,0x70,0x85,0x43,0xfa,0xbc,0xb5, - 0x24,0xa1,0x79,0xc5,0xba,0x1d,0x4d,0x18,0xd5,0x52,0x66,0xf0,0x74,0xf2,0x52,0x94, - 0x65,0x77,0x7f,0xa4,0x8e,0xbe,0x91,0x88,0x79,0x5c,0x22,0x9d,0x80,0x97,0x24,0x52, - 0x2c,0x98,0x86,0x64,0xd5,0xa9,0x0f,0x2e,0x14,0x89,0x51,0x5d,0xf0,0xb9,0xdf,0x4e, - 0x8e,0xf7,0x2c,0x8d,0x0d,0xe8,0x3e,0xaf,0x84,0x63,0x84,0x0e,0xdd,0x56,0x27,0x8b, - 0x4d,0x9c,0xbd,0x8d,0x2e,0xb2,0x0d,0x58,0xb7,0xdb,0xa1,0x9a,0x17,0xbe,0x76,0x7e, - 0x08,0xed,0x89,0xb6,0x81,0xd5,0x93,0x29,0xf9,0xd3,0x1b,0xdd,0xd9,0x2e,0x2e,0x7b, - 0xf2,0xd8,0xb3,0xbc,0xc5,0x43,0x56,0x00,0x9f,0x55,0x36,0xc2,0xba,0xbe,0x93,0x5e, - 0x57,0x4b,0x78,0xc1,0x0f,0x06,0x24,0x1a,0x13,0x9f,0x25,0xfb,0x79,0xac,0xc4,0xcc, - 0x02,0x93,0x27,0xd6,0xd3,0x6a,0x57,0x61,0xef,0xe6,0xe0,0xaa,0x81,0xe3,0xd2,0x39, - 0x73,0xdb,0xeb,0xad,0x40,0xfd,0x3a,0xb8,0x8c,0xff,0x5d,0x7b,0x8b,0x1b,0x3e,0x2c, - 0x8d,0x86,0x8a,0x44,0xb3,0x26,0xef,0x20,0xbf,0x40,0x07,0x94,0xdf,0x62,0x32,0xe3, - 0x3d,0xac,0x8c,0xf6,0x93,0x69,0x4f,0xa8,0x08,0xd3,0xf0,0x2a,0x29,0x95,0x07,0x41, - 0x88,0x43,0x09,0x06,0x31,0xaa,0x11,0xb9,0xae,0xd0,0x26,0x24,0x5d,0x6e,0x9c,0x56, - 0x43,0x81,0xa9,0x77,0xd0,0x27,0x96,0xa9,0x9a,0xd1,0x0a,0x2f,0xad,0xd7,0x7a,0xf0, - 0x98,0xab,0x9a,0xc4,0x6a,0x8b,0x37,0x90,0xc2,0x5b,0xc7,0x9f,0xa3,0xe7,0x97,0x92, - 0x30,0x65,0xb6,0x53,0xee,0x2a,0x10,0xfc,0xbe,0x29,0x7c,0x06,0xf0,0x24,0xe5,0x65, - 0xf5,0x30,0x61,0x37,0xf0,0x10,0xe8,0x11,0x42,0x50,0x01,0x7e,0x56,0xc9,0xf1,0x61, - 0x87,0xb8,0xce,0x57,0x10,0x66,0x9d,0x8e,0x4c,0x3a,0x83,0xaf,0xef,0xc8,0x4a,0xda, - 0x8a,0x0c,0xfa,0x4a,0x1e,0x69,0x8d,0x28,0x48,0x48,0xc2,0x5f,0x76,0xc3,0x34,0x34, - 0xeb,0x69,0x8e,0x38,0x1f,0x48,0x9c,0x38,0x49,0x49,0x09,0xc3,0xb0,0x66,0x8f,0x6b, - 0xab,0xaa,0x43,0x20,0x14,0x66,0x15,0x29,0xc8,0x4a,0xeb,0x29,0x38,0xcb,0x8e,0xe4, - 0x38,0xd0,0x66,0xe0,0x91,0x69,0x5d,0x39,0xc9,0x4b,0xcd,0x04,0x32,0xad,0x03,0x2e, - 0x68,0x0c,0x2e,0xcc,0xe6,0x0c,0xb5,0x06,0x2b,0x48,0x72,0x1e,0x38,0x5b,0x14,0xba, - 0x0f,0x88,0x28,0x43,0xd5,0x86,0x9f,0x7a,0x07,0x4b,0xba,0x38,0x20,0xe6,0x38,0x6d, - 0x63,0x25,0x6f,0x0f,0x19,0xfa,0x32,0x29,0x8a,0x00,0xad,0x6a,0x7b,0x2f,0xf8,0xbb, - 0xaf,0xd2,0xad,0x59,0xf0,0xa9,0x7b,0x29,0x6a,0xc7,0x5b,0x9f,0x59,0x27,0xfb,0x81, - 0x28,0x30,0x15,0x73,0x36,0x41,0xaa,0xe7,0x53,0x54,0xc4,0x37,0x5e,0xdf,0x0c,0x91, - 0x29,0x11,0xd7,0xa2,0x4a,0x20,0x1c,0xf6,0x69,0xdc,0x9c,0x47,0xa1,0xda,0xfa,0x80, - 0xa0,0x12,0x99,0x01,0xc4,0xba,0xf7,0xe1,0xb9,0x1c,0xb2,0xd6,0x8c,0xf4,0x0d,0x91, - 0xa9,0xec,0x22,0xee,0x6c,0xef,0x63,0x79,0x63,0x1b,0x38,0xb0,0x76,0x65,0xe9,0x8e, - 0xd7,0x48,0x6f,0x0e,0x89,0x9b,0xd6,0xd0,0x99,0x38,0xaa,0xe3,0x56,0x09,0x88,0x3e, - 0xca,0x06,0x69,0xd0,0xb4,0x23,0x4a,0x92,0x03,0xf1,0x8f,0x07,0xff,0x1b,0xd5,0xb2, - 0xcc,0x7a,0xe2,0xdb,0x62,0x9d,0x91,0xf1,0x19,0xeb,0xc2,0x16,0x76,0xfb,0x89,0x3e, - 0x87,0x5b,0x9d,0x4b,0x48,0x9a,0x23,0xf7,0x02,0xd4,0x62,0x66,0x77,0xaa,0xf9,0x88, - 0x28,0xe7,0xbd,0xd2,0x84,0xb3,0xdc,0x58,0x64,0x57,0xc6,0x32,0x83,0x64,0x0e,0x98, - 0xd6,0x19,0x3b,0x3c,0x09,0xbb,0x7e,0xfc,0x48,0xd2,0x9f,0x8a,0x93,0x6c,0x07,0x76, - 0x57,0xe5,0x36,0x68,0xbe,0xfb,0x77,0xed,0xff,0x55,0x2a,0xe7,0x1c,0xfd,0xf0,0x66, - 0x5e,0xe4,0xd5,0xb5,0xd1,0xb0,0xc0,0x5b,0x45,0xd0,0x4f,0x8b,0x09,0x6b,0x82,0x8e, - 0x60,0x50,0xb0,0x9d,0xd8,0x37,0x15,0x1b,0xe6,0xd1,0xb0,0xeb,0x7b,0x0c,0x6e,0x88, - 0x8a,0x97,0x33,0xde,0x7b,0x68,0xba,0xe6,0x5f,0xf2,0x21,0x82,0xb9,0x7d,0x82,0x0f, - 0xec,0x18,0x45,0x3d,0x6b,0x61,0xb3,0x17,0x89,0x7e,0x6a,0x16,0x07,0xc8,0xb8,0x3b, - 0x89,0x8f,0x3c,0xf2,0x45,0xc3,0xca,0x8b,0x10,0xf2,0x24,0xff,0xa5,0x02,0xa4,0x86, - 0x30,0x44,0x31,0xf1,0x63,0x84,0x23,0x22,0x44,0xe0,0x17,0xb1,0xb5,0x4f,0x48,0x10, - 0x08,0x0a,0x75,0x3e,0xdd,0xca,0x5c,0x92,0x4d,0x78,0x9e,0x0f,0x83,0x45,0x27,0x2e, - 0x04,0xef,0x7e,0x45,0xa3,0x67,0x28,0x23,0xc4,0x02,0xd7,0xd6,0x16,0xa2,0xd6,0xf1, - 0x07,0x87,0x7e,0x04,0xf6,0xab,0x69,0xb3,0x99,0xc5,0x2a,0xa8,0x3e,0x55,0x98,0x4a, - 0xfb,0xcb,0x60,0x34,0xfd,0x72,0x78,0x80,0xc3,0x06,0x50,0x14,0xf5,0xe2,0x69,0x2d, - 0xa0,0xc4,0xe9,0xa5,0xc5,0x0a,0x7c,0x32,0x0f,0xde,0x80,0x51,0x73,0x5a,0x38,0x32, - 0x73,0xc9,0x9f,0xd8,0xfd,0x10,0xdd,0x10,0xd8,0x40,0x21,0x23,0x75,0x83,0xbd,0xad, - 0x7a,0x06,0x5b,0xa4,0x7b,0x0c,0x5f,0x05,0xe6,0x87,0xc3,0xc7,0xf1,0x78,0x2c,0x68, - 0x4f,0x75,0xfd,0x4c,0x6f,0x4c,0xc5,0xc8,0xed,0x4f,0xec,0xb4,0x58,0x47,0x2a,0x1b, - 0x05,0x89,0xad,0x1b,0x1b,0x18,0x3e,0x7d,0x4e,0x73,0x8c,0x36,0xb6,0x6c,0x5b,0xcc, - 0xa8,0xaa,0x63,0x2b,0x0d,0xa9,0xb7,0x2e,0x43,0xce,0x01,0xdc,0x30,0x41,0x2f,0x1a, - 0x85,0xab,0x3a,0xe2,0x99,0xe9,0x93,0xbb,0xf6,0x10,0x13,0xb5,0x50,0x46,0x08,0xb5, - 0xfb,0x0f,0xd4,0x42,0xf5,0x29,0x9a,0xfb,0x6a,0x61,0xcd,0x1e,0x52,0x43,0x33,0x26, - 0xa8,0x9d,0xd1,0x00,0x2c,0x6d,0x44,0xa2,0x4c,0x6d,0x82,0x62,0x7b,0x42,0x84,0xb5, - 0xaa,0x03,0x4b,0xc5,0x67,0x72,0x38,0xac,0x0c,0x4e,0x53,0x75,0x52,0x13,0x93,0x7f, - 0x12,0x72,0x47,0xfa,0x4a,0xcc,0x69,0x80,0x34,0xcb,0x5b,0x0d,0xbd,0xd8,0x20,0x82, - 0xdb,0x6f,0xda,0x80,0x57,0x75,0xcb,0x40,0xe6,0x98,0x06,0x9d,0x0b,0xf0,0xd3,0x93, - 0x25,0x6e,0x57,0xb9,0x1e,0x3c,0x44,0x30,0x6c,0xb5,0x2c,0xf1,0xd0,0x07,0x25,0x82, - 0x5b,0x4d,0xf3,0x62,0x48,0xf6,0xf9,0xc1,0xa5,0xf2,0xdd,0x65,0x72,0x07,0xd2,0x93, - 0xad,0x93,0xd2,0x13,0xc1,0xd4,0x05,0xe3,0xe7,0xdc,0x06,0xc7,0x75,0x5c,0x28,0x46, - 0x06,0x3e,0x59,0x99,0xe3,0xe9,0x3f,0x13,0xc5,0x94,0x63,0x15,0xf2,0x79,0x52,0x4a, - 0xe5,0xb5,0x5b,0xf2,0x57,0x4a,0x9b,0x81,0xc4,0x5c,0xc2,0xf0,0xad,0x58,0xa5,0x57, - 0x8b,0xf8,0x4e,0x05,0x35,0xf0,0x47,0x1c,0x1f,0xba,0x26,0x14,0x7a,0x9a,0x53,0x5e, - 0x65,0x97,0x92,0xa5,0xd5,0x48,0x5d,0x19,0x84,0xd3,0x59,0x6d,0xf4,0xe7,0xd9,0x75, - 0xd3,0x98,0x66,0x92,0x5f,0xfa,0x56,0xea,0x62,0xd5,0xce,0x26,0xd9,0x71,0x2e,0x9a, - 0x2d,0x66,0x71,0x1a,0x3b,0x76,0x34,0xaa,0xce,0xd4,0x80,0x86,0x15,0xf4,0xd8,0x74, - 0xac,0x65,0x36,0xb4,0xba,0x4a,0x3d,0xaf,0x4f,0xd7,0x97,0x3c,0x5f,0xbb,0xd0,0x64, - 0xad,0x64,0x6f,0xb2,0xcb,0xfb,0x35,0x9b,0x4e,0xd6,0xad,0x3d,0x16,0xbf,0x6e,0x6e, - 0xa9,0xfe,0x9d,0xb1,0x46,0x13,0x17,0x2a,0x3c,0x71,0x4b,0xd3,0x81,0x71,0x11,0x32, - 0x4c,0xd0,0x4a,0xbc,0xc4,0xde,0x44,0x4b,0x5b,0x72,0x55,0x84,0xaa,0x01,0x3e,0xc1, - 0x4b,0x61,0x47,0xb1,0xcc,0x11,0xe2,0xd2,0x05,0x9a,0x24,0x11,0x7e,0x3e,0x96,0xd3, - 0x0a,0xe0,0x89,0xbd,0x4c,0x32,0xdb,0x89,0x61,0x20,0xc0,0xa0,0xdb,0xff,0xa3,0x34, - 0xdc,0xe1,0xda,0x05,0xb3,0x26,0xa5,0x19,0xf4,0xd1,0xef,0xa0,0x28,0x3c,0x33,0x5e, - 0x07,0x10,0xf0,0x96,0xef,0x5e,0xd8,0x14,0xd0,0xec,0x23,0xa6,0x59,0x6b,0xac,0x7a, - 0x1d,0x5e,0x76,0xf7,0xf3,0xbc,0x26,0x0c,0x30,0x13,0x3d,0x5a,0x12,0xf3,0xa1,0xee, - 0x1d,0x47,0x36,0xf7,0x35,0xb2,0x8e,0xb5,0x97,0x51,0x1e,0xdd,0x55,0xae,0xc2,0x07, - 0xeb,0xc5,0x65,0x41,0x95,0x32,0xc0,0xe2,0xbc,0x54,0xb0,0x66,0x9a,0x69,0xb9,0x1d, - 0x05,0x04,0xc8,0x96,0x90,0x63,0x8b,0xf2,0xbd,0xa5,0xd0,0x60,0xae,0x0b,0xa6,0xb2, - 0xe6,0x00,0x91,0xdb,0x69,0xdd,0x69,0x11,0xca,0x4d,0x2e,0x22,0x10,0x56,0xbd,0x42, - 0x9b,0x08,0x7e,0x71,0x1c,0x25,0x61,0xc3,0xc7,0xf7,0xbb,0x9f,0xd2,0xa7,0xa3,0x0f, - 0x0e,0x19,0xb8,0xa9,0xd9,0x4b,0x04,0x11,0xa3,0xf9,0xf0,0x2d,0x5b,0xa8,0xca,0x30, - 0xa4,0x92,0x75,0x3a,0x61,0xa4,0x09,0xbc,0x1f,0x8b,0x9e,0x38,0xd6,0x28,0xbf,0x8d, - 0xb8,0xb7,0x57,0xdd,0x19,0x92,0xa8,0x98,0xb8,0xe5,0xca,0x9d,0x7d,0xed,0x0b,0xe0, - 0x85,0x49,0x5f,0x4f,0xb7,0xa1,0x0d,0x14,0x22,0x3a,0x37,0x19,0x0d,0xa3,0x82,0x68, - 0xdf,0x0a,0x75,0x4d,0x97,0x20,0x0b,0x6f,0xaf,0x47,0xb2,0x28,0x67,0x61,0x02,0xda, - 0xbd,0xf5,0xb4,0xcb,0xfa,0xfe,0x85,0x87,0x4d,0x3f,0x9e,0x5d,0x2c,0x7a,0xb2,0x04, - 0x8c,0x8e,0xab,0x32,0xfa,0x6e,0x83,0xc9,0xce,0xbf,0x44,0x8f,0xfe,0x6d,0x8b,0x79, - 0x25,0xab,0xb5,0xcb,0xf0,0x89,0xf3,0xfd,0xb3,0x42,0x04,0x0e,0xe8,0x7f,0xab,0x62, - 0x8c,0xed,0x80,0x66,0x12,0xcf,0xe5,0xfd,0xc1,0xcf,0xaa,0xf1,0x08,0xdf,0xa8,0xe3, - 0x45,0x1e,0xb4,0xb4,0x90,0x0e,0x24,0x4e,0xcd,0x5c,0xe2,0xb3,0xd0,0x4e,0x7d,0x8e, - 0x24,0x46,0xfa,0x07,0xb1,0xcd,0xa1,0xc3,0x1b,0x37,0x35,0xd7,0x9a,0xba,0xb9,0xe2, - 0xcd,0x1c,0x52,0x95,0x95,0x28,0xe2,0x95,0x08,0x92,0xe7,0xd5,0xef,0xf8,0xff,0x53, - 0x12,0x1c,0x65,0xde,0xae,0x80,0x74,0x12,0x1d,0xab,0x9c,0xf1,0x05,0x63,0xa0,0xaf, - 0xbd,0xc8,0xad,0x74,0xe5,0x8a,0xb0,0x70,0x9f,0x75,0xf7,0x54,0x6f,0xa5,0xc4,0x45, - 0x92,0xaa,0x9b,0xca,0xb6,0x78,0x95,0x6c,0x67,0x17,0x0a,0x96,0xf4,0x94,0xac,0x11, - 0xe9,0x55,0x12,0xd5,0x30,0x39,0xf1,0xb3,0x60,0x83,0xe3,0x39,0x7e,0xd1,0xb5,0xa0, - 0xd4,0x29,0x98,0xea,0xcb,0x28,0x24,0x57,0x89,0xc7,0x53,0x91,0x7e,0x8a,0x50,0xb5, - 0xa8,0xb2,0xc4,0xfe,0xce,0x5c,0xa7,0x09,0xca,0x86,0x8c,0xbc,0xc6,0xf4,0x97,0x78, - 0x9c,0x3e,0x3f,0x76,0x3a,0x6d,0x68,0xc6,0x94,0xa5,0x62,0xcf,0x0f,0x47,0x1c,0x06, - 0xc2,0xaa,0xb7,0x62,0x34,0x8d,0x20,0x10,0x12,0xc6,0xcd,0x19,0x65,0x3f,0x57,0x03, - 0xa7,0xba,0x26,0xf3,0x1e,0x80,0xb4,0xf7,0xa4,0xd1,0xca,0x2c,0x36,0xa7,0x06,0xec, - 0x2d,0x0c,0x4a,0x2d,0x98,0x3f,0xde,0xa6,0x9a,0x81,0x18,0xa6,0x5f,0x7e,0x52,0xb7, - 0x60,0x0f,0x78,0x96,0x43,0xb4,0x29,0x7a,0x81,0xd8,0xa6,0x10,0x45,0x3c,0x60,0x9e, - 0x56,0x69,0xfd,0x22,0x39,0x77,0xf0,0x82,0x36,0x8b,0x59,0xbd,0x79,0x68,0xa0,0x63, - 0xd0,0x91,0x98,0x5b,0x96,0x57,0x8b,0x93,0x70,0x6f,0x17,0x73,0x74,0x71,0x80,0xed, - 0x03,0x90,0xd5,0x65,0x04,0xae,0x14,0x16,0xc7,0x96,0x98,0x3e,0x66,0xfa,0x86,0x2a, - 0x82,0x93,0x58,0xe5,0x16,0x55,0xa0,0x32,0xb0,0xc6,0xb7,0xcf,0xbb,0x2f,0x16,0x6d, - 0x26,0xe6,0xc9,0xa8,0x26,0x0e,0xb6,0xb7,0x85,0xc9,0x03,0x70,0xe6,0x08,0x61,0xa0, - 0x00,0x85,0x60,0xb7,0xd4,0x24,0x10,0xdd,0xa5,0x4f,0x48,0x56,0xa9,0xa2,0x56,0x66, - 0xcf,0x64,0x0f,0xa7,0xcd,0xb5,0xc5,0x82,0x4f,0xca,0xa8,0x7b,0x2b,0x3e,0xca,0xc7, - 0xa6,0xd3,0xdb,0xb4,0x40,0x09,0x73,0x81,0x44,0xce,0xe2,0xe3,0xfe,0x30,0x11,0xd7, - 0xa7,0x89,0x97,0xcd,0x42,0x3a,0x29,0x8c,0x3c,0xc1,0x88,0x8a,0x68,0xfc,0x9d,0xe8, - 0x90,0xcc,0xaf,0xec,0x9e,0x5f,0x52,0x84,0x01,0xc5,0x50,0xbe,0x94,0x72,0x9e,0x78, - 0x91,0xcd,0x1e,0x6d,0x00,0xa6,0x8e,0x58,0xfa,0xac,0x73,0x2d,0x0e,0xf1,0x82,0x0c, - 0x2d,0x75,0x59,0x7c,0x89,0xa5,0x4a,0x0c,0x6d,0xf5,0xcb,0x1d,0x27,0x1f,0x8a,0x1c, - 0x21,0xee,0xcb,0x5f,0x20,0x20,0x03,0xd4,0xe9,0xcd,0x85,0x77,0xfc,0xba,0x02,0xe4, - 0x43,0xcc,0x49,0x11,0xe7,0x50,0x7a,0x95,0xef,0xcd,0xf3,0x08,0x3f,0xcc,0xcd,0x73, - 0x09,0x9c,0xb4,0x6d,0x1b,0x06,0x7b,0x18,0xad,0xed,0x7a,0x5f,0x89,0x40,0x61,0x8b, - 0x5a,0x9f,0x40,0x79,0x42,0x4b,0x4b,0x80,0x4c,0x39,0xe1,0x90,0x58,0x7f,0x06,0x9c, - 0x45,0xbe,0xd9,0x5b,0x1a,0xb9,0x7d,0xff,0xbb,0x05,0x32,0x38,0x15,0xe6,0x4e,0xf1, - 0x0f,0x11,0x1f,0x1c,0x37,0x60,0x65,0x58,0x40,0x5b,0xca,0xa1,0x81,0xff,0x52,0xae, - 0xcc,0x40,0x13,0x04,0x26,0x6c,0x06,0x02,0xd7,0x7e,0x9c,0x70,0x51,0x05,0xde,0x70, - 0xd8,0x1f,0x65,0xbe,0x21,0xdc,0x5f,0x9b,0x0f,0x96,0xf3,0xef,0xac,0x02,0x81,0x00, - 0x86,0x99,0xcf,0x93,0xb4,0xf3,0x99,0x97,0x8f,0xdc,0x2f,0x46,0x99,0xd3,0xdf,0x4c, - 0x25,0x06,0xc4,0xa4,0x81,0xd1,0x97,0xfd,0xb8,0x7b,0xce,0x84,0x8d,0xfd,0xac,0xfa, - 0xe2,0x34,0x55,0x87,0x94,0x6a,0xd7,0x9c,0xb2,0x29,0x31,0x14,0x97,0x51,0x42,0xc5, - 0x76,0xf2,0xdd,0x17,0x6b,0xc9,0x12,0x12,0x34,0x96,0xa0,0x94,0xdd,0x52,0x78,0x2c, - 0x4e,0x86,0x50,0x8a,0x48,0xb1,0xc0,0xac,0x33,0x12,0x85,0xc3,0x1c,0x16,0x77,0xf9, - 0x10,0x19,0x4a,0xaa,0x0f,0xf3,0xcd,0x5a,0x5c,0x29,0xd6,0xac,0x7b,0xf5,0xbf,0x64, - 0x46,0x6a,0x51,0x1c,0x8b,0x33,0xed,0x49,0xe1,0xd4,0xd8,0x8a,0x7c,0x59,0x25,0x74, - 0x4d,0x39,0x1f,0x71,0xac,0xf7,0x49,0xad,0x8f,0x1f,0xfd,0xb2,0x03,0x94,0x2f,0x88, - 0xd1,0x93,0x97,0x65,0x11,0xb6,0xaf,0x39,0x13,0xd4,0x85,0x4c,0x99,0xff,0xb5,0x8d, - 0x20,0x43,0x6e,0xcc,0xcb,0xb3,0xd1,0xdd,0x85,0x79,0xad,0xee,0x49,0x0a,0xce,0xc0, - 0xa3,0x40,0x2a,0x5b,0x7c,0x4e,0x1f,0xe9,0x11,0x49,0x6d,0x0d,0x03,0x06,0xd8,0x4e, - 0x51,0x2a,0x53,0xb0,0x1d,0x03,0x29,0xd9,0xea,0x92,0x2a,0x3d,0x36,0x3f,0x17,0xfc, - 0x52,0x90,0x8f,0x9b,0x82,0xb0,0x59,0xbb,0x37,0x74,0xd7,0x03,0x33,0xbd,0x16,0x2c, - 0x77,0xf6,0xdd,0x01,0xbd,0x81,0x67,0x31,0xfd,0x46,0x1f,0xd7,0x0d,0xed,0xb9,0x24, - 0x7a,0xe1,0x5c,0xea,0x72,0x2f,0x40,0xa1,0xbc,0x2d,0x74,0xa6,0x30,0x69,0xde,0xd3, - 0x3c,0xe3,0xb9,0xfa,0x8a,0x4f,0x31,0x10,0x61,0x93,0xef,0xfc,0x39,0x9a,0xc9,0x38, - 0xb1,0xd8,0x1e,0xe6,0x15,0xa8,0x7b,0x95,0xc0,0xb3,0x1c,0xc5,0x03,0xc2,0x67,0xdf, - 0x69,0xb2,0x64,0x26,0xe5,0xaf,0x13,0x82,0xc0,0x0c,0x78,0xee,0x82,0xf0,0xf1,0x0e, - 0xde,0x78,0xf2,0xe4,0x93,0x8a,0x7f,0x76,0x93,0x21,0x99,0xb2,0xc1,0x66,0x40,0xb2, - 0x50,0xda,0x91,0x78,0x79,0x62,0x1d,0x91,0xce,0x49,0xf6,0x7e,0xb9,0x12,0xe6,0x4f, - 0x67,0xf3,0x6d,0x37,0xe6,0x2e,0x61,0x8e,0x02,0x25,0x3a,0x8e,0x42,0x1a,0xe5,0xf5, - 0xcb,0x7d,0xe7,0xb0,0xf3,0x4c,0xad,0xef,0x8a,0x53,0x1d,0xdf,0x05,0xc3,0x22,0xe0, - 0xc5,0x4b,0xb2,0xef,0x4b,0x2f,0x2d,0x5c,0x36,0x69,0xa0,0xcf,0x3e,0x6f,0x95,0x27, - 0xec,0xb1,0xbb,0xfe,0x86,0x4f,0x5b,0x20,0x14,0x03,0x49,0x2c,0x58,0x0a,0x9f,0x05, - 0xad,0x47,0xab,0x58,0xfa,0xd4,0x9b,0x08,0x31,0xb0,0xee,0xb9,0x78,0x94,0xf4,0xbb, - 0xe2,0xa7,0x42,0x0b,0x3e,0xd1,0x96,0xed,0x09,0x6c,0xfb,0x5a,0xb8,0x7c,0x6c,0xe4, - 0xdb,0xa9,0x15,0xfc,0x60,0xad,0xe5,0x2a,0x45,0xc7,0x68,0x46,0x4b,0xa8,0x71,0x4d, - 0x0f,0x18,0x9b,0x2f,0xed,0x2a,0x33,0x2d,0x99,0x41,0x61,0xde,0x6a,0xdd,0x9c,0x42, - 0xe0,0x7b,0xb0,0xd9,0xab,0xbb,0xdf,0x5e,0x68,0xfb,0xec,0x80,0xdb,0x61,0x3e,0xc7, - 0xbe,0x6f,0xe3,0x88,0xd1,0x9f,0x6c,0x22,0x65,0x54,0xac,0x74,0xaf,0x7f,0x69,0x7b, - 0xc0,0x07,0x23,0xfb,0xec,0xe5,0xa8,0xd2,0x22,0x8e,0x98,0x56,0xf3,0x39,0x3f,0x0f, - 0x17,0x9f,0xe6,0xdb,0x05,0xee,0x2d,0x71,0x9f,0x5d,0xf5,0xe1,0xdf,0xf9,0x74,0x93, - 0xad,0x51,0x3f,0x8a,0x5d,0x98,0x65,0x33,0xe0,0x31,0x86,0xc7,0x52,0x75,0x40,0x28, - 0x5d,0xd9,0x86,0x9e,0x01,0xdd,0x0a,0x7b,0x72,0xfb,0x7f,0xbb,0x8b,0x88,0x04,0xf1, - 0x40,0xa5,0xcf,0x55,0x35,0xe7,0xf3,0x8b,0xbe,0x81,0xa2,0xc7,0x18,0xf0,0xbe,0xbe, - 0x2f,0xc0,0x05,0x59,0xec,0x35,0x36,0xbf,0x13,0x8a,0x76,0xd3,0x2e,0x93,0xda,0x3b, - 0x06,0xc8,0x4f,0x51,0x83,0xa3,0xef,0xee,0x0f,0xfc,0x5d,0xb3,0x61,0x23,0x82,0x7d, - 0x0a,0xb6,0xb0,0x8e,0x53,0xbd,0x2e,0x78,0x96,0x57,0x1e,0xc5,0xdb,0x1d,0xf1,0xea, - 0xff,0xc6,0x1d,0x86,0xf1,0xc8,0x26,0x68,0xd6,0x56,0xa6,0x6c,0x8e,0x76,0x00,0xfb, - 0x25,0xec,0x85,0xcb,0x2a,0x9e,0x2f,0x79,0x37,0x55,0xef,0x2f,0xfd,0x10,0x35,0x02, - 0x52,0x96,0xa8,0x6c,0x25,0xfb,0x27,0x69,0x12,0x54,0xa7,0x6d,0x02,0x74,0x1c,0xd4, - 0x56,0x03,0x79,0xbc,0x32,0xe4,0x60,0xed,0x01,0xd9,0xf5,0xe3,0xa2,0xd7,0xfe,0xaf, - 0x25,0xa2,0x0e,0x51,0xbe,0x7f,0x7d,0xf7,0xb3,0xf6,0x8e,0x62,0x80,0x86,0xff,0x8e, - 0x7c,0xc1,0xdf,0xdc,0xc5,0x5e,0x53,0xaf,0x78,0x0a,0x72,0xe9,0x7d,0x68,0x15,0x19, - 0xd7,0xb0,0x0c,0x80,0x5a,0x24,0xfa,0xfd,0x6c,0x49,0xdf,0x3f,0x78,0x39,0x4e,0x68, - 0x26,0x6d,0xd8,0x84,0x94,0x08,0x32,0xa6,0x5a,0x8c,0xd0,0x8d,0x5e,0xed,0x84,0x9d, - 0xba,0x0c,0x44,0x32,0x9a,0xa3,0xeb,0xf4,0x43,0xc7,0x80,0x07,0x32,0xee,0xa6,0xa5, - 0x4f,0x0f,0x99,0xd7,0x69,0xad,0x11,0x61,0xe4,0x80,0x5d,0xb8,0xd7,0x62,0xc8,0xfd, - 0x64,0xb5,0x1e,0x16,0x18,0xaf,0xb1,0xf6,0x64,0x49,0x29,0x69,0x2c,0x3f,0xe4,0x84, - 0x94,0x87,0x5f,0x1a,0x37,0xe4,0xd0,0x78,0xca,0xc9,0x98,0xe0,0xaa,0xa5,0x00,0x90, - 0x81,0x70,0xb1,0x41,0xf2,0xac,0xe0,0x90,0x63,0xab,0x54,0x34,0xd4,0x31,0x82,0xb8, - 0xf9,0x86,0x4d,0x63,0x19,0xe7,0x3b,0x76,0x44,0x8e,0x1d,0xe7,0x2a,0xc6,0xf9,0x95, - 0xdb,0x9c,0xb8,0x90,0x55,0x47,0x39,0x4c,0xcf,0xab,0x1b,0x68,0x19,0x6a,0x5f,0x78, - 0x9e,0x97,0xca,0x10,0xda,0x5c,0xc9,0xc8,0xce,0x80,0x0d,0xbe,0x7d,0xd8,0xda,0xc9, - 0x0b,0x08,0xf4,0x8c,0x19,0x3d,0x42,0xb8,0x48,0x93,0xb2,0x9b,0xbc,0xe6,0x18,0xab, - 0x61,0x68,0x45,0xfe,0x56,0xea,0x2b,0x59,0x6f,0xaf,0xb1,0xcf,0xb6,0xec,0x65,0x9f, - 0x81,0x60,0x48,0x04,0x43,0x00,0x43,0xb9,0xc8,0x01,0x2b,0xbd,0xd8,0x81,0xe1,0x2c, - 0xf1,0x8d,0xea,0x4a,0x58,0xed,0x5a,0xa8,0x9a,0x0a,0x8c,0xfd,0x35,0x6a,0xd5,0x1d, - 0x01,0x8b,0x2a,0x66,0xef,0x76,0x1c,0x8b,0x8d,0x8d,0x1d,0x8f,0x85,0xfd,0x5b,0x4f, - 0x0b,0x7e,0x38,0x4c,0xe1,0xa2,0xd4,0xfc,0x2f,0x61,0x73,0x9c,0x08,0x41,0x0e,0x9b, - 0x2c,0x74,0xcf,0xa2,0x1e,0xed,0x05,0xe5,0x24,0x39,0x85,0xe5,0x0a,0x72,0x47,0x78, - 0x00,0x3b,0x4c,0x0c,0x16,0x66,0x54,0xe3,0xe8,0xdd,0x1b,0xd8,0xa9,0xb2,0x3c,0xf0, - 0xda,0x4e,0xc4,0x10,0xc9,0xf0,0x9b,0x86,0x63,0x20,0x68,0x46,0x7d,0xfe,0xbd,0xcb, - 0x26,0x96,0xda,0x7a,0xb4,0xbc,0x7f,0xdc,0x47,0x93,0x21,0x62,0x76,0xfa,0x72,0x92, - 0xc6,0x92,0x05,0xbe,0x5c,0x09,0xb7,0xcc,0x84,0xf3,0x2d,0x70,0xf7,0x06,0xc4,0xb0, - 0x44,0xa2,0x42,0x30,0x05,0x0d,0x24,0x7c,0x9d,0x2f,0x43,0xc2,0xf9,0xf6,0xeb,0xd0, - 0xe0,0xd4,0x5b,0xd7,0xba,0xb9,0xcb,0xd6,0xe5,0xd1,0x94,0xe9,0xf3,0x21,0x1b,0xc4, - 0x5f,0x99,0x1d,0xe3,0x39,0xb4,0x75,0x21,0x65,0x90,0x42,0xe6,0x7b,0xfa,0xca,0xd5, - 0x73,0xf3,0x85,0xc9,0x71,0x43,0x2f,0x91,0x86,0x82,0x59,0xe4,0x7b,0x31,0x31,0x79, - 0xa8,0x15,0xfe,0x9f,0x3a,0x69,0xbd,0xca,0x70,0x75,0xb2,0xe9,0xfd,0xf6,0x16,0xe7, - 0x0e,0xf8,0xe1,0x8d,0x6a,0xb6,0xbe,0x3e,0x73,0x95,0x84,0x4d,0xb7,0x52,0x75,0x89, - 0x47,0xfe,0x6d,0x8d,0x53,0x17,0xa5,0xcb,0x43,0x21,0x14,0x39,0x20,0x1c,0x90,0xa7, - 0x5a,0x2b,0x9d,0x6c,0xe4,0x1a,0x1f,0xc1,0x6a,0x4b,0xdd,0xbb,0x2d,0x2d,0x5e,0x25, - 0x20,0xfe,0x00,0xbc,0xd5,0x1a,0x6e,0xee,0xe3,0x9d,0xd0,0xe8,0xb0,0x41,0xe6,0x17, - 0x8c,0xe0,0x5c,0x2d,0xd3,0x16,0x2f,0xc7,0x84,0x99,0x7e,0x0d,0xb5,0x56,0xa3,0x1b, - 0xa2,0x98,0xb9,0x5d,0xba,0x11,0xa8,0xe3,0xb0,0x55,0xdd,0x3f,0x5d,0x76,0x25,0xce, - 0x2d,0x9c,0xd9,0xd7,0x54,0x3a,0x45,0x4b,0x6f,0x70,0x9d,0xfb,0x2b,0x3a,0xa7,0x37, - 0x6b,0xa5,0x80,0x1f,0xde,0x8b,0x18,0x0f,0x22,0x15,0xa8,0x04,0xf1,0x5f,0xa0,0x9a, - 0x95,0x95,0xea,0x0a,0xf5,0xd5,0x4e,0x34,0x65,0x5d,0x6f,0xc6,0xb0,0x6e,0x81,0xf0, - 0x60,0x42,0xe7,0x08,0x71,0x8d,0xc5,0x1a,0xa6,0xd7,0x4e,0x25,0xf4,0x64,0xac,0x0a, - 0xea,0x77,0x3f,0xe4,0x79,0x43,0xf5,0xb1,0x3d,0x63,0xf9,0x8a,0x6e,0x9e,0xc0,0x50, - 0x98,0xff,0x98,0xd0,0x14,0x75,0x28,0x86,0x52,0xb9,0x50,0x49,0xdf,0xc9,0x68,0x9f, - 0x74,0x21,0x8a,0x48,0x15,0xb4,0x77,0x2a,0xb6,0xd9,0x90,0xe0,0x55,0xd4,0x45,0xc5, - 0x9c,0x4a,0x0a,0x47,0x98,0x27,0xa9,0x45,0x1b,0xbb,0x18,0x22,0x18,0xfc,0x96,0x13, - 0x85,0x85,0x49,0x57,0x8b,0x24,0x99,0x48,0x28,0x3b,0x01,0xd5,0x8f,0xc7,0x43,0xce, - 0x9a,0x0b,0xdc,0x3e,0x10,0x64,0xbe,0x6a,0xcb,0x9c,0xea,0xae,0xa6,0x37,0x62,0xda, - 0x8f,0xfc,0xad,0xed,0x85,0x3b,0x7c,0x3c,0x22,0xcf,0xe7,0x53,0xfa,0x6f,0xe0,0xf2, - 0xf7,0x0a,0xe2,0x03,0x48,0x5e,0xf1,0x36,0x06,0xe1,0xac,0xcf,0x5a,0x9d,0x9b,0x9b, - 0x77,0x96,0x63,0x97,0xbb,0xfd,0x9b,0x4b,0x22,0x8e,0x6c,0xd7,0x30,0x53,0x69,0xa0, - 0x67,0xd1,0x80,0x58,0x1c,0x8e,0xed,0x27,0xdf,0x91,0x12,0x51,0x42,0x68,0x13,0xbc, - 0x0d,0xdf,0x15,0x5c,0x3f,0x2b,0xf6,0x07,0xd5,0xb2,0x1a,0x59,0x95,0x2f,0xbb,0x41, - 0x77,0x41,0xf5,0xc9,0xf6,0x3f,0xfa,0xed,0xb2,0xe1,0x57,0xe9,0xae,0xb1,0x8c,0xdb, - 0x3d,0x85,0x3c,0xaf,0xf8,0x4f,0xe0,0xf7,0x3c,0x23,0x48,0x95,0x7d,0xcf,0x1e,0xb3, - 0x03,0x70,0x24,0x75,0xd0,0xb0,0xa3,0x84,0xfc,0x14,0xec,0xd6,0xdc,0x7f,0x0f,0x6d, - 0x2d,0x53,0x29,0x8f,0x5a,0x45,0x24,0x4e,0xcd,0x5c,0x28,0x44,0x73,0x7e,0xbe,0xf1, - 0x48,0x1b,0x2d,0x0f,0x24,0xa6,0xb4,0xa6,0x4c,0x37,0x21,0x55,0xf9,0x7d,0xc8,0xd7, - 0x23,0x3b,0xce,0x53,0x23,0x30,0x8d,0xaa,0x65,0xc7,0xc4,0xb5,0x82,0x77,0xfb,0x5b, - 0xdd,0xc9,0xdc,0x58,0x41,0x63,0x72,0xf9,0x0f,0xf0,0x6b,0x06,0x56,0xaf,0x2e,0x16, - 0xd6,0x93,0x7f,0xa5,0x35,0x34,0x41,0x18,0xe7,0x9e,0x4e,0x05,0x09,0x64,0x26,0x3f, - 0x2f,0xeb,0x9a,0x6d,0x4e,0xff,0xd6,0x89,0x2a,0x06,0x67,0x18,0xc2,0x0d,0x4d,0x91, - 0x46,0x55,0xcd,0xcb,0xda,0xc3,0x59,0xd5,0x02,0x4c,0xea,0x05,0x03,0x1c,0xa2,0xea, - 0x69,0x38,0x65,0x77,0x47,0x38,0xb2,0x8f,0xc4,0x55,0xc9,0xad,0x47,0x87,0xa9,0x28, - 0xc0,0x32,0x1e,0x1e,0xc7,0xb6,0x8e,0xa3,0xed,0xcd,0x45,0xbc,0x06,0x78,0x7f,0xad, - 0x7c,0x79,0xef,0x4f,0x3e,0xcf,0xee,0x8e,0x49,0x25,0x4e,0x95,0xc3,0x65,0x28,0x7b, - 0x49,0xba,0xd5,0x9c,0x1a,0x3d,0xbb,0xdb,0x1e,0x3e,0x1f,0xb9,0xc1,0x7d,0x51,0x40, - 0x0b,0x7c,0x5c,0x34,0x8c,0x87,0xf6,0x1e,0x4e,0x70,0x16,0xd9,0x1f,0xd8,0xdd,0xcf, - 0x2d,0xac,0x50,0x58,0x1b,0x3d,0xda,0xbb,0x7f,0x7d,0x43,0x14,0x1d,0xd0,0xb0,0xcc, - 0xa6,0x5e,0x14,0xf2,0x8b,0xeb,0x51,0xaa,0xfa,0x72,0x45,0x81,0x32,0x9f,0xc3,0xfd, - 0x2e,0x9d,0x6c,0xa8,0x67,0x26,0x16,0xf9,0x62,0x7f,0xce,0x1b,0xeb,0xd2,0x7a,0xe0, - 0xa7,0xe5,0xdf,0xfb,0x14,0xae,0x4e,0x15,0x2f,0x65,0xc8,0xa4,0x55,0x9d,0xe8,0x3f, - 0x1b,0xc3,0x44,0x96,0xe9,0x81,0x59,0x28,0x95,0x75,0x47,0xcd,0xd7,0xe9,0x59,0x87, - 0xfc,0x8f,0xc9,0x81,0x68,0xe3,0xb0,0xd0,0x24,0x8e,0xeb,0x26,0x77,0xe1,0xba,0xc7, - 0x07,0x8b,0x05,0x55,0x16,0x1e,0x1e,0xc2,0x59,0xd1,0x46,0x55,0xf5,0xee,0xdb,0xa0, - 0xaa,0x79,0x98,0xc4,0xe8,0x6b,0xcf,0xf9,0xb3,0x52,0xf6,0xaa,0x72,0x69,0xa8,0x42, - 0x54,0x85,0xb2,0x87,0xb4,0xa3,0x7c,0x35,0x44,0xf8,0x21,0x43,0xec,0xfa,0x19,0xc1, - 0x30,0x6c,0xbb,0x69,0x35,0xc3,0x79,0x66,0x49,0xc2,0x8a,0x9c,0xe9,0xe4,0x69,0x53, - 0x87,0x0a,0xe1,0x38,0xf4,0x87,0xe9,0x01,0x2c,0xfe,0x39,0x73,0x26,0x9c,0xe6,0x68, - 0x4d,0x89,0x88,0xde,0xbf,0x20,0xda,0xa0,0x6e,0x1e,0xcf,0xd3,0x5c,0xa9,0x52,0x98, - 0xf3,0x14,0xcd,0x16,0xc9,0x6c,0xc9,0x01,0xb7,0x5c,0xef,0xdc,0xf1,0x62,0x5b,0x69, - 0xcd,0x82,0xa2,0xfc,0x56,0x01,0x4c,0x14,0x32,0x1f,0xd3,0x2c,0xdd,0x61,0x13,0xe5, - 0x21,0x86,0x0c,0x28,0xf6,0x0e,0x48,0xf9,0x4e,0x8d,0xef,0xdd,0x71,0x69,0x02,0xe4, - 0x49,0x83,0x9a,0xee,0xe1,0x13,0x2b,0x6d,0xab,0xc5,0xe5,0x82,0xe0,0xd7,0x33,0xf3, - 0xaa,0x12,0xfa,0x3c,0xa4,0x56,0xbc,0x5a,0x87,0xbd,0xe8,0xe3,0xdd,0xee,0xf3,0xcf, - 0xf6,0x21,0x83,0x0f,0x61,0xa3,0x36,0x19,0x31,0x8c,0xf2,0x87,0xde,0xac,0x6a,0x3d, - 0x74,0xe3,0xeb,0x7b,0x76,0x96,0x65,0x68,0x9f,0x06,0x39,0x0d,0x7c,0x8a,0x1c,0x7d, - 0xcd,0x9f,0x53,0x69,0xc9,0xbf,0x0c,0x5d,0x40,0xdd,0x94,0xe6,0x17,0x0f,0x3d,0x61, - 0x43,0x4c,0xd4,0x14,0xcb,0x8e,0xc3,0xc8,0x13,0x0e,0x32,0x4f,0xd8,0xb3,0xf1,0x7d, - 0x59,0x13,0xc5,0x38,0x03,0x0f,0x4e,0x84,0x45,0x23,0xcd,0x5b,0x74,0x09,0x7f,0xa5, - 0x4e,0x30,0x10,0x75,0x37,0x44,0xad,0xdc,0x85,0x53,0x2e,0xbb,0x08,0xf8,0xa4,0x5e, - 0x48,0x8f,0x74,0x37,0x03,0xb0,0x50,0x4a,0x66,0xf0,0xe1,0x00,0x52,0x98,0x94,0x3a, - 0x48,0xda,0x3e,0x26,0x48,0xfa,0x66,0xf2,0x67,0x9d,0x22,0x60,0x35,0x51,0xc3,0x35, - 0x95,0x2f,0xbb,0xaa,0xb6,0xad,0x27,0xe3,0xe3,0x81,0xa8,0x0f,0x1b,0xed,0x34,0xc1, - 0x42,0x8c,0xec,0x27,0x48,0xf8,0x8c,0x97,0xe7,0xd7,0xb6,0x15,0xf1,0x26,0x7c,0xc8, - 0x50,0x37,0xdf,0xfd,0x25,0xb7,0x48,0xac,0x8d,0x8b,0x76,0x2c,0xfc,0x51,0x99,0x9c, - 0xda,0x32,0xaa,0x7c,0x1f,0x46,0x7e,0x85,0x65,0xb5,0x9a,0x92,0xdc,0x7e,0x87,0x7b, - 0x24,0x49,0xc7,0xcf,0x01,0x31,0x49,0xac,0xc8,0xb4,0x8f,0xcf,0xac,0xfc,0xf8,0x9b, - 0x65,0xb0,0xd0,0x1d,0xbc,0x44,0x17,0x79,0x86,0x1d,0xbb,0xae,0x1c,0xf4,0x47,0x3c, - 0xc7,0xb7,0x39,0xe6,0x49,0x79,0x7a,0x44,0x47,0xdc,0x31,0xae,0x72,0x09,0x36,0xc5, - 0x8c,0x18,0x2f,0x89,0x1d,0x0f,0x3c,0x9a,0x3f,0x5f,0x1d,0xbe,0x3f,0x00,0x75,0x35, - 0x51,0x33,0x27,0x46,0x98,0xfc,0x5b,0xd7,0xee,0x23,0xbc,0xcb,0x03,0x92,0x90,0x33, - 0xab,0x32,0x6b,0x5b,0xaf,0xbf,0x67,0x7a,0x8f,0x9f,0x1c,0x00,0xdb,0x04,0x00,0x24, - 0x33,0xeb,0x8c,0xc1,0x01,0xb8,0x4e,0xe2,0x42,0x02,0xca,0xae,0xf3,0x05,0x9b,0x86, - 0x32,0xea,0xdd,0xb5,0x33,0xdb,0x70,0x36,0xc2,0x25,0xf8,0x74,0xbd,0x6c,0xb9,0x11, - 0x27,0x40,0x8f,0xc0,0x9f,0xd8,0x52,0x0a,0x43,0x4c,0xcb,0xa5,0x73,0x23,0xb1,0xd6, - 0x43,0x13,0xdd,0xb5,0xf3,0x00,0x71,0xd3,0x42,0x4e,0x62,0xb7,0xd0,0x86,0x66,0x9f, - 0x7a,0x42,0xa1,0xc0,0x52,0xbe,0x30,0xc0,0x4e,0xcf,0xd0,0x64,0x52,0x64,0x5f,0x74, - 0xe2,0x9a,0x58,0xd0,0x4d,0x33,0x54,0x0e,0xe2,0xcf,0xd8,0x74,0x53,0x65,0xf6,0x7f, - 0xf2,0xf3,0x87,0x94,0xd9,0x8c,0x55,0x83,0xe6,0x40,0xd1,0x65,0xd2,0x66,0x0e,0x2e, - 0xfb,0xa8,0x09,0x45,0xc0,0x76,0x26,0x93,0x41,0x6f,0xd9,0x75,0xd3,0x67,0x0a,0x11, - 0x3b,0x88,0x82,0xe4,0x22,0xf5,0xc2,0xaa,0x49,0xaf,0xaa,0x6b,0x8e,0x04,0xc9,0x45, - 0x0f,0x58,0xea,0x1e,0x40,0x24,0xe8,0x5a,0x0a,0x96,0xba,0x3d,0xd4,0x63,0x59,0x27, - 0x2f,0x48,0x7b,0x05,0x65,0x65,0x29,0xcb,0x4a,0x42,0x74,0x6d,0xd4,0x04,0x8a,0xdf, - 0xcb,0x4a,0xc1,0x18,0x66,0x6a,0x63,0x5b,0x8a,0xbb,0xe3,0x19,0xba,0xc3,0xe2,0x3a, - 0x7c,0xa3,0x73,0x62,0xae,0x6d,0x6d,0x0a,0x0b,0x6c,0xd2,0x6c,0x5a,0x6c,0x75,0xb8, - 0xa0,0xf1,0x4c,0xbe,0xb7,0xa6,0x05,0x3a,0xf7,0xc6,0xda,0x7c,0x5b,0x6d,0xe7,0x2b, - 0xfa,0x91,0xa3,0xf8,0xfe,0xa5,0x2b,0x4d,0xb9,0x6a,0xd3,0x6d,0xda,0x6e,0x70,0x06, - 0xaf,0x8a,0x34,0xbf,0xbf,0xf4,0xea,0x9c,0xb4,0x43,0xdb,0x7d,0xdb,0x6f,0x3c,0xd0, - 0xa0,0x1f,0x6c,0x85,0x14,0x36,0x03,0x9e,0x10,0x10,0x9c,0xc6,0x11,0x25,0x28,0xcc, - 0x80,0x7f,0x77,0x76,0x9d,0x3c,0xe9,0xc2,0xc2,0x57,0xe4,0x90,0xfe,0x8c,0xc5,0xad, - 0xca,0x14,0x89,0xfe,0x11,0xb8,0x85,0xeb,0x62,0x5a,0x8d,0xa0,0x93,0x8d,0x6f,0x91, - 0xa0,0xf3,0xc7,0x6b,0x12,0x56,0x15,0x1f,0x40,0xd9,0xfa,0xcb,0x23,0x7b,0x84,0xfc, - 0xee,0x55,0xce,0xa6,0x73,0xb4,0xc4,0x62,0xe2,0x8c,0xd4,0xe4,0x72,0x74,0x5b,0x51, - 0x00,0x75,0x4e,0x50,0x03,0xa1,0x0c,0xd8,0x67,0xf7,0xdc,0xf4,0x73,0x75,0x85,0xf8, - 0x49,0x54,0xbd,0xe1,0xb4,0xe4,0x6d,0x64,0x64,0x47,0xd5,0xe5,0xf2,0x76,0xcd,0xe8, - 0xae,0xe0,0x5d,0xaa,0xd3,0xd7,0x05,0xd5,0x64,0x97,0xdd,0xf5,0xf3,0x77,0x38,0x51, - 0xa7,0x9e,0xdc,0x91,0x9b,0x3e,0xed,0x4a,0xc9,0xd2,0x10,0xd3,0xa2,0x87,0x19,0xb4, - 0x1a,0xf2,0x0e,0x7e,0x1d,0x57,0x6f,0xc6,0xca,0x3c,0x32,0xc7,0xa7,0x86,0x1d,0xc9, - 0x0b,0x5a,0x8b,0xf3,0x19,0xb2,0x90,0x4b,0x6a,0x52,0x2c,0x37,0x0f,0x3b,0xb5,0x67, - 0x40,0x81,0xcf,0xa2,0xb1,0x57,0xa0,0x5b,0xcd,0x5d,0xa4,0x23,0x0e,0x3a,0x42,0xcd, - 0x2c,0xcd,0x9f,0xdb,0xdd,0x7d,0x96,0x6d,0x87,0xa7,0xd6,0xec,0x7a,0x7c,0xf9,0xd9, - 0xa6,0x11,0xb6,0xf8,0x3b,0x3d,0x4d,0xae,0x8a,0x82,0xde,0xfc,0x7b,0x7d,0xe1,0xed, - 0x25,0x1c,0xa7,0x8d,0x17,0xc3,0x8d,0x15,0xee,0x1e,0xd7,0xed,0xfa,0x7e,0x27,0xd9, - 0xc0,0xfb,0xcf,0xdd,0xbb,0x3f,0xe4,0xc9,0xeb,0x1d,0xdf,0xfd,0xfb,0x7f,0x40,0x00, - 0x05,0x8d,0x0d,0x79,0x89,0xfc,0x3a,0x62,0xe7,0xc6,0xa7,0xd5,0xd0,0x6d,0x30,0x1e, - 0x47,0x88,0xd1,0x32,0x13,0x20,0x8c,0x4d,0xe6,0x80,0x28,0xc6,0x5b,0x50,0x63,0x63, - 0xdc,0x00,0x1a,0x49,0x75,0x9d,0x39,0x91,0x31,0xcd,0xe3,0x8c,0x3f,0x86,0xa8,0x23, - 0x89,0x88,0x1b,0x65,0x7e,0xf9,0xf9,0xaf,0xb3,0x68,0xc7,0x31,0x34,0x60,0x9b,0x73, - 0x55,0x3b,0xc0,0xbb,0x34,0xdf,0xab,0x75,0x42,0x25,0xf0,0x66,0x56,0xe4,0xc4,0xc9, - 0xf6,0x0c,0x7b,0xf1,0x95,0x46,0x18,0x70,0x46,0xc8,0xf8,0x76,0x57,0xe5,0x5b,0xe6, - 0x75,0x7b,0xe0,0xbe,0xdd,0xe6,0x43,0xe7,0xbe,0x41,0xf1,0x67,0xd6,0xe6,0x49,0xb9, - 0xe4,0x83,0xfb,0x25,0x34,0xc2,0x0b,0x5d,0xcb,0x4c,0xf9,0x77,0xd7,0xe7,0xa7,0xcc, - 0x54,0xc9,0x0a,0x06,0x2f,0x43,0x21,0x29,0x27,0x79,0xc7,0xdd,0xd0,0xa9,0xd5,0x9e, - 0x71,0x31,0xea,0xf6,0x6a,0x66,0x88,0x29,0x62,0x3a,0xc0,0x5e,0x09,0xab,0x8b,0x12, - 0xa8,0x07,0x59,0x49,0xd4,0xe6,0x1b,0xd2,0xfc,0x51,0xd3,0x2d,0xdd,0xe7,0xbb,0x99, - 0x05,0x53,0x03,0x13,0x18,0xab,0x1d,0xcb,0xcc,0x3e,0xa8,0x1f,0x5f,0xef,0x03,0x6e, - 0x08,0x3d,0xb8,0xb1,0xbd,0xed,0x8d,0x88,0x6a,0x38,0xf2,0x6e,0x5e,0xec,0x72,0x5f, - 0xf1,0xed,0xed,0x5b,0x19,0x3c,0x62,0x6e,0x51,0x70,0xfa,0x7e,0x5f,0xed,0x1d,0xcf, - 0xf6,0xac,0x23,0xc2,0xd7,0xaf,0xd3,0x75,0x42,0xb3,0xf3,0x6f,0xde,0xee,0xef,0x5f, - 0xf7,0xe7,0xbc,0x7b,0x1d,0xab,0x03,0x5c,0x4f,0x20,0xfb,0x7f,0xdf,0xef,0x87,0x60, - 0x22,0x41,0x8c,0x44,0xb6,0xb8,0x38,0xc5,0xc5,0x58,0xd4,0xe6,0x9a,0x7d,0x67,0xb6, - 0xd8,0xfd,0xcc,0xd6,0x20,0x3c,0xfc,0x8b,0xf5,0xd7,0xc4,0x34,0x74,0x93,0xe2,0xc3, - 0xa8,0x67,0x28,0x77,0xb8,0xbd,0x31,0x41,0x9b,0x5b,0xcd,0x25,0xf5,0x85,0xce,0xd3, - 0xe5,0x6e,0xd5,0x55,0x36,0xf5,0x35,0x66,0x44,0x2c,0x85,0x67,0x2a,0xfc,0x60,0xc2, - 0xa5,0x9a,0xe4,0xc6,0x36,0xb4,0xb3,0xcd,0x90,0xa5,0xf4,0xe6,0x76,0xf4,0xef,0xa0, - 0xcc,0xcf,0xec,0xd6,0x37,0xb5,0xc7,0xc2,0x17,0x97,0xfc,0xf6,0x77,0xf5,0x85,0xfc, - 0x82,0xd8,0xe5,0xc7,0xb6,0xb6,0x8b,0xc7,0x07,0x09,0xf5,0xe7,0xf6,0xf6,0x34,0x26, - 0x40,0x91,0xed,0xd7,0xb7,0xb7,0xba,0xdc,0x11,0xd5,0xfd,0xf7,0xf7,0xf7,0xc5,0x75, - 0x08,0x63,0x11,0xaa,0xbe,0xbb,0x56,0xeb,0xc1,0xd5,0x8e,0x7e,0x82,0xf7,0x06,0x78, - 0xac,0xfd,0xf4,0x14,0x9e,0xdc,0xb0,0x6a,0x57,0xda,0xba,0xf9,0xff,0xf1,0x27,0xaf, - 0x2d,0x97,0xe6,0x2f,0xf4,0xaa,0x7d,0x55,0x4f,0x9b,0x27,0x68,0xfe,0x0f,0x07,0x9d, - 0x2c,0x95,0xf5,0x1d,0x1e,0xfa,0x6f,0x66,0xa8,0x43,0x0d,0xdd,0x16,0x6a,0x6e,0x65, - 0x8d,0x1c,0xe6,0xce,0x3e,0xbc,0x88,0xce,0x19,0xd8,0xf6,0xee,0x7e,0xfc,0x0e,0x7a, - 0x23,0x10,0xee,0xde,0x3f,0xbd,0x25,0xfa,0x69,0xcc,0xfe,0xfe,0x7f,0xfd,0x1f,0x0d, - 0x1a,0xdf,0xe7,0xcf,0xbe,0xbe,0xa8,0xa3,0x95,0xed,0xf7,0xef,0xfe,0xfe,0x17,0x7b, - 0x50,0x20,0xef,0xdf,0xbf,0xbf,0x5c,0xdf,0xe9,0x2d,0xff,0xff,0x80,0xb9, -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_update.c deleted file mode 100644 index 7b4ef42e9c3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3672 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.2 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - * V2.2: - * 1. multi-system supported - * 2. flashless update no pid vid compare - * By Meta, 2014/01/14 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include - -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_GLINK_LENGTH 0x3000 // 12k -#define FW_GWAKE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -u8 searching_file = 0; -u8 got_file_flag = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 is_950; -extern u8 after_912_1020; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); - -#if GTP_FL_LITTLE_SYSTEM -extern u8 power_is_down; -#endif - -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_gwake_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_ERROR("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->pid, "9158", 4) && !memcmp(update_msg.ic_fw_msg.pid, "915S", 4)) - { - GTP_INFO("Update GT915S to GT9158 directly!"); - return SUCCESS; - } - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} - -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_ERROR("INVALID gtp_default_FW, check your gt9xx_firmware.h file!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - if (update_msg.fw_total_len < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_ERROR("INVALID bin file(size: %d), update aborted.", update_msg.fw_total_len); - return FAIL; - } - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - return FAIL; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - return FAIL; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - if(retry >= MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - burn_length += frame_length; - burn_addr += frame_length; - } - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_INFO("[burn_fw_boot_isp]Begin burn boot_isp firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step9:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_INFO("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_gwake_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_GLINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_gwake_section(client, fw_link, 0x9000, FW_GLINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_GLINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_gwake_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_gwake(struct i2c_client *client) -{ - u8* fw_gwake = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the gwake code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_INFO("[burn_fw_gwake]Begin burn gwake firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_gwake]step1:alloc memory"); - while(retry++ < 5) - { - fw_gwake = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_gwake == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_gwake]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_gwake]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_gwake]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_gwake, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 1 fail."); - goto exit_burn_fw_gwake; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_gwake]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 1 fail."); - goto exit_burn_fw_gwake; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_gwake]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_gwake, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 2 fail."); - goto exit_burn_fw_gwake; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_gwake]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 2 fail."); - goto exit_burn_fw_gwake; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_gwake]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_gwake, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 3 fail."); - goto exit_burn_fw_gwake; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_gwake]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 3 fail."); - goto exit_burn_fw_gwake; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_gwake]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_gwake, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 4 fail."); - goto exit_burn_fw_gwake; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_gwake]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 4 fail."); - goto exit_burn_fw_gwake; - } - - update_msg.fw_burned_len += FW_GWAKE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_gwake: - kfree(fw_gwake); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8*)dir); //20121211 - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 20; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 50; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 60; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_gwake(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 80; - - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 90; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - msleep(100); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_AUTO_UPDATE_CFG && GTP_HEADER_FW_UPDATE) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if(ret <= 0) - { - GTP_ERROR("Update config failed."); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -#if GTP_AUTO_UPDATE -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} -#endif - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define FW_LITTLE_SS51_LENGTH (12 * 0x400) // 12K - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - path_put(&path); - path_put(&root_path); - return FAIL; - } - else - { - path_put(&path); - path_put(&root_path); - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - #if GTP_FL_LITTLE_SYSTEM - if (power_is_down) - { - GTP_DEBUG("System power is down, exit hold ss51 & dsp."); - return FAIL; - } - #endif - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - - after_912_1020 = 0; - if (!memcmp(fw_head->pid, "912", 3)) - { - if (fw_head->vid > 0x1020) - { - after_912_1020 = 1; - GTP_DEBUG("After 912_1020, config length set to 228"); - } - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -#if GTP_FL_LITTLE_SYSTEM -// blocksize: 256Bytes -u8 gup_burn_ss51_block(struct i2c_client *client, s32 block_section, s32 fw_block, u16 *fw_chksum) -{ - s32 ret = 0; - s32 index = 0; - s32 i = 0; - - GTP_DEBUG("Burn big ss51 block%d section%d (size: 256Bytes)", fw_block, block_section); - - switch (fw_block) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - index = FW_HEAD_LENGTH + (8 + fw_block-1)* 1024 * 2 + (block_section-1) * 256; - break; - - case 9: - case 10: - case 11: - index = FW_HEAD_LENGTH + (16 - fw_block) * 1024 * 2 + (block_section-1) * 256; - break; - default: - GTP_ERROR("Invalid firmware block: %d", fw_block); - return FAIL; - } - - ret = i2c_write_bytes(client, GTP_REG_BUFFER + (block_section - 1) * 256, - >p_default_FW_fl[index], 256); - - if (ret < 0) - { - GTP_ERROR("Failed to burn ss51 block%d section%d (size: 256Bytes)!", fw_block, block_section); - return FAIL; - } - - if (block_section == 1) - { - u16 chksum = 0; - - for (i = 0; i < (2 * 1024); i += 2) - { - chksum += ((gtp_default_FW_fl[index + i]) << 8) + (gtp_default_FW_fl[index + i + 1]); - } - *fw_chksum = chksum; - } - return SUCCESS; -} - -u8 gup_burn_ss51_seg_b(struct i2c_client *client, s32 size, u16 *fw_chksum) -{ - s32 ret = 0; - s32 i = 0; - u16 chksum = 0; - - GTP_DEBUG("Burn big ss51 Seg B(size: %dK)", size); - - ret = i2c_write_bytes(client, GTP_REG_SS51_SEG_B, - >p_default_FW_fl[FW_HEAD_LENGTH], size * 1024); - - if (ret < 0) - { - GTP_ERROR("Failed to Burn ss51 Seg B(size: %dK)", size); - return FAIL; - } - - for (i = 0; i < (size * 1024); i += 2) - { - chksum += ((gtp_default_FW_fl[FW_HEAD_LENGTH + i]) << 8) + gtp_default_FW_fl[FW_HEAD_LENGTH + i + 1]; - } - *fw_chksum = chksum; - return SUCCESS; -} - -static u8 gup_download_fw_little_ss51(struct i2c_client *client) -{ - s32 ret = 0; - GTP_INFO("Download little ss51"); - - GTP_DEBUG("Select Bank0."); - - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("Select bank0 fail."); - return FAIL; - } - - // Just write - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH + FW_SS51_LENGTH + FW_DSP_LENGTH], FW_LITTLE_SS51_LENGTH); - - - if (ret < 0) - { - GTP_ERROR("Failed to write little ss51."); - return FAIL; - } - - return SUCCESS; -} - -#endif - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - -#if GTP_FL_LITTLE_SYSTEM - if (GTP_FL_PWR_RESUME_BURN == dwn_mode) - { - return gup_download_fw_little_ss51(client); - } -#endif - - if (GTP_FL_FW_BURN == dwn_mode) - { - GTP_DEBUG("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_DEBUG("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif - -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 __gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode, int len) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_DEBUG("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_DEBUG("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - len); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - len); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - return __gup_download_fw_dsp(client, dwn_mode, FW_DSP_LENGTH); -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - -#if GTP_FL_LITTLE_SYSTEM - if (GTP_FL_PWR_RESUME_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin poweron resume little system download....."); - } -#endif - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - if (!memcmp(fw_head.pid, "950", 3)) - { - is_950 = 1; - GTP_DEBUG("GT9XXF IC Type: gt950"); - } - else - { - is_950 = 0; - } - - if (NULL != dir) - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - return SUCCESS; - -download_fail: - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 72; //80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - -int gup_reload_fw_dsp(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - u8 value = 0; - - if (NULL != dir) { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - if (FAIL == ret) { - GTP_ERROR("[reload_fw_dsp]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) { - ret = __gup_download_fw_dsp(i2c_client_point, dwn_mode, FW_DSP_LENGTH / 2); //reload 2k dsp code - if (FAIL == ret){ - GTP_ERROR("[reload_fw_dsp]burn dsp firmware fail."); - continue; - } - GTP_DEBUG("[reload_fw_dsp]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) { - GTP_ERROR("[reload_fw_dsp]retry timeout,RELOAD FW DSP FAIL."); - goto download_fail; - } - - if (NULL != dir) { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - } - ret = i2c_write_bytes(i2c_client_point, 0x801F, &value, 1); // clear gesture mode reg - if (ret == -1) - return FAIL; - else - return SUCCESS; - -download_fail: - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - } - return FAIL; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/mtk_tpd.c deleted file mode 100644 index fcc42e86f88..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,578 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) -int gesture_value; -char tpd_firmware_version_val[5]; -int tpd_config_version; -int tpd_x_line; -int tpd_y_line; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -u8 tpd_sensor_id; -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ -EXPORT_SYMBOL(gesture_value); -EXPORT_SYMBOL(tpd_firmware_version_val); -EXPORT_SYMBOL(tpd_config_version); -EXPORT_SYMBOL(tpd_x_line); -EXPORT_SYMBOL(tpd_y_line); -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -EXPORT_SYMBOL(tpd_sensor_id); -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - - - - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - - -static ssize_t hello_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", gesture_value); -} - - -static ssize_t hello_val_store(struct device* dev, struct device_attribute* attr, const char* buf, size_t count) { - int val = 0; - val = simple_strtol(buf, NULL, 10); - gesture_value = val; - return count; -} - -static ssize_t firmware_version_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%s\n", tpd_firmware_version_val); - -} -static ssize_t firmware_version_val_store(struct device* dev, struct device_attribute* attr, char* buf, size_t count) { - - return count; - -} -static ssize_t config_version_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%x\n", tpd_config_version); - -} -static ssize_t config_version_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - - return count; - -} -static ssize_t tpd_x_line_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%d\n", tpd_x_line); - -} -static ssize_t tpd_x_line_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - - return count; - -} -static ssize_t tpd_y_line_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%d\n", tpd_y_line); - -} -static ssize_t tpd_y_line_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - - return count; - -} - -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -static ssize_t sensor_id_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - return snprintf(buf, PAGE_SIZE, "%x\n", tpd_sensor_id); - -} -static ssize_t sensor_id_val_store(struct device* dev, struct device_attribute* attr, char* buf,size_t count) { - return count; -} -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - -static DEVICE_ATTR(gesture_val, S_IRUGO | S_IWUSR, hello_val_show, hello_val_store); -static DEVICE_ATTR(firmware_version, S_IRUGO | S_IWUSR, firmware_version_val_show, firmware_version_val_store); -static DEVICE_ATTR(cfg_version, S_IRUGO | S_IWUSR, config_version_val_show, config_version_val_store); -static DEVICE_ATTR(tpd_xline, S_IRUGO | S_IWUSR, tpd_x_line_val_show, tpd_x_line_val_store); -static DEVICE_ATTR(tpd_yline, S_IRUGO | S_IWUSR, tpd_y_line_val_show, tpd_y_line_val_store); -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ -/*MMI test app read sensor id to distinguish the tp manufacturer*/ -static DEVICE_ATTR(sensor_id, S_IRUGO | S_IWUSR, sensor_id_val_show, sensor_id_val_store); -/*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - - - - - - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - -//add by caoyang - if(device_create_file(&pdev->dev, &dev_attr_gesture_val) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_firmware_version) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_cfg_version) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_tpd_xline) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_tpd_yline) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - /*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/5/6*/ - /*MMI test app read sensor id to distinguish the tp manufacturer*/ - if(device_create_file(&pdev->dev, &dev_attr_sensor_id) < 0) { - printk(KERN_ERR"create sensor_id sys file failed!\n"); - } - /*[PLATFORM]-Add-END by falin.luo@tcl.com 2015/5/6*/ - - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd.h b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index f3bfa7ca1fe..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,431 +0,0 @@ -/* Copyright Statement: - * - * This software/firmware and related documentation ("MediaTek Software") are - * protected under relevant copyright laws. The information contained herein - * is confidential and proprietary to MediaTek Inc. and/or its licensors. - * Without the prior written permission of MediaTek inc. and/or its licensors, - * any reproduction, modification, use or disclosure of MediaTek Software, - * and information contained herein, in whole or in part, shall be strictly prohibited. - */ -/* MediaTek Inc. (C) 2010. All rights reserved. - * - * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES - * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") - * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON - * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE - * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR - * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH - * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES - * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES - * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK - * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR - * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND - * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, - * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, - * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO - * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. - * - * The following software/firmware and/or related documentation ("MediaTek Software") - * have been modified by MediaTek Inc. All revisions are subject to any receiver's - * applicable license agreements with MediaTek Inc. - */ - -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include -#ifdef MT6575 -#include -#include -#include -#endif -#ifdef MT6577 -#include -#include -#include -#endif -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client,u8 *buf,s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); - -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 // driver send config to TP in intilization -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 0 // turn off/on power on suspend/resume - -#define GTP_AUTO_UPDATE 0 // auto updated fw by .bin file -#define GTP_HEADER_FW_UPDATE 0 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 0 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF -#define GTP_FL_LITTLE_SYSTEM 0 // power off/on on suspend/resume, gt9xxf with an interim firwmare for it, - // function together with GTP_COMATIBLE_MODE & GTP_POWER_CTRL_SLEEP -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 1 // esd protection with a cycle of 2 seconds -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect - -#define GTP_WITH_PEN 0 -#define GTP_PEN_HAVE_BUTTON 0 // active pen has buttons, functions together with GTP_WITH_PEN - -#define GTP_GESTURE_WAKEUP 1 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON // report key as coordinate,Vibration feedback -//#define TPD_WARP_X // mirrored x coordinate -//#define TPD_WARP_Y // mirrored y coordinate -#define GTP_DEBUG_ON 1 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -// Sensor_ID Map: -/* sensor_opt1 sensor_opt2 Sensor_ID - GND GND 0 - VDDIO GND 1 - NC GND 2 - GND NC/300K 3 - VDDIO NC/300K 4 - NC NC/300K 5 -*/ -// TODO: define your own default or for Sensor_ID == 0 config here. -// The predefined one is just a sample config, which is not suitable for your tp in most cases. -#define CTP_CFG_GROUP1 {\ -0x54,0x00,0x04,0x58,0x02,0x05,0x34,0x00,0x01,0xCF,0x0F,0x0F,0x4B,0x32,0x03,0x03,\ -0x00,0x00,0x00,0x00,0x01,0x00,0x06,0x15,0x17,0x1C,0x14,0x88,0x08,0x0A,0x43,0x00,\ -0xD3,0x07,0x00,0x00,0x01,0x80,0x03,0x11,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x19,0x66,0x94,0xD5,0x02,0x08,0x00,0x00,0x04,0xC8,0x1D,0x00,0xA8,\ -0x26,0x00,0x8C,0x32,0x00,0x80,0x43,0x00,0x6E,0x59,0x00,0x6E,0x00,0x00,0x00,0x00,\ -0xF0,0x50,0x35,0x88,0x88,0x27,0x20,0x32,0x00,0x11,0x04,0x80,0x0A,0x0A,0x1F,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x28,\ -0x24,0x22,0x20,0x1F,0x1E,0x1D,0x0E,0x0C,0x0A,0x08,0x06,0x05,0x04,0x02,0xFF,0xFF,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x89,0x01\ -} -// TODO: define your config for Sensor_ID == 1 here, if needed -#define CTP_CFG_GROUP2 {\ - } -// TODO: define your config for Sensor_ID == 2 here, if needed -#if 0 -#define CTP_CFG_GROUP3 {\ -0x53,0x00,0x04,0x58,0x02,0x05,0x34,0x00,0x01,0xCF,0x0F,0x0F,0x4B,0x32,0x03,0x03,0x00,0x00,0x00,0x00,0x01,0x00,0x06,0x17,0x19,0x1D,0x14,\ -0x88,0x08,0x0A,0x43,0x00,0xD3,0x07,0x00,0x00,0x01,0x80,0x03,0x1D,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x66,0x94,\ -0xD5,0x02,0x08,0x00,0x00,0x04,0xC8,0x1D,0x00,0xA8,0x26,0x00,0x8C,0x32,0x00,0x80,0x43,0x00,0x6E,0x59,0x00,0x6E,0x00,0x00,0x00,0x00,0xF0,\ -0x50,0x35,0x88,0x88,0x27,0x20,0x32,0x00,0x11,0x04,0x80,0x0A,0x0A,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x28,0x24,0x22,0x20,0x1F,0x1E,0x1D,0x0E,0x0C,0x0A,0x08,0x06,0x05,0x04,0x02,0xFF,0xFF,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x01\ -} -#else -//chenhui change -#define CTP_CFG_GROUP3 {\ -0x56,0x00,0x04,0x58,0x02,0x05,0x34,0x00,0x01,0x0F,0x0F,0x0F,0x55,0x41,0x03,0x03,\ -0x00,0x00,0x00,0x00,0x21,0x21,0x06,0x14,0x14,0x1B,0x14,0x88,0x08,0x0A,0x43,0x00,\ -0xD3,0x07,0x00,0x00,0x00,0x81,0x02,0x1D,0x50,0x01,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x19,0x66,0x94,0xD5,0x02,0x08,0x00,0x00,0x04,0xC8,0x1D,0x00,0xA8,\ -0x26,0x00,0x8C,0x32,0x00,0x80,0x43,0x00,0x6E,0x59,0x00,0x6E,0x00,0x00,0x00,0x00,\ -0xF0,0x50,0x35,0x88,0x88,0x27,0x20,0x32,0x00,0x11,0x04,0x80,0x0A,0x0A,0x1F,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x00,\ -0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x28,\ -0x24,0x22,0x20,0x1F,0x1E,0x1D,0x0E,0x0C,0x0A,0x08,0x06,0x05,0x04,0x02,0xFF,0xFF,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0xD4,0x01\ -} -#endif - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - -// STEP_2(REQUIRED): Customize your I/O ports & I/O operations here -#define TPD_POWER_SOURCE_CUSTOM MT6323_POWER_LDO_VGP2// define your power source for tp if needed -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -// STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG - #define GTP_MAX_HEIGHT 800 - #define GTP_MAX_WIDTH 480 - #define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1024 - #define GTP_MAX_WIDTH 600 - #define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY - #define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.2.7<2014/12/26>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -// buffer -#define GTP_REG_BUFFER 0xB026 - -#define GTP_REG_SS51_SEG_B 0xC000 -#define GTP_REG_CHECKINFO 0xBF00 - -// State1 -#define GTP_REG_STATE1 0xBF08 -#define BUFFER_FULL 0x01 -#define CHECK_COMPLETE 0x02 -#define CHECK_ERROR 0x03 -#define WAIT_CHECK 0x04 // others: invalid - -// State2 -#define GTP_REG_STATE2 0xBF07 -#define IS_A_SEG 0x01 -#define IS_B_SEG_FIRST 0x02 -#define IS_B_SEG_OTHER 0x03 -#define IS_B_SEG_LAST 0x04 // others: invalid - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 -#define GTP_FL_PWR_RESUME_BURN 0x03 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define GTP_HOPPING_SEND 0 -#define GTP_HOPPING_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_STORE_HOPPING 0x05 -#define GTP_RQST_STORE_BAK_REF 0x06 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - -#define I2C_MASTER_CLOCK 300 -#define I2C_BUS_NUMBER 1 // I2C Bus for TP, mt6572 -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/kr076_nand/vibrator/Makefile b/arch/arm/mach-mt8127/kr076_nand/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/kr076_nand/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/Makefile b/arch/arm/mach-mt8127/pixi3_10/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom.h b/arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/Makefile b/arch/arm/mach-mt8127/pixi3_10/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.c b/arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.h b/arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/pixi3_10/accelerometer/cust_acc.c deleted file mode 100644 index 88d72fb66f6..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/pixi3_10/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.c b/arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.h b/arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/Makefile b/arch/arm/mach-mt8127/pixi3_10/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/alsps.c b/arch/arm/mach-mt8127/pixi3_10/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/alsps.h b/arch/arm/mach-mt8127/pixi3_10/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/cust_alsps.c b/arch/arm/mach-mt8127/pixi3_10/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/pixi3_10/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/pixi3_10/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/cam_cal/Makefile b/arch/arm/mach-mt8127/pixi3_10/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/pixi3_10/camera/camera/Makefile b/arch/arm/mach-mt8127/pixi3_10/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/pixi3_10/camera/camera/dummyds.c b/arch/arm/mach-mt8127/pixi3_10/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.c deleted file mode 100644 index 63512557674..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,335 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - -u32 pinSetIdx = 0;//default main sensor - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - -u32 pinSet[2][8] = { - //for main sensor - {GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - {GPIO_CAMERA_CMRST1_PIN, - GPIO_CAMERA_CMRST1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - - - - - - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx){ - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) { - pinSetIdx = 1; - } - - - //power ON - if (On) { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx==0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5647_RAW, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D2 power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A2 power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } -#if 0 - while(1){ - - mdelay(2000); - PK_DBG("im sleep ...\n"); - } -#endif -#if 1 - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } -#endif - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2659_YUV, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/common/partition_define.h b/arch/arm/mach-mt8127/pixi3_10/common/partition_define.h deleted file mode 100644 index 8a2504f5206..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/common/partition_define.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0xa8) - - -#define PART_NUM 25 - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info *PartInfo; - - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/common/partition_define_private.h b/arch/arm/mach-mt8127/pixi3_10/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/pixi3_10/common/pmt.h b/arch/arm/mach-mt8127/pixi3_10/common/pmt.h deleted file mode 100644 index 23504536328..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/common/pmt.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/pixi3_10/core/Makefile b/arch/arm/mach-mt8127/pixi3_10/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/core/board-custom.h b/arch/arm/mach-mt8127/pixi3_10/core/board-custom.h deleted file mode 100644 index 93d88239e1e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/pixi3_10/core/board.c b/arch/arm/mach-mt8127/pixi3_10/core/board.c deleted file mode 100644 index 1ad05f7eec7..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mt6575_nand_host_hw mt6575_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/core/logger_custom.h b/arch/arm/mach-mt8127/pixi3_10/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/pixi3_10/dct/dct/Makefile b/arch/arm/mach-mt8127/pixi3_10/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/dct/dct/codegen.dws b/arch/arm/mach-mt8127/pixi3_10/dct/dct/codegen.dws deleted file mode 100755 index 02e46f5bebf0df1783202f7a0d41d3639a889fc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23493 zcmeHP$#Ua15LNcQDw92*kejWkO6JNTX_;k_R4B^MocKSvyZvCXSbVFF&(u-(uP&E=EdEg}#Au}d1{(BIjInImH`FPkQ{y78 z%q7H!V!{t{*nh9+YE!ktrmpg#teSq zSjWhaGwf`FmOB?NBJf~*KUc_gCW1o7_LE}tN@lxa$k#VR-EOPcV#;6u@Po-fEhr&B&E*Jo5b6l_kGb5NkBaRV(JSgmC(+LDRhC3{W;*g3|w$&4~hmq!?`_UkxK0p2Qj*B@R0!aAzz6jZG2mdox;*SoLt+!_lG~Llw+j6*k zyim(%DAt=bNBQL1fk%^eMq>Nv0sdxF3^!eScM&>?&ULwGb~YcwaU)R9O+ZRH=yY0wR^G0I)uK13j6hzZ(pJjA??t){&FMpB2?R7! zMgf)bSfuHKgZfoPQLPScI0*?}hGR%6gN#h&kG|8>1MVD=r-yT0j}oq361j#U zo@*y{TvN!VE7{mt8jGb!3~v-oVCtVoM9i5E!zb71hs^Q?O0Z1aBtv0+o%(lyOR= zl!NX^Q&T%C8l#XBl~G732i-5Enp@~T31=P*;8O;m9Rg4We!8$$%lvZK7TF^O%4Y*1 zJAXEip>Z~HCPp*PPAlAwK0YSKj_-(18L5kAibzb*7_RmkG077XRLcS#L^z%TSEs|= z6qPNIs+of_n#)(tMPh=F;X-~0m%g;aShhJ_*vh=XL#F*kN*;2yglj7CRCVyz>>=xx zo{;S6hxNn}sxM@Ey+<3#o892vQ7#_qj-mqH?~ZcJjPxu69Ym}^s9MxXJIYWk%?CPZ zAHtn{i2;FV(>tAA*7d`#`>O~(t1yhtK)IhFRDU285}XSqQxFrAz7#KccSldf41`{&J^lj;Tnh!+Gn#y$R~?V~(+7$%A4no5l!r$|&KQ zN~JoaI-mmSdUoFH*>kHe|C)j8L+ly>IT~%u$o5+AbqUw(v*%t1tg^iKf#6cR6)xt@`jMB|kfFhbhZczLSH;WM%UA1cdmZ^_FSrqhRK}xBQV~kC(_e>Ho9(b} zX5Wpn<}wa|CtBs}8*Gk*B zyZn0CWKFqNBMS(-kJX{R9S5=Fi+buWvuTZ-4>ij@4Y1TVOSGIhfJPF30`Vs*8+_$J zrzj`&1i4^k>i+ka%a{5GGNxrl#SSd@BWB7q^g_O!SeIIL9!Nk;T+n%I0)U>>8sSAd zDYn1``-M94>u%WgS+7;+DuFjA7Azvxsfg~JB}mx0sI*~IO;SyqO_4T4+7M|&umb69 z*gqTa*+k#XQGYqzPx33Tfb^bZ7c!Li)&Q4DSJE-(o z>Otx`7`Kp`uIuuux03({0Q0ix%g)M~LszY?g*juWUm3irx?0qU@UOG{#+?qPNv(Tz kA)1<~s}Pl$E(FZTRAmys -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/pixi3_10/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/pixi3_10/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/Makefile b/arch/arm/mach-mt8127/pixi3_10/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/pixi3_10/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/pixi3_10/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/pixi3_10/hdmi/Makefile b/arch/arm/mach-mt8127/pixi3_10/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/pixi3_10/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/pixi3_10/headset/Makefile b/arch/arm/mach-mt8127/pixi3_10/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.c b/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.h b/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/pixi3_10/keypad/Makefile b/arch/arm/mach-mt8127/pixi3_10/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd.h deleted file mode 100644 index b173ba13a12..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/pixi3_10/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/pixi3_10/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/pixi3_10/lcm/Makefile b/arch/arm/mach-mt8127/pixi3_10/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/pixi3_10/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/pixi3_10/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/pixi3_10/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/pixi3_10/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/pixi3_10/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/pixi3_10/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/pixi3_10/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/pixi3_10/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/leds/Makefile b/arch/arm/mach-mt8127/pixi3_10/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/Makefile b/arch/arm/mach-mt8127/pixi3_10/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/dummy_lens.c b/arch/arm/mach-mt8127/pixi3_10/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/pixi3_10/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/Makefile b/arch/arm/mach-mt8127/pixi3_10/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.c b/arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.h b/arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/pixi3_10/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/pixi3_10/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.c b/arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.h b/arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter.h b/arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter.h deleted file mode 100644 index 5ef80601aee..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 3009 -#define Q_MAX_POS_25 3009 -#define Q_MAX_POS_0 3009 -#define Q_MAX_NEG_10 3009 - -#define Q_MAX_POS_50_H_CURRENT 2975 -#define Q_MAX_POS_25_H_CURRENT 2975 -#define Q_MAX_POS_0_H_CURRENT 2975 -#define Q_MAX_NEG_10_H_CURRENT 2975 - - -/* Discharge Percentage */ -#define OAM_D5 1 // 1 : D5, 0: D2 - - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 60 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 70 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 60 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 5400 //90 * 60 = 90 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter_table.h deleted file mode 100644 index 9574fa0095c..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/power/cust_battery_meter_table.h +++ /dev/null @@ -1,1068 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/pixi3_10/power/cust_charging.h b/arch/arm/mach-mt8127/pixi3_10/power/cust_charging.h deleted file mode 100644 index ca1a98df01c..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/power/cust_charging.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 50 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 47 -#define MIN_CHARGE_TEMPERATURE 0 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 6 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 150 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -//#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/pixi3_10/power/cust_diso.h b/arch/arm/mach-mt8127/pixi3_10/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/power/cust_pe.h b/arch/arm/mach-mt8127/pixi3_10/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/pixi3_10/power/cust_pmic.h b/arch/arm/mach-mt8127/pixi3_10/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/pixi3_10/rtc/rtc-mt.h b/arch/arm/mach-mt8127/pixi3_10/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/sound/Makefile b/arch/arm/mach-mt8127/pixi3_10/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/pixi3_10/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/pixi3_10/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/pixi3_10/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/pixi3_10/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/pixi3_10/ssw/Makefile b/arch/arm/mach-mt8127/pixi3_10/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/ssw/inc/ssw.h b/arch/arm/mach-mt8127/pixi3_10/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/pixi3_10/ssw/sim_switch.c b/arch/arm/mach-mt8127/pixi3_10/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/Makefile b/arch/arm/mach-mt8127/pixi3_10/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/goodix_tool.c deleted file mode 100644 index 7ebef7d3f39..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/goodix_tool.c +++ /dev/null @@ -1,829 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version:1.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#include -#include -#include /*proc*/ - -#include "tpd_custom_gt9xx.h" -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif -extern s32 gup_load_hotknot_system(void); -extern s32 gup_load_fx_system(void); -extern s32 gup_recovery_main_system(void); -extern s32 gup_load_main_system(char *filepath); - -#if 0 -static struct proc_dir_entry *goodix_proc_entry; -#endif - -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; - -#if HOTKNOT_BLOCK_RW -DECLARE_WAIT_QUEUE_HEAD(bp_waiter); -u8 got_hotknot_state = 0; -u8 got_hotknot_extra_state = 0; -u8 wait_hotknot_state = 0; -u8 force_wake_flag = 0; -#endif - -#define HOTKNOTNAME "hotknot" - -static ssize_t hotknot_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t hotknot_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static struct file_operations hotknot_fops = -{ -// .owner = THIS_MODULE, - .read = hotknot_read, - .write = hotknot_write, -}; - -static struct miscdevice hotknot_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = HOTKNOTNAME, - .fops = &hotknot_fops, -}; -static ssize_t goodix_tool_upper_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t goodix_tool_upper_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static const struct file_operations gt_tool_fops = { - .write = goodix_tool_upper_write, - .read = goodix_tool_upper_read, -}; - -static void tool_set_proc_name(char * procname) -{ -#if 1 - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); -#else - sprintf(procname, HOTKNOTNAME); -#endif - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); -#if 0 - goodix_proc_entry = create_proc_entry(procname, 0660, NULL); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - goodix_proc_entry->write_proc = goodix_tool_write; - goodix_proc_entry->read_proc = goodix_tool_read; - } -#else - if(proc_create(procname, 0660, NULL, >_tool_fops)== NULL) - { - GTP_ERROR("create_proc_entry %s failed", procname); - return -1; - } -#endif - -#if 1 // setting by hotknot feature - if (misc_register(&hotknot_misc_device)) - { - printk("mtk_tpd: hotknot_device register failed\n"); - return FAIL; - } -#endif - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[Write]tpd_halt =1 fail!"); - return FAIL; - } - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - GTP_DEBUG("wr :0x%02x.", cmd_head.wr); - /* - GTP_DEBUG("flag:0x%02x.", cmd_head.flag); - GTP_DEBUG("flag addr:0x%02x%02x.", cmd_head.flag_addr[0], cmd_head.flag_addr[1]); - GTP_DEBUG("flag val:0x%02x.", cmd_head.flag_val); - GTP_DEBUG("flag rel:0x%02x.", cmd_head.flag_relation); - GTP_DEBUG("circle :%d.", (s32)cmd_head.circle); - GTP_DEBUG("times :%d.", (s32)cmd_head.times); - GTP_DEBUG("retry :%d.", (s32)cmd_head.retry); - GTP_DEBUG("delay :%d.", (s32)cmd_head.delay); - GTP_DEBUG("data len:%d.", (s32)cmd_head.data_len); - GTP_DEBUG("addr len:%d.", (s32)cmd_head.addr_len); - GTP_DEBUG("addr:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - GTP_DEBUG("len:%d.", (s32)len); - GTP_DEBUG("buf[20]:0x%02x.", buff[CMD_HEAD_LENGTH]); - */ - - if (1 == cmd_head.wr) - { - // copy_from_user(&cmd_head.data[cmd_head.addr_len], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return FAIL; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (3 == cmd_head.wr) //Write ic type - { - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - return CMD_HEAD_LENGTH; - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - return CMD_HEAD_LENGTH; - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - - return CMD_HEAD_LENGTH; - } - -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return FAIL; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - ret = copy_from_user(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - GTP_DEBUG("update firmware, filename: %s", cmd_head.data); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return FAIL; - } - } - -#endif - else if (19 == cmd_head.wr) //load subsystem - { - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(0 == cmd_head.data[0]) - { - if (FAIL == gup_load_hotknot_system()) - { - return FAIL; - } - } - else if(1 == cmd_head.data[0]) - { - if (FAIL == gup_load_fx_system()) - { - return FAIL; - } - } - else if(2 == cmd_head.data[0]) - { - if (FAIL == gup_recovery_main_system()) - { - return FAIL; - } - } - else if(3 == cmd_head.data[0]) - { - if (FAIL == gup_load_main_system(NULL)) - { - return FAIL; - } - } - } -#if HOTKNOT_BLOCK_RW - else if (21 == cmd_head.wr) - { - u16 wait_hotknot_timeout = 0; - u8 rqst_hotknot_state; - - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], - &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - rqst_hotknot_state = cmd_head.data[GTP_ADDR_LENGTH]; - wait_hotknot_state |= rqst_hotknot_state; - wait_hotknot_timeout = (cmd_head.data[GTP_ADDR_LENGTH + 1]<<8) + - cmd_head.data[GTP_ADDR_LENGTH + 2]; - GTP_DEBUG("Goodix tool received wait polling state:0x%x,timeout:%d, all wait state:0x%x", - rqst_hotknot_state, wait_hotknot_timeout, wait_hotknot_state); - got_hotknot_state &= (~rqst_hotknot_state); - //got_hotknot_extra_state = 0; - switch(rqst_hotknot_state) - { - set_current_state(TASK_INTERRUPTIBLE); - case HN_DEVICE_PAIRED: - hotknot_paired_flag = 0; - wait_event_interruptible(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waiter failed.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_SEND: - case HN_SLAVE_RECEIVED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)) - { - return got_hotknot_extra_state; - } - else - { - GTP_ERROR("Wait 0x%x block polling waiter timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_DEPARTED: - case HN_SLAVE_DEPARTED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waitor timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - default: - GTP_ERROR("Invalid rqst_hotknot_state in goodix_tool."); - break; - } - force_wake_flag = 0; - } - else if(23 == cmd_head.wr) - { - GTP_DEBUG("Manual wakeup all block polling waiter!"); - got_hotknot_state = 0; - wait_hotknot_state = 0; - force_wake_flag = 1; - hotknot_paired_flag = 0; - wake_up_interruptible(&bp_waiter); - } -#endif - return CMD_HEAD_LENGTH; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data) -{ - u64 ret = 0; - - GTP_DEBUG_FUNC(); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[READ]tpd_halt =1 fail!"); - return FAIL; - } - if (cmd_head.wr % 2) - { - GTP_ERROR("[READ] invaild operator fail!"); - return FAIL; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= DATA_LENGTH; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return FAIL; - } - - ret = copy_to_user(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - } - else if (2 == cmd_head.wr) - { - // memcpy(page, "gt8", cmd_head.data_len); - // memcpy(page, "GT818", 5); - // page[5] = 0; - - GTP_DEBUG("Return ic type:%s len:%d.", page, (s32)cmd_head.data_len); - return cmd_head.data_len; - //return sizeof(IC_TYPE_NAME); - } - else if (4 == cmd_head.wr) - { - page[0] = show_len >> 8; - page[1] = show_len & 0xff; - page[2] = total_len >> 8; - page[3] = total_len & 0xff; - - return cmd_head.data_len; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - // memcpy(page, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - s32 tmp_len; - tmp_len = strlen(GTP_DRIVER_VERSION); - ret = copy_to_user(page, GTP_DRIVER_VERSION, tmp_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - page[tmp_len] = 0; - } - - return cmd_head.data_len; -} - - diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_driver.c deleted file mode 100644 index cde964d3ccc..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,3350 +0,0 @@ -#include "tpd.h" -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#include "cust_gpio_usage.h" - -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif -#include /*proc*/ - -extern struct tpd_device *tpd; -#ifdef VELOCITY_CUSTOM -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -#endif -static int tpd_flag = 0; -int tpd_halt = 0; -static int tpd_eint_mode=1; -static struct task_struct *thread = NULL; -static int tpd_polling_time=50; -extern u8 load_fw_process; - -static DECLARE_WAIT_QUEUE_HEAD(waiter); -DEFINE_MUTEX(i2c_access); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = TPD_KEYS; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -struct touch_vitual_key_map_t -{ - int point_x; - int point_y; -}; -static struct touch_vitual_key_map_t touch_key_point_maping_array[]=GTP_KEY_MAP_ARRAY; -#endif - -#if GTP_SLIDE_WAKEUP -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); -#endif - -#if GTP_CHARGER_SWITCH - extern kal_bool upmu_is_chr_det(void); - static void gtp_charger_switch(s32 dir_update); -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -//static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local_normal[8] = TPD_CALIBRATION_MATRIX_ROTATION_NORMAL; -static int tpd_def_calmat_local_factory[8] = TPD_CALIBRATION_MATRIX_ROTATION_FACTORY; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -static void tpd_on(void); -static void tpd_off(void); - -#ifdef GTP_CHARGER_DETECT -extern bool upmu_get_pchr_chrdet(void); -#define TPD_CHARGER_CHECK_CIRCLE 50 -static struct delayed_work gtp_charger_check_work; -static struct workqueue_struct *gtp_charger_check_workqueue = NULL; -static void gtp_charger_check_func(struct work_struct *); -static u8 gtp_charger_mode = 0; -#endif - - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -u8 esd_running = 0; -spinlock_t esd_lock; -#endif - -#if HOTKNOT_BLOCK_RW -u8 hotknot_paired_flag = 0; -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -#ifndef GTP_REG_REFRESH_RATE -#define GTP_REG_REFRESH_RATE 0x8056 -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#ifdef GTP_CHARGER_DETECT -static u8 config_charger[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#endif -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; -static u8 chip_gt9xxs = 0; // true if chip type is gt9xxs,like gt915s - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -u8 gtp_ref_retries = 0; -u8 gtp_clk_retries = 0; -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 gtp_clk_buf[6]; -u8 rqst_processing = 0; - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern s32 gup_load_main_system(char *filepath); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -u8 is_reseting = 0; -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -static struct proc_dir_entry *gt91xx_config_proc = NULL; - -#ifdef TPD_REFRESH_RATE -/******************************************************* -Function: - Write refresh rate - -Input: - rate: refresh rate N (Duration=5+N ms, N=0~15) - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static u8 gtp_set_refresh_rate(u8 rate) -{ - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff, rate}; - - if (rate > 0xf) - { - GTP_ERROR("Refresh rate is over range (%d)", rate); - return FAIL; - } - - GTP_INFO("Refresh rate change to %d", rate); - return gtp_i2c_write(i2c_client_point, buf, sizeof(buf)); -} - -/******************************************************* -Function: - Get refresh rate - -Output: - Refresh rate or error code -*******************************************************/ -static u8 gtp_get_refresh_rate(void) -{ - int ret; - - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff}; - ret = gtp_i2c_read(i2c_client_point, buf, sizeof(buf)); - if (ret < 0) - return ret; - - GTP_INFO("Refresh rate is %d", buf[GTP_ADDR_LENGTH]); - return buf[GTP_ADDR_LENGTH]; -} - -//============================================================= -static ssize_t show_refresh_rate(struct device *dev,struct device_attribute *attr, char *buf) -{ - int ret = gtp_get_refresh_rate(); - if (ret < 0) - return 0; - else - return sprintf(buf, "%d\n", ret); -} -static ssize_t store_refresh_rate(struct device *dev,struct device_attribute *attr, const char *buf, size_t size) -{ - //u32 rate = 0; - gtp_set_refresh_rate(simple_strtoul(buf, NULL, 16)); - return size; -} -static DEVICE_ATTR(tpd_refresh_rate, 0664, show_refresh_rate, store_refresh_rate); - -static struct device_attribute *gt9xx_attrs[] = -{ - &dev_attr_tpd_refresh_rate, -}; -#endif -//============================================================= - - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - -static int gt91xx_config_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i, len, err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - - ptr = page; - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - /* Touch PID & VID */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== GT9XX Version ID ====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_VERSION, temp_data, 6); - ptr += sprintf(ptr, "Chip PID: %c%c%c VID: 0x%02X%02X\n", temp_data[0], temp_data[1], temp_data[2], temp_data[5], temp_data[4]); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW_fl[12], gtp_default_FW_fl[13]); - } - else - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); - } -#else - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); -#endif - i2c_read_bytes(i2c_client_point, 0x41E4, temp_data, 1); - ptr += sprintf(ptr, "Boot status 0x%X\n", temp_data[0]); - - /* Touch Status and Clock Gate */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== Touch Status and Clock Gate ====\n"); - ptr += sprintf(ptr, "status: 1: on, 0 :off\n"); - ptr += sprintf(ptr, "status:%d\n", (tpd_halt+1)&0x1); - - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; - - //return (ptr - page); -} - -static int gt91xx_config_write_proc(struct file *file, const char *buffer, size_t count, loff_t *ppos) -{ - s32 ret = 0; - char temp[25] = {0}; // for store special format cmd - char mode_str[15] = {0}; - unsigned int mode; - u8 buf[1]; - - GTP_DEBUG("write count %ld\n", (unsigned long)count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%ld]", GTP_CONFIG_MAX_LENGTH, (unsigned long)count); - return -EFAULT; - } - - /**********************************************/ - /* for store special format cmd */ - if (copy_from_user(temp, buffer, sizeof(temp))) - { - GTP_ERROR("copy from user fail 2"); - return -EFAULT; - } - sscanf(temp, "%s %d", (char *)&mode_str, &mode); - - /***********POLLING/EINT MODE switch****************/ - if(strcmp(mode_str, "polling") == 0) - { - if(mode>=10&&mode<=200) - { - GTP_INFO("Switch to polling mode, polling time is %d",mode); - tpd_eint_mode=0; - tpd_polling_time=mode; - tpd_flag = 1; - wake_up_interruptible(&waiter); - } - else - { - GTP_INFO("Wrong polling time, please set between 10~200ms"); - } - return count; - } - if(strcmp(mode_str, "eint") == 0) - { - GTP_INFO("Switch to eint mode"); - tpd_eint_mode=1; - return count; - } - /**********************************************/ - if(strcmp(mode_str, "switch") == 0) - { - if(mode == 0)// turn off - tpd_off(); - else if(mode == 1)//turn on - tpd_on(); - else - GTP_ERROR("error mode :%d", mode); - return count; - } - //force clear config - if(strcmp(mode_str, "clear_config") == 0) - { - GTP_INFO("Force clear config"); - buf[0] = 0x10; - ret = i2c_write_bytes(i2c_client_point, GTP_REG_SLEEP, buf, 1); - return count; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - /***********clk operate reseved****************/ - /**********************************************/ - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_DEBUG("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - if (buf[5] == 'S' || buf[5] == 's') - { - chip_gt9xxs = 1; - } - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing; - } - else - #endif - { - gtp_get_info(client); - } - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(100); // for dbl-system -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = (int)gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return ret; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - } - gtp_chip_type = CHIP_TYPE_GT9; // for test - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("[gtp_bak_ref_proc]Alloc memory for ref failed.use default ref"); - return FAIL; - } - memset(refp, 0, ref_len); - if(gtp_ref_retries >= GTP_CHK_FS_MNT_MAX) - { - for (j = 0; j < ref_grps; ++j) - { - refp[ref_seg_len + j * ref_seg_len -1] = 0x01; - } - ret = i2c_write_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Write ref i2c error."); - ret = FAIL; - } - - GTP_ERROR("[gtp_bak_ref_proc]Bak file or path is not exist,send default ref."); - ret = SUCCESS; - goto exit_ref_proc; - } - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0660); - if (IS_ERR(flp)) - { - GTP_ERROR("[gtp_bak_ref_proc]Ref File not found!Creat ref file."); - //flp->f_op->llseek(flp, 0, SEEK_SET); - //flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - gtp_ref_retries++; - ret = FAIL; - goto exit_ref_proc; - } - else if(GTP_BAK_REF_SEND == mode) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref file failed."); - memset(refp, 0, ref_len); - } - } - - if(GTP_BAK_REF_STORE == mode) - { - ret = i2c_read_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref i2c error."); - ret = FAIL; - goto exit_ref_proc; - } - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - else - { - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; i 120) || - (gtp_clk_buf[i] != gtp_clk_buf[0])) - { - break; - } - clk_chksum += gtp_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_INFO("Clk ram legality check success"); - return SUCCESS; - } - GTP_ERROR("main clock freq in clock buf is wrong"); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - struct file *flp = NULL; - - //check clk legality - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - goto send_main_clk; - } - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("[gtp_main_clk_proc]cal clk result is illegitimate"); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - - if (IS_ERR(flp)) - { - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - } - else - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - goto exit_clk_proc; - } - - ret = SUCCESS; - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -#endif -//************* For GT9XXF End **********************// - -static const struct file_operations gt_upgrade_proc_fops = { - .write = gt91xx_config_write_proc, - .read = gt91xx_config_read_proc -}; - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - -//#ifdef VELOCITY_CUSTOM - #if 0 - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#ifdef VELOCITY_CUSTOM - tpd_v_magnify_x = TPD_VELOCITY_CUSTOM_X; - tpd_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; - -#endif - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0660, NULL, >_upgrade_proc_fops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_INFO(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif -#if GTP_SLIDE_WAKEUP - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); -#endif - -#if GTP_WITH_PEN - // pen support - __set_bit(BTN_TOOL_PEN, tpd->dev->keybit); - __set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); - //__set_bit(INPUT_PROP_POINTER, tpd->dev->propbit); // 20130722 -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; - - return 0; -} - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void) -{ - s32 i = 0; - s32 ret = 0; - //static u8 is_reseting = 0; - - if(is_reseting || (load_fw_process == 1)) - { - return; - } - GTP_INFO("force_reset_guitar"); - is_reseting = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - for (i = 0; i < 5; i++) - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - //check code ram - ret = gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - } - else - #endif - { - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - is_reseting = 0; - -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[2] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - if(1 == load_fw_process) - { - GTP_INFO("Load FW process is runing"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - memset(esd_buf, 0x01, sizeof(esd_buf)); - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, sizeof(esd_buf)); - msleep(50); - force_reset_guitar(); - } - } - -#if FLASHLESS_FLASH_WORKROUND - { - u8 versionBuff[6]; - int retry = 0; - u8 temp = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - //match pid - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - temp = versionBuff[5]; - versionBuff[5] = versionBuff[4]; - versionBuff[4] = temp; - //match vid - if( memcmp(&versionBuff[4], >p_default_FW_fl[12], 2) !=0 ) - { - continue; - } - break; - } - if(retry>=3) - { - GTP_INFO("IC version error., force reset!"); - force_reset_guitar(); - } - } -#endif - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif -static int tpd_history_x=0, tpd_history_y=0; -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(x, y, x, y, id, 1); - tpd_history_x=x; - tpd_history_y=y; - - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 1, x+y); -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - //input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); - input_report_key(tpd->dev, BTN_TOUCH, 0); - //input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(tpd_history_x, tpd_history_y, tpd_history_x, tpd_history_y, id, 0); - tpd_history_x=0; - tpd_history_y=0; - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 0, x+y); - -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - - chr_status = upmu_is_chr_det(); - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -/*Coordination mapping*/ -static void tpd_calibrate_driver(int *x, int *y) -{ - int tx; - - GTP_DEBUG("Call tpd_calibrate of this driver ..\n"); - - tx = ( (tpd_def_calmat[0] * (*x)) + (tpd_def_calmat[1] * (*y)) + (tpd_def_calmat[2]) ) >> 12; - *y = ( (tpd_def_calmat[3] * (*x)) + (tpd_def_calmat[4] * (*y)) + (tpd_def_calmat[5]) ) >> 12; - *x = tx; -} - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#if HOTKNOT_BLOCK_RW - u8 hn_pxy_state = 0; - u8 hn_pxy_state_bak = 0; - u8 hn_paired_cnt = 0; - u8 hn_state_buf[10] = {(u8)(GTP_REG_HN_STATE>> 8), (u8)(GTP_REG_HN_STATE & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - -#if GTP_SLIDE_WAKEUP - u8 doze_buf[3] = {0x81, 0x4B}; -#endif - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - if(tpd_eint_mode) - { - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - } - else - { - msleep(tpd_polling_time); - } - - set_current_state(TASK_RUNNING); - mutex_lock(&i2c_access); - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if (0xAA == doze_buf[2]) - { - GTP_INFO("Forward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xBB == doze_buf[2]) - { - GTP_INFO("Backward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - - } - else if (0xC0 == (doze_buf[2] & 0xC0)) // double click wakeup - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - #endif - if(tpd_halt||(is_reseting == 1) || (load_fw_process == 1)) - { - mutex_unlock(&i2c_access); - GTP_DEBUG("return for interrupt after suspend... "); - continue; - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - switch(rqst_data[2]&0x0F) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - case GTP_RQST_RESET: - GTP_INFO("Request Reset."); - gtp_recovery_reset(i2c_client_point); - goto exit_work_func; - case GTP_RQST_HOTKNOT_CODE: - GTP_INFO("Request HotKnot Code."); - gup_load_hotknot_system(); - goto exit_work_func; - default: - break; - } - } - #endif - - if ((finger & 0x80) == 0) - { - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag) - #endif - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - GTP_ERROR("buffer not ready"); - continue; - } - } - - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag && (finger&0x0F)) - { - id = point_data[GTP_ADDR_LENGTH+1]; - hn_pxy_state = point_data[GTP_ADDR_LENGTH+2]&0x80; - hn_pxy_state_bak = point_data[GTP_ADDR_LENGTH+3]&0x80; - if((32 == id) && (0x80 == hn_pxy_state) && (0x80 == hn_pxy_state_bak)) - { - #ifdef HN_DBLCFM_PAIRED - if(hn_paired_cnt++ < 2) - { - goto exit_work_func; - } - #endif - GTP_DEBUG("HotKnot paired!"); - if(wait_hotknot_state & HN_DEVICE_PAIRED) - { - GTP_DEBUG("INT wakeup HN_DEVICE_PAIRED block polling waiter"); - got_hotknot_state |= HN_DEVICE_PAIRED; - wake_up_interruptible(&bp_waiter); - } - hotknot_paired_flag = 1; - goto exit_work_func; - } - else - { - got_hotknot_state &= (~HN_DEVICE_PAIRED); - hn_paired_cnt = 0; - } - - } - - if(hotknot_paired_flag) - { - ret = gtp_i2c_read(i2c_client_point, hn_state_buf, 6); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - - got_hotknot_state = 0; - - GTP_DEBUG("[0xAB10~0xAB13]=0x%x,0x%x,0x%x,0x%x", hn_state_buf[GTP_ADDR_LENGTH], - hn_state_buf[GTP_ADDR_LENGTH+1], - hn_state_buf[GTP_ADDR_LENGTH+2], - hn_state_buf[GTP_ADDR_LENGTH+3]); - - if(wait_hotknot_state & HN_MASTER_SEND) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH])) - { - GTP_DEBUG("Wakeup HN_MASTER_SEND block polling waiter"); - got_hotknot_state |= HN_MASTER_SEND; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_RECEIVED) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH+1])) - { - GTP_DEBUG("Wakeup HN_SLAVE_RECEIVED block polling waiter:0x%x", hn_state_buf[GTP_ADDR_LENGTH+1]); - got_hotknot_state |= HN_SLAVE_RECEIVED; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH+1]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_MASTER_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Wakeup HN_MASTER_DEPARTED block polling waiter"); - got_hotknot_state |= HN_MASTER_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH+1]) - { - GTP_DEBUG("Wakeup HN_SLAVE_DEPARTED block polling waiter"); - got_hotknot_state |= HN_SLAVE_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - } - - #endif - - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - GTP_ERROR("Bad number of fingers!"); - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - -#if GTP_HAVE_TOUCH_KEY - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - for (i = 0; i < TPD_KEY_COUNT; i++) - { - //input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - if( key_value&(0x01<dev, BTN_TOOL_PEN, 1); - pre_pen = 1; - id = 0; - } - #endif - GTP_DEBUG(" %d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - else if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - input_report_key(tpd->dev, BTN_TOOL_PEN, 0); - pre_pen = 0; - } - #endif - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - else - { - GTP_DEBUG("Additional Eint!"); - } - pre_touch = touch_num; - - if (tpd != NULL && tpd->dev != NULL) - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_INFO("I2C write end_cmd error!"); - } - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_INFO("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_INFO("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_INFO("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH-1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - //memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - //memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); - if (FACTORY_BOOT == get_boot_mode()) - { - TPD_DEBUG("Factory mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_factory, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_factory, 8 * 4); - } - else - { - TPD_DEBUG("Normal mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_normal, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_normal, 8 * 4); - } -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_INFO("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -#if GTP_SLIDE_WAKEUP -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); -#if GTP_DBL_CLK_WAKEUP - i2c_control_buf[2] = 0x09; -#endif - - GTP_DEBUG("entering doze mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("failed to set doze flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_DEBUG("GTP has been working in doze mode!"); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send doze cmd failed."); - return ret; -} - -#else -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif - -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} -#endif - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if (GTP_POWER_CTRL_SLEEP) - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("Esd recovery wakeup."); - return 0; - } -#endif - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 opr_buf[2] = {0}; - - while (retry++ < 10) - { - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); - msleep(5); - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) - { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) - { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(); - } - if (retry >= 10) - { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(); - } - GTP_ERROR("GTP wakeup sleep failed."); - return ret; - } -#endif - while (retry++ < 10) - { - #if GTP_SLIDE_WAKEUP - if (DOZE_WAKEUP != doze_status) - { - GTP_DEBUG("power wakeup, reset guitar"); - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - } - else - { - GTP_DEBUG("slide(double click) wakeup, no reset guitar"); - doze_status = DOZE_DISABLED; - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #else -// if (chip_gt9xxs == 1) -// { -// gtp_reset_guitar(client, 10); -// } -// else -// { -// GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); -// msleep(5); -// } - - //GTP_GPIO_AS_INT(GTP_INT_PORT); - gtp_reset_guitar(client, 20); // for double-system, reset to default system - - return 2; - #endif - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - #if (!GTP_SLIDE_WAKEUP) - if (chip_gt9xxs == 0) - { - gtp_int_sync(25); - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #endif - - return ret; - } - gtp_reset_guitar(client, 20); - } -#endif - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - u8 buf[3] = {0x81, 0xaa, 0}; - -#ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - return ; - } -#endif - -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - - mutex_lock(&i2c_access); - - gtp_i2c_read(i2c_client_point,buf,sizeof(buf)); - if(buf[2] == 0x55) - { - mutex_unlock(&i2c_access); - GTP_INFO("GTP early suspend pair sucess"); - return; - } - tpd_halt = 1; - - mutex_unlock(&i2c_access); -#if GTP_ESD_PROTECT - cancel_delayed_work_sync(>p_esd_check_work); -#endif - -#ifdef GTP_CHARGER_DETECT - cancel_delayed_work_sync(>p_charger_check_work); -#endif - mutex_lock(&i2c_access); - -#if GTP_SLIDE_WAKEUP - ret = gtp_enter_doze(i2c_client_point); -#else - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } -#endif - mutex_unlock(&i2c_access); - - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - printk("mtk-tpd: %s start\n", __FUNCTION__); -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - if(load_fw_process == 0) - { - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - //gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - -#if GTP_SLIDE_WAKEUP - doze_status = DOZE_DISABLED; -#else - mutex_lock(&i2c_access); - tpd_halt = 0; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); -#endif - -#if GTP_ESD_PROTECT - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); -#endif - -#ifdef GTP_CHARGER_DETECT - queue_delayed_work(gtp_charger_check_workqueue, >p_charger_check_work, clk_tick_cnt); -#endif - printk("mtk-tpd: %s end\n", __FUNCTION__); -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -static void tpd_off(void) -{ - -#ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); -#else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); -#endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - GTP_INFO("GTP enter sleep!"); - - tpd_halt = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -} - -static void tpd_on(void) -{ - s32 ret = -1, retry = 0; - - while (retry++ < 5) - { - ret = tpd_power_on(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - } - - ret = gtp_send_cfg(i2c_client_point); - - if (ret > 0) - { - GTP_DEBUG("Wakeup sleep send config success."); - } - } - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - tpd_halt = 0; -} - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#if defined(TPD_I2C_NUMBER) - i2c_register_board_info(TPD_I2C_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_firmware.h deleted file mode 100644 index 21c067ead60..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]9150 -*[VID]1010 -*[GENERATED]2013/11/16 20:59:13 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { -}; - -unsigned char gtp_default_FW_hotknot[] = { -}; - -unsigned char gtp_default_FW_hotknot2[] = { -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_update.c deleted file mode 100644 index 1949bbc0a0d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3986 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.0 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_LINK_LENGTH 0x3000 // 12k -#define FW_APP_CODE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define FIRMWARE_LENGTH (FW_SS51_LENGTH + FW_DSP_LENGTH + FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH + FW_APP_CODE_LENGTH) - -#define FW_HOTKNOT_LENGTH 0x3000 -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#define FAIL 0 -#define SUCCESS 1 - -#define MAIN_SYSTEM_PATH "/sdcard/goodix/_main_.bin" -#define HOTKNOT_SYSTEM_PATH "/sdcard/goodix/_hotknot_.bin" -#define FX_SYSTEM_PATH "/sdcard/goodix/_authorization_.bin" - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -extern struct mutex i2c_access; -u8 searching_file = 0; -u8 got_file_flag = 0; -u8 load_fw_process = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_recovery_main_system(void); -s32 gup_load_main_system(char *filepath); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -char * gup_load_fw_from_file(char *filepath); -s32 gup_load_system(char *firmware, s32 length, u8 need_check); -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_INFO("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("User layer reset GT9XXF."); - return; - } -#endif - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - if ((update_msg.fw_total_len < 36*1024) || (update_msg.fw_total_len > 128*1024)) - { - GTP_ERROR("Invalid firmware length(%d), update aborted!", update_msg.fw_total_len); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_INFO("[check_update_file]default firmware array is INVALID!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware with checksum(0x%04X)", fw_checksum & 0xFFFF); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - goto load_failed; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - goto load_failed; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - goto load_failed; - } - - return SUCCESS; - -load_failed: - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - - if (retry > MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - - burn_length += frame_length; - burn_addr += frame_length; - } - - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_DEBUG("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_boot_isp]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_LINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_LINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_LINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_app_code(struct i2c_client *client) -{ - u8* fw_app_code = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the app code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_fw_app_code]Begin burn app_code firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_app_code]step1:alloc memory"); - while(retry++ < 5) - { - fw_app_code = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_app_code == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_app_code]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_app_code]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_app_code]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_app_code, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_app_code]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_app_code]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_app_code, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_app_code]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_app_code]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_app_code, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_app_code]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_app_code]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_app_code, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_app_code]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - update_msg.fw_burned_len += FW_APP_CODE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_app_code: - kfree(fw_app_code); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8 *)dir); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - GTP_DEBUG("[update_proc]Burned length:%d", update_msg.fw_burned_len); - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 50; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 60; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 80; - ret = gup_burn_fw_app_code(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 90; - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 95; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE && GTP_AUTO_UPDATE_CFG) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("Update config failed!"); - } - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - return FAIL; - } - else - { - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - else - { - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_INFO("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_INFO("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - if (NULL != dir) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; - -download_fail: - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - - -#define BANK_LENGTH (16*1024) -#define FIRMWARE_HEADER_LEN 14 - -static u32 current_system_length = 0; - -char * gup_load_fw_from_file(char *filepath) -{ - struct file *fw_file = NULL; - mm_segment_t old_fs; - long len = 0; - char *buffer = NULL; - - if(filepath == NULL) - { - GTP_ERROR("[Load_firmware]filepath: NULL"); - goto load_firmware_exit; - } - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - fw_file = filp_open(filepath, O_RDONLY, 0); - if (fw_file == NULL || IS_ERR(fw_file)) - { - GTP_ERROR("[Load_firmware]Failed to open: %s", filepath); - goto load_firmware_exit; - } - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - len = fw_file->f_op->llseek(fw_file, 0, SEEK_END); - if(len<1024) - { - GTP_ERROR("[Load_firmware]Firmware is too short: %ld", len); - goto load_firmware_failed; - } - buffer = (char *)kmalloc(sizeof(char) * len, GFP_KERNEL); - if(buffer == NULL) - { - GTP_ERROR("[Load_firmware]Failed to allocate buffer: %ld", len); - goto load_firmware_failed; - } - - memset(buffer, 0, sizeof(char) * len); - - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - fw_file->f_op->read(fw_file, buffer, len, &fw_file->f_pos); - - GTP_ERROR("[Load_firmware]Load from file success: %ld %s", len, filepath); - - -load_firmware_failed: - filp_close(fw_file, NULL); - set_fs(old_fs); - -load_firmware_exit: - return buffer; -} - -s32 gup_check_firmware(char *fw, u32 length) -{ - u32 i = 0; - u32 fw_checksum = 0; - u16 temp; - - for(i=0; i 0) - { - u32 len = length >BANK_LENGTH? BANK_LENGTH:length; - ret = gup_load_by_bank(bank, need_check, &firmware[bank*BANK_LENGTH], len); - if(FAIL == ret) - { - goto gup_load_system_exit; - } - GTP_DEBUG("load bank%d length:%d success.", bank, len); - bank++; - length -= len; - } - - ret = gtp_fw_startup(i2c_client_point); - -gup_load_system_exit: -#if GTP_ESD_PROTECT -#if FLASHLESS_FLASH_WORKROUND - -#else - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif -#endif - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return ret; -} - -s32 gup_load_fx_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_fx_system] Load authorization system."); - - firmware = gtp_default_FW_hotknot2; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( FX_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot2; - GTP_INFO("[load_fx_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_fx_system]firmware's length is invalid."); - goto load_fx_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_fx_system]firmware's checksum is error."); - goto load_fx_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - -load_fx_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} - - -s32 gup_load_hotknot_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - load_fw_process = 1; - /* - if(gtp_chip_type == CHIP_TYPE_GT9) - { - u8 retry = 0; - u8 wr_buf[3] = {0x80, 0x46, 0x22}; - u8 rd_buf[4] = {0x81, 0xA8, 0x00, 0x00}; - while(retry++ < 10) - { - wr_buf[1] = 0x46; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - wr_buf[1] = 0x40; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - msleep(50); - ret = gup_i2c_read(i2c_client_point, rd_buf, sizeof(rd_buf)); - if(ret <= 0) - { - continue; - } - if(rd_buf[GTP_ADDR_LENGTH] == 0xAA && - rd_buf[GTP_ADDR_LENGTH] == rd_buf[GTP_ADDR_LENGTH + 1]) - { - GTP_INFO("[load_hotknot_system]Hotknot switch system success."); - return SUCCESS; - } - } - GTP_ERROR("[load_hotknot_system]Hotknot switch system failed."); - return FAIL; - } - */ - GTP_INFO("[load_hotknot_system] Load hotknot system."); - - firmware = gtp_default_FW_hotknot; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( HOTKNOT_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot; - GTP_INFO("[load_hotknot_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_hotknot_system]firmware's length is invalid."); - goto load_hotknot_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_hotknot_system]firmware's checksum is error."); - goto load_hotknot_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 0); - -load_hotknot_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; - -} - - -s32 gup_recovery_main_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[recovery_main_system] Recovery main system."); - - if(gtp_chip_type == CHIP_TYPE_GT9) - { - gtp_reset_guitar(i2c_client_point,10); - load_fw_process = 0; - return SUCCESS; - } - - firmware = gtp_default_FW_fl; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(MAIN_SYSTEM_PATH); - if(firmware == NULL) - { - firmware = gtp_default_FW_fl; - GTP_INFO("[recovery_main_system]Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - } - if(length > 36*1024 || length < 16*1024 ) - { - GTP_ERROR("[recovery_main_system]firmware's length is invalid."); - goto recovery_main_system_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[recovery_main_system]firmware's checksum is error."); - goto recovery_main_system_exit; - } - - if(current_system_length == 0) - { - current_system_length = length; - } - - GTP_INFO("[recovery_main_system] Recovery length: %d.", current_system_length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], current_system_length, 0); - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -recovery_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - load_fw_process = 0; - return ret; - -} - -s32 gup_load_main_system(char *filepath) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_main_system] Load main system."); - - if(filepath != NULL) - { - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - GTP_INFO("[load_main_system]can not open file: %s", filepath); - goto load_main_system_exit; - } - else - { - is_load_from_file = 1; - } - } - else - { - firmware = gtp_default_FW_fl; - } -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - if(gtp_chip_type == CHIP_TYPE_GT9) - firmware = gtp_default_FW; - else - firmware = gtp_default_FW_fl; - GTP_INFO("[load_main_system]Use default firmware. type:%d", gtp_chip_type); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 36*1024) - { - length = 36*1024; - } - } - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_main_system]firmware's checksum is error."); - goto load_main_system_exit; - } - GTP_INFO("[load_main_system] Firmware length: %d.", length); - - //memcpy(gtp_default_FW_fl, firmware, length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - show_len = 100; - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -load_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/mtk_tpd.c deleted file mode 100644 index 91b7ffb872e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,450 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd.h b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index 6fdcf995a06..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,409 +0,0 @@ -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -struct goodix_ts_data -{ - spinlock_t irq_lock; - struct i2c_client *client; - struct input_dev *input_dev; - struct hrtimer timer; - struct work_struct work; - struct early_suspend early_suspend; - s32 irq_is_disable; - s32 use_irq; - u16 abs_x_max; - u16 abs_y_max; - u8 max_touch_num; - u8 int_trigger_type; - u8 green_wake_mode; - u8 chip_type; - u8 enter_update; - u8 gtp_is_suspend; - u8 gtp_rawdiff_mode; -}; - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; -extern u8 load_fw_process; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern u8 wait_hotknot_state; -extern u8 got_hotknot_state; -extern u8 got_hotknot_extra_state; -extern u8 hotknot_paired_flag; -extern wait_queue_head_t bp_waiter; -extern s32 gup_load_hotknot_system(void); - -extern unsigned char gtp_default_FW[]; -extern unsigned char gtp_default_FW_fl[]; -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 //driver send config to TP on intilization (for no config built in TP flash) -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 1 //turn off power on suspend -#define GTP_AUTO_UPDATE 1 //update FW to TP FLASH -#define GTP_CHANGE_X2Y 0 //set for se1 -#define GTP_HEADER_FW_UPDATE 1 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 1 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF - -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 0 // esd protection with a cycle of 2 seconds -#define GUP_USE_HEADER_FILE 0 -#define GTP_FW_DOWNLOAD 0 //update FW to TP SRAM -//#define GTP_CHARGER_DETECT - -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect -#define GTP_WITH_PEN 0 -#define GTP_SLIDE_WAKEUP 0 -#define GTP_DBL_CLK_WAKEUP 0 // double-click wakup, function together with GTP_SLIDE_WAKEUP -#define HOTKNOT_BLOCK_RW 0 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON //report key as coordinate,Vibration feedback -//#define TPD_WARP_X -//#define TPD_WARP_Y - -#define GTP_DEBUG_ON 0 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) -#define FLASHLESS_FLASH_WORKROUND 0 - -#if GTP_COMPATIBLE_MODE -extern void force_reset_guitar(void); -#endif -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -/*TODO: puts the config info corresponded to your TP here, the following is just -a sample config, send this config should cause the chip cannot work normally*/ -#define CTP_CFG_GROUP1 {\ -0x42,0x20,0x03,0x00,0x05,0x05,0x38,0x06,\ -0x01,0x88,0x28,0x07,0x55,0x37,0x03,0x04,\ -0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x17,\ -0x19,0x20,0x14,0x8C,0x2E,0x0E,0x2B,0x29,\ -0xA0,0x0B,0x00,0x00,0x00,0x99,0x03,0x1D,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1A,0x42,0x94,0xC5,0x02,\ -0x05,0x00,0x00,0x04,0xB4,0x1C,0x00,0x97,\ -0x22,0x00,0x80,0x29,0x00,0x6C,0x32,0x00,\ -0x5D,0x3C,0x00,0x5D,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x28,0x28,0x03,0x06,0x00,\ -0x31,0x85,0x0D,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,\ -0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,\ -0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,\ -0x26,0x28,0x29,0x2A,0x00,0x02,0x04,0x06,\ -0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x60,0x01\ -} - -//default config for K82 - -#define CTP_CFG_GROUP1_CHARGER {\ -} - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2 {\ - } - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2_CHARGER {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3 {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3_CHARGER {\ - } - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - - -//STEP_2(REQUIRED):Change I/O define & I/O operation mode. -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -//STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG -#define GTP_MAX_HEIGHT 800 -#define GTP_MAX_WIDTH 480 -#define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1280 - #define GTP_MAX_WIDTH 800 -#define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 - -#define TPD_POWER_SOURCE_CUSTOM MT65XX_POWER_LDO_VGP6 //MT6323_POWER_LDO_VGP1 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY -#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.1<2014/01/10>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E -#define GTP_REG_HN_STATE 0xAB10 - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_HOTKNOT_CODE 0x20 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -#define HN_DEVICE_PAIRED 0x80 -#define HN_MASTER_DEPARTED 0x40 -#define HN_SLAVE_DEPARTED 0x20 -#define HN_MASTER_SEND 0x10 -#define HN_SLAVE_RECEIVED 0x08 - - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 -#define GTP_REG_REFRESH_RATE 0x8056 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - - -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define TPD_I2C_NUMBER 1 -#define I2C_MASTER_CLOCK 300 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -//#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_NORMAL {0,2559,0,-6557,0,5238784,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_FACTORY {0,2559,0,-6557,0,5238784,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - -//****************************PART4:UPDATE define******************************* -//Error no -#define ERROR_NO_FILE 2 //ENOENT -#define ERROR_FILE_READ 23 //ENFILE -#define ERROR_FILE_TYPE 21 //EISDIR -#define ERROR_GPIO_REQUEST 4 //EINTR -#define ERROR_I2C_TRANSFER 5 //EIO -#define ERROR_NO_RESPONSE 16 //EBUSY -#define ERROR_TIMEOUT 110 //ETIMEDOUT - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/pixi3_10/vibrator/Makefile b/arch/arm/mach-mt8127/pixi3_10/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/pixi3_10/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/cust_acc.c deleted file mode 100644 index 88d72fb66f6..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/cust_alsps.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/dummyds.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.c deleted file mode 100644 index dc223652adc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,348 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - -u32 pinSetIdx = 0;//default main sensor - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - -u32 pinSet[2][8] = { - //for main sensor - {GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - {GPIO_CAMERA_CMRST1_PIN, - GPIO_CAMERA_CMRST1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - - - - - - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx){ - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) { - pinSetIdx = 1; - } - - - //power ON - if (On) { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx==0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5647_RAW, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D2 power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A2 power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } -#if 0 - while(1){ - - mdelay(2000); - PK_DBG("im sleep ...\n"); - } -#endif -#if 1 - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } -#endif - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2659_YUV, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - /* Enlarge the VCAMIO voltage to increase driving capability to avoid unexpected lines shown - VCAMIO 1.8V + 0.02V ~ 0.16V - 4'b1000: 160 mV - 4'b1001: 140 mV - 4'b1010: 120 mV - 4'b1011: 100 mV - 4'b1100: 80 mV - 4'b1101: 60 mV - 4'b1110: 40 mV - 4'b1111: 20 mV - */ - upmu_set_rg_vcam_io_cal(0x08); // 1.96V - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/combo_nand.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/common/combo_nand.h deleted file mode 100644 index 3a7677056c3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/combo_nand.h +++ /dev/null @@ -1,2 +0,0 @@ -#define COMBO_NAND_BLOCK_SIZE 4194304 -#define COMBO_NAND_PAGE_SIZE 16384 diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define.h deleted file mode 100644 index a47debbbbc4..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define.h +++ /dev/null @@ -1,140 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0)//(0xa8) - -#ifdef CONFIG_MTK_EMMC_SUPPORT -#define PART_NUM 25 -#else -extern int get_part_num_nand(); - -#define PART_NUM get_part_num_nand() -#endif - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info PartInfo[PART_MAX_COUNT]; - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define_private.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/pmt.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/common/pmt.h deleted file mode 100644 index 50a1bd4077a..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/common/pmt.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -#define REGION_LOW_PAGE 0x004C4F57 -#define REGION_FULL_PAGE 0x46554C4C -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region *///will be used as download type on L branch. xiaolei - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/board-custom.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/core/board-custom.h deleted file mode 100644 index e18a154ffd2..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -//#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/board.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/core/board.c deleted file mode 100644 index a5abb61b9a4..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mtk_nand_host_hw mtk_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/logger_custom.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/codegen.dws b/arch/arm/mach-mt8127/tcl8127_c_mlc/dct/dct/codegen.dws deleted file mode 100755 index a84fb6d6d9f0b285d8f306e2b9aa5472e60281d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23492 zcmeHP$#Ua15LNcQD*N&Yx!IbkWUd^NwpkWQg`(`tiT{&JJ~_c_@DWW2lsL9zk7j@> zq8q)uZZyC}w52j@?mk#77T=oVGjo*f%gg1Ti+>FZF&gQAfd;)6W2~F_hB{+(Y+S_E zxrF#oO!z?#`yULwUKe$@E{n9wi>mF`MP*a>IOw%~h-U&?2N@2?hP6rC_1=1EfDk`BP_o*bG|+HI zyWZs8<O>@~)*aDB|T4L3Az zKWElR%OS%7*>K@4&1Gue(*%JKG}Ndkh0P8x0@u+-CpU!+FO5gv;pqW)j)|v-PkT_r z0R|~CN%!R;vAyoGxQuHj=D<&li%3&7ppLcZODAM1UnprmMP+uL9r55ZT*0niH}%1t z$Sfr-uVW-qsCRe~xDGZ`nNtoMG>$X-{5{#lt8_VZ%1O{YaBCZ;~!8 zC$>2p0J^UcRNFv?z>xi7s60;&!PZ$7yqVAoR5v11#wn3f4!Rr7Ol?*)Mj<6CqmWV# zx?4yyx6pkO&O8{vrwl+l1fUH3aA7T$>1DUck|zq39t?!+{MkT;#@XnZSWQ1WQH(qK z_?Q@ve0zM#NXKZlh{Ob)!WF+BlRPm&MHc8F!torqk`8k-RJTB?b`HkqP`-LD8Wa2! zF68@g=}S9|bvuL$Tb&np$i%Ow#gjt z3n&Ax?CQaLI zo4>Q*vkJpV2FCpeq1rv6kl>+EIt4W$VZ}Gpod6dBnJajm7kJ3fXhUkHw*STuc|={M zWw*X>{N+BkYeUS}uHd=VfqN6w-^Uzd$C3xdSU154b;c;-+DgSb#5$k?=XQOF`JVQ= z&c9~h`Y?5kfEvrySz$)u|FZg5Zhg0GDxgIOuW8q@ntRH!e4H+72 zc!)rCzZqV?UcOo-o12M$_JSL6NOe5QG*zL59sW9Wz20=I>fpOk)?CK{5ar+z4-GQQ z^)gY6JLX0^AD39Z9qq?xHnjH9c$$a5KPD#V`+}=$03LHEeM}wRCftuP5!0}y%uDl- z`D5CHqJ{QD#I+2(gY`6y^ zCMw~o5cj9Qd*+W_6&)ArIlq3srK_UjVm*ds8WnZ4XfRMaZ=>^uPMEYq@bK8knp<^iF}h#p1$FQ1Ar4AUm8`p$;|&9 z7u80LwbR!|+t%CkrduafzA_^R2s^y*GT)Aac;t(E%9q(hqvu1-az_I!^UV^GGY8O# z#GgTow>kLAfuyJ>^$fXSWy9@i3OVwODd{6WeFm7sw!>SSd&(6Eo-J&>^(!`qd6`0r%@xpf=r}|l3 zkDe?^eDE*L_X+VEEQ<>}vcKiDxWM~0wb{+v#(g7L?@t@=CJ_P0UA@|t`F6edY8Yho zeYL=Qv8t}}2Qq+uB*dI z$Lbdg7Y@kSdS%`wz;%m&uc9`2THoc(Ytf9(C?H-XXW8 z9A~Gef*n+HmU@sf2kRD6({+_!wQdr?0AQL|ZQeLJb7+d|8)eQI=2r%F{{vk%cy<5) diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/Makefile deleted file mode 100755 index 6ec6676af91..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_eeprom.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.c deleted file mode 100644 index faafd31f13b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Driver for EEPROM - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd.h deleted file mode 100644 index b173ba13a12..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/dummy_lens.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter.h deleted file mode 100644 index 5ef80601aee..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 3009 -#define Q_MAX_POS_25 3009 -#define Q_MAX_POS_0 3009 -#define Q_MAX_NEG_10 3009 - -#define Q_MAX_POS_50_H_CURRENT 2975 -#define Q_MAX_POS_25_H_CURRENT 2975 -#define Q_MAX_POS_0_H_CURRENT 2975 -#define Q_MAX_NEG_10_H_CURRENT 2975 - - -/* Discharge Percentage */ -#define OAM_D5 1 // 1 : D5, 0: D2 - - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 60 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 70 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 60 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 5400 //90 * 60 = 90 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter_table.h deleted file mode 100644 index 9574fa0095c..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_battery_meter_table.h +++ /dev/null @@ -1,1068 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_charging.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_charging.h deleted file mode 100644 index fe4f1b2fafd..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_charging.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 50 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 47 -#define MIN_CHARGE_TEMPERATURE 0 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 6 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 150 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -//#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_diso.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pe.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pmic.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/rtc/rtc-mt.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/inc/ssw.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/sim_switch.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/goodix_tool.c deleted file mode 100644 index 7ebef7d3f39..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/goodix_tool.c +++ /dev/null @@ -1,829 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version:1.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#include -#include -#include /*proc*/ - -#include "tpd_custom_gt9xx.h" -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif -extern s32 gup_load_hotknot_system(void); -extern s32 gup_load_fx_system(void); -extern s32 gup_recovery_main_system(void); -extern s32 gup_load_main_system(char *filepath); - -#if 0 -static struct proc_dir_entry *goodix_proc_entry; -#endif - -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; - -#if HOTKNOT_BLOCK_RW -DECLARE_WAIT_QUEUE_HEAD(bp_waiter); -u8 got_hotknot_state = 0; -u8 got_hotknot_extra_state = 0; -u8 wait_hotknot_state = 0; -u8 force_wake_flag = 0; -#endif - -#define HOTKNOTNAME "hotknot" - -static ssize_t hotknot_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t hotknot_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static struct file_operations hotknot_fops = -{ -// .owner = THIS_MODULE, - .read = hotknot_read, - .write = hotknot_write, -}; - -static struct miscdevice hotknot_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = HOTKNOTNAME, - .fops = &hotknot_fops, -}; -static ssize_t goodix_tool_upper_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t goodix_tool_upper_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static const struct file_operations gt_tool_fops = { - .write = goodix_tool_upper_write, - .read = goodix_tool_upper_read, -}; - -static void tool_set_proc_name(char * procname) -{ -#if 1 - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); -#else - sprintf(procname, HOTKNOTNAME); -#endif - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); -#if 0 - goodix_proc_entry = create_proc_entry(procname, 0660, NULL); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - goodix_proc_entry->write_proc = goodix_tool_write; - goodix_proc_entry->read_proc = goodix_tool_read; - } -#else - if(proc_create(procname, 0660, NULL, >_tool_fops)== NULL) - { - GTP_ERROR("create_proc_entry %s failed", procname); - return -1; - } -#endif - -#if 1 // setting by hotknot feature - if (misc_register(&hotknot_misc_device)) - { - printk("mtk_tpd: hotknot_device register failed\n"); - return FAIL; - } -#endif - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[Write]tpd_halt =1 fail!"); - return FAIL; - } - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - GTP_DEBUG("wr :0x%02x.", cmd_head.wr); - /* - GTP_DEBUG("flag:0x%02x.", cmd_head.flag); - GTP_DEBUG("flag addr:0x%02x%02x.", cmd_head.flag_addr[0], cmd_head.flag_addr[1]); - GTP_DEBUG("flag val:0x%02x.", cmd_head.flag_val); - GTP_DEBUG("flag rel:0x%02x.", cmd_head.flag_relation); - GTP_DEBUG("circle :%d.", (s32)cmd_head.circle); - GTP_DEBUG("times :%d.", (s32)cmd_head.times); - GTP_DEBUG("retry :%d.", (s32)cmd_head.retry); - GTP_DEBUG("delay :%d.", (s32)cmd_head.delay); - GTP_DEBUG("data len:%d.", (s32)cmd_head.data_len); - GTP_DEBUG("addr len:%d.", (s32)cmd_head.addr_len); - GTP_DEBUG("addr:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - GTP_DEBUG("len:%d.", (s32)len); - GTP_DEBUG("buf[20]:0x%02x.", buff[CMD_HEAD_LENGTH]); - */ - - if (1 == cmd_head.wr) - { - // copy_from_user(&cmd_head.data[cmd_head.addr_len], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return FAIL; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (3 == cmd_head.wr) //Write ic type - { - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - return CMD_HEAD_LENGTH; - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - return CMD_HEAD_LENGTH; - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - - return CMD_HEAD_LENGTH; - } - -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return FAIL; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - ret = copy_from_user(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - GTP_DEBUG("update firmware, filename: %s", cmd_head.data); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return FAIL; - } - } - -#endif - else if (19 == cmd_head.wr) //load subsystem - { - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(0 == cmd_head.data[0]) - { - if (FAIL == gup_load_hotknot_system()) - { - return FAIL; - } - } - else if(1 == cmd_head.data[0]) - { - if (FAIL == gup_load_fx_system()) - { - return FAIL; - } - } - else if(2 == cmd_head.data[0]) - { - if (FAIL == gup_recovery_main_system()) - { - return FAIL; - } - } - else if(3 == cmd_head.data[0]) - { - if (FAIL == gup_load_main_system(NULL)) - { - return FAIL; - } - } - } -#if HOTKNOT_BLOCK_RW - else if (21 == cmd_head.wr) - { - u16 wait_hotknot_timeout = 0; - u8 rqst_hotknot_state; - - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], - &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - rqst_hotknot_state = cmd_head.data[GTP_ADDR_LENGTH]; - wait_hotknot_state |= rqst_hotknot_state; - wait_hotknot_timeout = (cmd_head.data[GTP_ADDR_LENGTH + 1]<<8) + - cmd_head.data[GTP_ADDR_LENGTH + 2]; - GTP_DEBUG("Goodix tool received wait polling state:0x%x,timeout:%d, all wait state:0x%x", - rqst_hotknot_state, wait_hotknot_timeout, wait_hotknot_state); - got_hotknot_state &= (~rqst_hotknot_state); - //got_hotknot_extra_state = 0; - switch(rqst_hotknot_state) - { - set_current_state(TASK_INTERRUPTIBLE); - case HN_DEVICE_PAIRED: - hotknot_paired_flag = 0; - wait_event_interruptible(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waiter failed.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_SEND: - case HN_SLAVE_RECEIVED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)) - { - return got_hotknot_extra_state; - } - else - { - GTP_ERROR("Wait 0x%x block polling waiter timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_DEPARTED: - case HN_SLAVE_DEPARTED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waitor timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - default: - GTP_ERROR("Invalid rqst_hotknot_state in goodix_tool."); - break; - } - force_wake_flag = 0; - } - else if(23 == cmd_head.wr) - { - GTP_DEBUG("Manual wakeup all block polling waiter!"); - got_hotknot_state = 0; - wait_hotknot_state = 0; - force_wake_flag = 1; - hotknot_paired_flag = 0; - wake_up_interruptible(&bp_waiter); - } -#endif - return CMD_HEAD_LENGTH; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data) -{ - u64 ret = 0; - - GTP_DEBUG_FUNC(); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[READ]tpd_halt =1 fail!"); - return FAIL; - } - if (cmd_head.wr % 2) - { - GTP_ERROR("[READ] invaild operator fail!"); - return FAIL; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= DATA_LENGTH; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return FAIL; - } - - ret = copy_to_user(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - } - else if (2 == cmd_head.wr) - { - // memcpy(page, "gt8", cmd_head.data_len); - // memcpy(page, "GT818", 5); - // page[5] = 0; - - GTP_DEBUG("Return ic type:%s len:%d.", page, (s32)cmd_head.data_len); - return cmd_head.data_len; - //return sizeof(IC_TYPE_NAME); - } - else if (4 == cmd_head.wr) - { - page[0] = show_len >> 8; - page[1] = show_len & 0xff; - page[2] = total_len >> 8; - page[3] = total_len & 0xff; - - return cmd_head.data_len; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - // memcpy(page, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - s32 tmp_len; - tmp_len = strlen(GTP_DRIVER_VERSION); - ret = copy_to_user(page, GTP_DRIVER_VERSION, tmp_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - page[tmp_len] = 0; - } - - return cmd_head.data_len; -} - - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_driver.c deleted file mode 100644 index cde964d3ccc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,3350 +0,0 @@ -#include "tpd.h" -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#include "cust_gpio_usage.h" - -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif -#include /*proc*/ - -extern struct tpd_device *tpd; -#ifdef VELOCITY_CUSTOM -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -#endif -static int tpd_flag = 0; -int tpd_halt = 0; -static int tpd_eint_mode=1; -static struct task_struct *thread = NULL; -static int tpd_polling_time=50; -extern u8 load_fw_process; - -static DECLARE_WAIT_QUEUE_HEAD(waiter); -DEFINE_MUTEX(i2c_access); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = TPD_KEYS; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -struct touch_vitual_key_map_t -{ - int point_x; - int point_y; -}; -static struct touch_vitual_key_map_t touch_key_point_maping_array[]=GTP_KEY_MAP_ARRAY; -#endif - -#if GTP_SLIDE_WAKEUP -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); -#endif - -#if GTP_CHARGER_SWITCH - extern kal_bool upmu_is_chr_det(void); - static void gtp_charger_switch(s32 dir_update); -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -//static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local_normal[8] = TPD_CALIBRATION_MATRIX_ROTATION_NORMAL; -static int tpd_def_calmat_local_factory[8] = TPD_CALIBRATION_MATRIX_ROTATION_FACTORY; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -static void tpd_on(void); -static void tpd_off(void); - -#ifdef GTP_CHARGER_DETECT -extern bool upmu_get_pchr_chrdet(void); -#define TPD_CHARGER_CHECK_CIRCLE 50 -static struct delayed_work gtp_charger_check_work; -static struct workqueue_struct *gtp_charger_check_workqueue = NULL; -static void gtp_charger_check_func(struct work_struct *); -static u8 gtp_charger_mode = 0; -#endif - - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -u8 esd_running = 0; -spinlock_t esd_lock; -#endif - -#if HOTKNOT_BLOCK_RW -u8 hotknot_paired_flag = 0; -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -#ifndef GTP_REG_REFRESH_RATE -#define GTP_REG_REFRESH_RATE 0x8056 -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#ifdef GTP_CHARGER_DETECT -static u8 config_charger[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#endif -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; -static u8 chip_gt9xxs = 0; // true if chip type is gt9xxs,like gt915s - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -u8 gtp_ref_retries = 0; -u8 gtp_clk_retries = 0; -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 gtp_clk_buf[6]; -u8 rqst_processing = 0; - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern s32 gup_load_main_system(char *filepath); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -u8 is_reseting = 0; -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -static struct proc_dir_entry *gt91xx_config_proc = NULL; - -#ifdef TPD_REFRESH_RATE -/******************************************************* -Function: - Write refresh rate - -Input: - rate: refresh rate N (Duration=5+N ms, N=0~15) - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static u8 gtp_set_refresh_rate(u8 rate) -{ - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff, rate}; - - if (rate > 0xf) - { - GTP_ERROR("Refresh rate is over range (%d)", rate); - return FAIL; - } - - GTP_INFO("Refresh rate change to %d", rate); - return gtp_i2c_write(i2c_client_point, buf, sizeof(buf)); -} - -/******************************************************* -Function: - Get refresh rate - -Output: - Refresh rate or error code -*******************************************************/ -static u8 gtp_get_refresh_rate(void) -{ - int ret; - - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff}; - ret = gtp_i2c_read(i2c_client_point, buf, sizeof(buf)); - if (ret < 0) - return ret; - - GTP_INFO("Refresh rate is %d", buf[GTP_ADDR_LENGTH]); - return buf[GTP_ADDR_LENGTH]; -} - -//============================================================= -static ssize_t show_refresh_rate(struct device *dev,struct device_attribute *attr, char *buf) -{ - int ret = gtp_get_refresh_rate(); - if (ret < 0) - return 0; - else - return sprintf(buf, "%d\n", ret); -} -static ssize_t store_refresh_rate(struct device *dev,struct device_attribute *attr, const char *buf, size_t size) -{ - //u32 rate = 0; - gtp_set_refresh_rate(simple_strtoul(buf, NULL, 16)); - return size; -} -static DEVICE_ATTR(tpd_refresh_rate, 0664, show_refresh_rate, store_refresh_rate); - -static struct device_attribute *gt9xx_attrs[] = -{ - &dev_attr_tpd_refresh_rate, -}; -#endif -//============================================================= - - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - -static int gt91xx_config_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i, len, err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - - ptr = page; - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - /* Touch PID & VID */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== GT9XX Version ID ====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_VERSION, temp_data, 6); - ptr += sprintf(ptr, "Chip PID: %c%c%c VID: 0x%02X%02X\n", temp_data[0], temp_data[1], temp_data[2], temp_data[5], temp_data[4]); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW_fl[12], gtp_default_FW_fl[13]); - } - else - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); - } -#else - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); -#endif - i2c_read_bytes(i2c_client_point, 0x41E4, temp_data, 1); - ptr += sprintf(ptr, "Boot status 0x%X\n", temp_data[0]); - - /* Touch Status and Clock Gate */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== Touch Status and Clock Gate ====\n"); - ptr += sprintf(ptr, "status: 1: on, 0 :off\n"); - ptr += sprintf(ptr, "status:%d\n", (tpd_halt+1)&0x1); - - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; - - //return (ptr - page); -} - -static int gt91xx_config_write_proc(struct file *file, const char *buffer, size_t count, loff_t *ppos) -{ - s32 ret = 0; - char temp[25] = {0}; // for store special format cmd - char mode_str[15] = {0}; - unsigned int mode; - u8 buf[1]; - - GTP_DEBUG("write count %ld\n", (unsigned long)count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%ld]", GTP_CONFIG_MAX_LENGTH, (unsigned long)count); - return -EFAULT; - } - - /**********************************************/ - /* for store special format cmd */ - if (copy_from_user(temp, buffer, sizeof(temp))) - { - GTP_ERROR("copy from user fail 2"); - return -EFAULT; - } - sscanf(temp, "%s %d", (char *)&mode_str, &mode); - - /***********POLLING/EINT MODE switch****************/ - if(strcmp(mode_str, "polling") == 0) - { - if(mode>=10&&mode<=200) - { - GTP_INFO("Switch to polling mode, polling time is %d",mode); - tpd_eint_mode=0; - tpd_polling_time=mode; - tpd_flag = 1; - wake_up_interruptible(&waiter); - } - else - { - GTP_INFO("Wrong polling time, please set between 10~200ms"); - } - return count; - } - if(strcmp(mode_str, "eint") == 0) - { - GTP_INFO("Switch to eint mode"); - tpd_eint_mode=1; - return count; - } - /**********************************************/ - if(strcmp(mode_str, "switch") == 0) - { - if(mode == 0)// turn off - tpd_off(); - else if(mode == 1)//turn on - tpd_on(); - else - GTP_ERROR("error mode :%d", mode); - return count; - } - //force clear config - if(strcmp(mode_str, "clear_config") == 0) - { - GTP_INFO("Force clear config"); - buf[0] = 0x10; - ret = i2c_write_bytes(i2c_client_point, GTP_REG_SLEEP, buf, 1); - return count; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - /***********clk operate reseved****************/ - /**********************************************/ - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_DEBUG("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - if (buf[5] == 'S' || buf[5] == 's') - { - chip_gt9xxs = 1; - } - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing; - } - else - #endif - { - gtp_get_info(client); - } - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(100); // for dbl-system -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = (int)gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return ret; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - } - gtp_chip_type = CHIP_TYPE_GT9; // for test - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("[gtp_bak_ref_proc]Alloc memory for ref failed.use default ref"); - return FAIL; - } - memset(refp, 0, ref_len); - if(gtp_ref_retries >= GTP_CHK_FS_MNT_MAX) - { - for (j = 0; j < ref_grps; ++j) - { - refp[ref_seg_len + j * ref_seg_len -1] = 0x01; - } - ret = i2c_write_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Write ref i2c error."); - ret = FAIL; - } - - GTP_ERROR("[gtp_bak_ref_proc]Bak file or path is not exist,send default ref."); - ret = SUCCESS; - goto exit_ref_proc; - } - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0660); - if (IS_ERR(flp)) - { - GTP_ERROR("[gtp_bak_ref_proc]Ref File not found!Creat ref file."); - //flp->f_op->llseek(flp, 0, SEEK_SET); - //flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - gtp_ref_retries++; - ret = FAIL; - goto exit_ref_proc; - } - else if(GTP_BAK_REF_SEND == mode) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref file failed."); - memset(refp, 0, ref_len); - } - } - - if(GTP_BAK_REF_STORE == mode) - { - ret = i2c_read_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref i2c error."); - ret = FAIL; - goto exit_ref_proc; - } - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - else - { - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; i 120) || - (gtp_clk_buf[i] != gtp_clk_buf[0])) - { - break; - } - clk_chksum += gtp_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_INFO("Clk ram legality check success"); - return SUCCESS; - } - GTP_ERROR("main clock freq in clock buf is wrong"); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - struct file *flp = NULL; - - //check clk legality - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - goto send_main_clk; - } - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("[gtp_main_clk_proc]cal clk result is illegitimate"); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - - if (IS_ERR(flp)) - { - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - } - else - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - goto exit_clk_proc; - } - - ret = SUCCESS; - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -#endif -//************* For GT9XXF End **********************// - -static const struct file_operations gt_upgrade_proc_fops = { - .write = gt91xx_config_write_proc, - .read = gt91xx_config_read_proc -}; - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - -//#ifdef VELOCITY_CUSTOM - #if 0 - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#ifdef VELOCITY_CUSTOM - tpd_v_magnify_x = TPD_VELOCITY_CUSTOM_X; - tpd_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; - -#endif - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0660, NULL, >_upgrade_proc_fops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_INFO(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif -#if GTP_SLIDE_WAKEUP - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); -#endif - -#if GTP_WITH_PEN - // pen support - __set_bit(BTN_TOOL_PEN, tpd->dev->keybit); - __set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); - //__set_bit(INPUT_PROP_POINTER, tpd->dev->propbit); // 20130722 -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; - - return 0; -} - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void) -{ - s32 i = 0; - s32 ret = 0; - //static u8 is_reseting = 0; - - if(is_reseting || (load_fw_process == 1)) - { - return; - } - GTP_INFO("force_reset_guitar"); - is_reseting = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - for (i = 0; i < 5; i++) - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - //check code ram - ret = gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - } - else - #endif - { - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - is_reseting = 0; - -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[2] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - if(1 == load_fw_process) - { - GTP_INFO("Load FW process is runing"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - memset(esd_buf, 0x01, sizeof(esd_buf)); - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, sizeof(esd_buf)); - msleep(50); - force_reset_guitar(); - } - } - -#if FLASHLESS_FLASH_WORKROUND - { - u8 versionBuff[6]; - int retry = 0; - u8 temp = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - //match pid - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - temp = versionBuff[5]; - versionBuff[5] = versionBuff[4]; - versionBuff[4] = temp; - //match vid - if( memcmp(&versionBuff[4], >p_default_FW_fl[12], 2) !=0 ) - { - continue; - } - break; - } - if(retry>=3) - { - GTP_INFO("IC version error., force reset!"); - force_reset_guitar(); - } - } -#endif - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif -static int tpd_history_x=0, tpd_history_y=0; -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(x, y, x, y, id, 1); - tpd_history_x=x; - tpd_history_y=y; - - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 1, x+y); -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - //input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); - input_report_key(tpd->dev, BTN_TOUCH, 0); - //input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(tpd_history_x, tpd_history_y, tpd_history_x, tpd_history_y, id, 0); - tpd_history_x=0; - tpd_history_y=0; - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 0, x+y); - -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - - chr_status = upmu_is_chr_det(); - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -/*Coordination mapping*/ -static void tpd_calibrate_driver(int *x, int *y) -{ - int tx; - - GTP_DEBUG("Call tpd_calibrate of this driver ..\n"); - - tx = ( (tpd_def_calmat[0] * (*x)) + (tpd_def_calmat[1] * (*y)) + (tpd_def_calmat[2]) ) >> 12; - *y = ( (tpd_def_calmat[3] * (*x)) + (tpd_def_calmat[4] * (*y)) + (tpd_def_calmat[5]) ) >> 12; - *x = tx; -} - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#if HOTKNOT_BLOCK_RW - u8 hn_pxy_state = 0; - u8 hn_pxy_state_bak = 0; - u8 hn_paired_cnt = 0; - u8 hn_state_buf[10] = {(u8)(GTP_REG_HN_STATE>> 8), (u8)(GTP_REG_HN_STATE & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - -#if GTP_SLIDE_WAKEUP - u8 doze_buf[3] = {0x81, 0x4B}; -#endif - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - if(tpd_eint_mode) - { - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - } - else - { - msleep(tpd_polling_time); - } - - set_current_state(TASK_RUNNING); - mutex_lock(&i2c_access); - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if (0xAA == doze_buf[2]) - { - GTP_INFO("Forward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xBB == doze_buf[2]) - { - GTP_INFO("Backward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - - } - else if (0xC0 == (doze_buf[2] & 0xC0)) // double click wakeup - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - #endif - if(tpd_halt||(is_reseting == 1) || (load_fw_process == 1)) - { - mutex_unlock(&i2c_access); - GTP_DEBUG("return for interrupt after suspend... "); - continue; - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - switch(rqst_data[2]&0x0F) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - case GTP_RQST_RESET: - GTP_INFO("Request Reset."); - gtp_recovery_reset(i2c_client_point); - goto exit_work_func; - case GTP_RQST_HOTKNOT_CODE: - GTP_INFO("Request HotKnot Code."); - gup_load_hotknot_system(); - goto exit_work_func; - default: - break; - } - } - #endif - - if ((finger & 0x80) == 0) - { - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag) - #endif - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - GTP_ERROR("buffer not ready"); - continue; - } - } - - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag && (finger&0x0F)) - { - id = point_data[GTP_ADDR_LENGTH+1]; - hn_pxy_state = point_data[GTP_ADDR_LENGTH+2]&0x80; - hn_pxy_state_bak = point_data[GTP_ADDR_LENGTH+3]&0x80; - if((32 == id) && (0x80 == hn_pxy_state) && (0x80 == hn_pxy_state_bak)) - { - #ifdef HN_DBLCFM_PAIRED - if(hn_paired_cnt++ < 2) - { - goto exit_work_func; - } - #endif - GTP_DEBUG("HotKnot paired!"); - if(wait_hotknot_state & HN_DEVICE_PAIRED) - { - GTP_DEBUG("INT wakeup HN_DEVICE_PAIRED block polling waiter"); - got_hotknot_state |= HN_DEVICE_PAIRED; - wake_up_interruptible(&bp_waiter); - } - hotknot_paired_flag = 1; - goto exit_work_func; - } - else - { - got_hotknot_state &= (~HN_DEVICE_PAIRED); - hn_paired_cnt = 0; - } - - } - - if(hotknot_paired_flag) - { - ret = gtp_i2c_read(i2c_client_point, hn_state_buf, 6); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - - got_hotknot_state = 0; - - GTP_DEBUG("[0xAB10~0xAB13]=0x%x,0x%x,0x%x,0x%x", hn_state_buf[GTP_ADDR_LENGTH], - hn_state_buf[GTP_ADDR_LENGTH+1], - hn_state_buf[GTP_ADDR_LENGTH+2], - hn_state_buf[GTP_ADDR_LENGTH+3]); - - if(wait_hotknot_state & HN_MASTER_SEND) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH])) - { - GTP_DEBUG("Wakeup HN_MASTER_SEND block polling waiter"); - got_hotknot_state |= HN_MASTER_SEND; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_RECEIVED) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH+1])) - { - GTP_DEBUG("Wakeup HN_SLAVE_RECEIVED block polling waiter:0x%x", hn_state_buf[GTP_ADDR_LENGTH+1]); - got_hotknot_state |= HN_SLAVE_RECEIVED; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH+1]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_MASTER_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Wakeup HN_MASTER_DEPARTED block polling waiter"); - got_hotknot_state |= HN_MASTER_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH+1]) - { - GTP_DEBUG("Wakeup HN_SLAVE_DEPARTED block polling waiter"); - got_hotknot_state |= HN_SLAVE_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - } - - #endif - - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - GTP_ERROR("Bad number of fingers!"); - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - -#if GTP_HAVE_TOUCH_KEY - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - for (i = 0; i < TPD_KEY_COUNT; i++) - { - //input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - if( key_value&(0x01<dev, BTN_TOOL_PEN, 1); - pre_pen = 1; - id = 0; - } - #endif - GTP_DEBUG(" %d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - else if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - input_report_key(tpd->dev, BTN_TOOL_PEN, 0); - pre_pen = 0; - } - #endif - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - else - { - GTP_DEBUG("Additional Eint!"); - } - pre_touch = touch_num; - - if (tpd != NULL && tpd->dev != NULL) - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_INFO("I2C write end_cmd error!"); - } - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_INFO("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_INFO("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_INFO("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH-1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - //memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - //memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); - if (FACTORY_BOOT == get_boot_mode()) - { - TPD_DEBUG("Factory mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_factory, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_factory, 8 * 4); - } - else - { - TPD_DEBUG("Normal mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_normal, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_normal, 8 * 4); - } -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_INFO("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -#if GTP_SLIDE_WAKEUP -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); -#if GTP_DBL_CLK_WAKEUP - i2c_control_buf[2] = 0x09; -#endif - - GTP_DEBUG("entering doze mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("failed to set doze flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_DEBUG("GTP has been working in doze mode!"); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send doze cmd failed."); - return ret; -} - -#else -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif - -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} -#endif - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if (GTP_POWER_CTRL_SLEEP) - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("Esd recovery wakeup."); - return 0; - } -#endif - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 opr_buf[2] = {0}; - - while (retry++ < 10) - { - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); - msleep(5); - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) - { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) - { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(); - } - if (retry >= 10) - { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(); - } - GTP_ERROR("GTP wakeup sleep failed."); - return ret; - } -#endif - while (retry++ < 10) - { - #if GTP_SLIDE_WAKEUP - if (DOZE_WAKEUP != doze_status) - { - GTP_DEBUG("power wakeup, reset guitar"); - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - } - else - { - GTP_DEBUG("slide(double click) wakeup, no reset guitar"); - doze_status = DOZE_DISABLED; - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #else -// if (chip_gt9xxs == 1) -// { -// gtp_reset_guitar(client, 10); -// } -// else -// { -// GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); -// msleep(5); -// } - - //GTP_GPIO_AS_INT(GTP_INT_PORT); - gtp_reset_guitar(client, 20); // for double-system, reset to default system - - return 2; - #endif - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - #if (!GTP_SLIDE_WAKEUP) - if (chip_gt9xxs == 0) - { - gtp_int_sync(25); - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #endif - - return ret; - } - gtp_reset_guitar(client, 20); - } -#endif - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - u8 buf[3] = {0x81, 0xaa, 0}; - -#ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - return ; - } -#endif - -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - - mutex_lock(&i2c_access); - - gtp_i2c_read(i2c_client_point,buf,sizeof(buf)); - if(buf[2] == 0x55) - { - mutex_unlock(&i2c_access); - GTP_INFO("GTP early suspend pair sucess"); - return; - } - tpd_halt = 1; - - mutex_unlock(&i2c_access); -#if GTP_ESD_PROTECT - cancel_delayed_work_sync(>p_esd_check_work); -#endif - -#ifdef GTP_CHARGER_DETECT - cancel_delayed_work_sync(>p_charger_check_work); -#endif - mutex_lock(&i2c_access); - -#if GTP_SLIDE_WAKEUP - ret = gtp_enter_doze(i2c_client_point); -#else - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } -#endif - mutex_unlock(&i2c_access); - - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - printk("mtk-tpd: %s start\n", __FUNCTION__); -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - if(load_fw_process == 0) - { - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - //gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - -#if GTP_SLIDE_WAKEUP - doze_status = DOZE_DISABLED; -#else - mutex_lock(&i2c_access); - tpd_halt = 0; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); -#endif - -#if GTP_ESD_PROTECT - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); -#endif - -#ifdef GTP_CHARGER_DETECT - queue_delayed_work(gtp_charger_check_workqueue, >p_charger_check_work, clk_tick_cnt); -#endif - printk("mtk-tpd: %s end\n", __FUNCTION__); -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -static void tpd_off(void) -{ - -#ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); -#else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); -#endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - GTP_INFO("GTP enter sleep!"); - - tpd_halt = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -} - -static void tpd_on(void) -{ - s32 ret = -1, retry = 0; - - while (retry++ < 5) - { - ret = tpd_power_on(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - } - - ret = gtp_send_cfg(i2c_client_point); - - if (ret > 0) - { - GTP_DEBUG("Wakeup sleep send config success."); - } - } - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - tpd_halt = 0; -} - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#if defined(TPD_I2C_NUMBER) - i2c_register_board_info(TPD_I2C_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_firmware.h deleted file mode 100644 index 21c067ead60..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]9150 -*[VID]1010 -*[GENERATED]2013/11/16 20:59:13 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { -}; - -unsigned char gtp_default_FW_hotknot[] = { -}; - -unsigned char gtp_default_FW_hotknot2[] = { -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_update.c deleted file mode 100644 index 1949bbc0a0d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3986 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.0 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_LINK_LENGTH 0x3000 // 12k -#define FW_APP_CODE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define FIRMWARE_LENGTH (FW_SS51_LENGTH + FW_DSP_LENGTH + FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH + FW_APP_CODE_LENGTH) - -#define FW_HOTKNOT_LENGTH 0x3000 -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#define FAIL 0 -#define SUCCESS 1 - -#define MAIN_SYSTEM_PATH "/sdcard/goodix/_main_.bin" -#define HOTKNOT_SYSTEM_PATH "/sdcard/goodix/_hotknot_.bin" -#define FX_SYSTEM_PATH "/sdcard/goodix/_authorization_.bin" - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -extern struct mutex i2c_access; -u8 searching_file = 0; -u8 got_file_flag = 0; -u8 load_fw_process = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_recovery_main_system(void); -s32 gup_load_main_system(char *filepath); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -char * gup_load_fw_from_file(char *filepath); -s32 gup_load_system(char *firmware, s32 length, u8 need_check); -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_INFO("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("User layer reset GT9XXF."); - return; - } -#endif - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - if ((update_msg.fw_total_len < 36*1024) || (update_msg.fw_total_len > 128*1024)) - { - GTP_ERROR("Invalid firmware length(%d), update aborted!", update_msg.fw_total_len); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_INFO("[check_update_file]default firmware array is INVALID!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware with checksum(0x%04X)", fw_checksum & 0xFFFF); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - goto load_failed; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - goto load_failed; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - goto load_failed; - } - - return SUCCESS; - -load_failed: - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - - if (retry > MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - - burn_length += frame_length; - burn_addr += frame_length; - } - - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_DEBUG("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_boot_isp]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_LINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_LINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_LINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_app_code(struct i2c_client *client) -{ - u8* fw_app_code = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the app code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_fw_app_code]Begin burn app_code firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_app_code]step1:alloc memory"); - while(retry++ < 5) - { - fw_app_code = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_app_code == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_app_code]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_app_code]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_app_code]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_app_code, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_app_code]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_app_code]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_app_code, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_app_code]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_app_code]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_app_code, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_app_code]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_app_code]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_app_code, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_app_code]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - update_msg.fw_burned_len += FW_APP_CODE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_app_code: - kfree(fw_app_code); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8 *)dir); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - GTP_DEBUG("[update_proc]Burned length:%d", update_msg.fw_burned_len); - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 50; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 60; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 80; - ret = gup_burn_fw_app_code(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 90; - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 95; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE && GTP_AUTO_UPDATE_CFG) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("Update config failed!"); - } - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - return FAIL; - } - else - { - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - else - { - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_INFO("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_INFO("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - if (NULL != dir) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; - -download_fail: - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - - -#define BANK_LENGTH (16*1024) -#define FIRMWARE_HEADER_LEN 14 - -static u32 current_system_length = 0; - -char * gup_load_fw_from_file(char *filepath) -{ - struct file *fw_file = NULL; - mm_segment_t old_fs; - long len = 0; - char *buffer = NULL; - - if(filepath == NULL) - { - GTP_ERROR("[Load_firmware]filepath: NULL"); - goto load_firmware_exit; - } - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - fw_file = filp_open(filepath, O_RDONLY, 0); - if (fw_file == NULL || IS_ERR(fw_file)) - { - GTP_ERROR("[Load_firmware]Failed to open: %s", filepath); - goto load_firmware_exit; - } - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - len = fw_file->f_op->llseek(fw_file, 0, SEEK_END); - if(len<1024) - { - GTP_ERROR("[Load_firmware]Firmware is too short: %ld", len); - goto load_firmware_failed; - } - buffer = (char *)kmalloc(sizeof(char) * len, GFP_KERNEL); - if(buffer == NULL) - { - GTP_ERROR("[Load_firmware]Failed to allocate buffer: %ld", len); - goto load_firmware_failed; - } - - memset(buffer, 0, sizeof(char) * len); - - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - fw_file->f_op->read(fw_file, buffer, len, &fw_file->f_pos); - - GTP_ERROR("[Load_firmware]Load from file success: %ld %s", len, filepath); - - -load_firmware_failed: - filp_close(fw_file, NULL); - set_fs(old_fs); - -load_firmware_exit: - return buffer; -} - -s32 gup_check_firmware(char *fw, u32 length) -{ - u32 i = 0; - u32 fw_checksum = 0; - u16 temp; - - for(i=0; i 0) - { - u32 len = length >BANK_LENGTH? BANK_LENGTH:length; - ret = gup_load_by_bank(bank, need_check, &firmware[bank*BANK_LENGTH], len); - if(FAIL == ret) - { - goto gup_load_system_exit; - } - GTP_DEBUG("load bank%d length:%d success.", bank, len); - bank++; - length -= len; - } - - ret = gtp_fw_startup(i2c_client_point); - -gup_load_system_exit: -#if GTP_ESD_PROTECT -#if FLASHLESS_FLASH_WORKROUND - -#else - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif -#endif - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return ret; -} - -s32 gup_load_fx_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_fx_system] Load authorization system."); - - firmware = gtp_default_FW_hotknot2; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( FX_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot2; - GTP_INFO("[load_fx_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_fx_system]firmware's length is invalid."); - goto load_fx_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_fx_system]firmware's checksum is error."); - goto load_fx_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - -load_fx_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} - - -s32 gup_load_hotknot_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - load_fw_process = 1; - /* - if(gtp_chip_type == CHIP_TYPE_GT9) - { - u8 retry = 0; - u8 wr_buf[3] = {0x80, 0x46, 0x22}; - u8 rd_buf[4] = {0x81, 0xA8, 0x00, 0x00}; - while(retry++ < 10) - { - wr_buf[1] = 0x46; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - wr_buf[1] = 0x40; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - msleep(50); - ret = gup_i2c_read(i2c_client_point, rd_buf, sizeof(rd_buf)); - if(ret <= 0) - { - continue; - } - if(rd_buf[GTP_ADDR_LENGTH] == 0xAA && - rd_buf[GTP_ADDR_LENGTH] == rd_buf[GTP_ADDR_LENGTH + 1]) - { - GTP_INFO("[load_hotknot_system]Hotknot switch system success."); - return SUCCESS; - } - } - GTP_ERROR("[load_hotknot_system]Hotknot switch system failed."); - return FAIL; - } - */ - GTP_INFO("[load_hotknot_system] Load hotknot system."); - - firmware = gtp_default_FW_hotknot; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( HOTKNOT_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot; - GTP_INFO("[load_hotknot_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_hotknot_system]firmware's length is invalid."); - goto load_hotknot_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_hotknot_system]firmware's checksum is error."); - goto load_hotknot_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 0); - -load_hotknot_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; - -} - - -s32 gup_recovery_main_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[recovery_main_system] Recovery main system."); - - if(gtp_chip_type == CHIP_TYPE_GT9) - { - gtp_reset_guitar(i2c_client_point,10); - load_fw_process = 0; - return SUCCESS; - } - - firmware = gtp_default_FW_fl; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(MAIN_SYSTEM_PATH); - if(firmware == NULL) - { - firmware = gtp_default_FW_fl; - GTP_INFO("[recovery_main_system]Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - } - if(length > 36*1024 || length < 16*1024 ) - { - GTP_ERROR("[recovery_main_system]firmware's length is invalid."); - goto recovery_main_system_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[recovery_main_system]firmware's checksum is error."); - goto recovery_main_system_exit; - } - - if(current_system_length == 0) - { - current_system_length = length; - } - - GTP_INFO("[recovery_main_system] Recovery length: %d.", current_system_length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], current_system_length, 0); - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -recovery_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - load_fw_process = 0; - return ret; - -} - -s32 gup_load_main_system(char *filepath) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_main_system] Load main system."); - - if(filepath != NULL) - { - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - GTP_INFO("[load_main_system]can not open file: %s", filepath); - goto load_main_system_exit; - } - else - { - is_load_from_file = 1; - } - } - else - { - firmware = gtp_default_FW_fl; - } -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - if(gtp_chip_type == CHIP_TYPE_GT9) - firmware = gtp_default_FW; - else - firmware = gtp_default_FW_fl; - GTP_INFO("[load_main_system]Use default firmware. type:%d", gtp_chip_type); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 36*1024) - { - length = 36*1024; - } - } - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_main_system]firmware's checksum is error."); - goto load_main_system_exit; - } - GTP_INFO("[load_main_system] Firmware length: %d.", length); - - //memcpy(gtp_default_FW_fl, firmware, length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - show_len = 100; - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -load_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/mtk_tpd.c deleted file mode 100644 index 91b7ffb872e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,450 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index 4749c861fc5..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,409 +0,0 @@ -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -struct goodix_ts_data -{ - spinlock_t irq_lock; - struct i2c_client *client; - struct input_dev *input_dev; - struct hrtimer timer; - struct work_struct work; - struct early_suspend early_suspend; - s32 irq_is_disable; - s32 use_irq; - u16 abs_x_max; - u16 abs_y_max; - u8 max_touch_num; - u8 int_trigger_type; - u8 green_wake_mode; - u8 chip_type; - u8 enter_update; - u8 gtp_is_suspend; - u8 gtp_rawdiff_mode; -}; - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; -extern u8 load_fw_process; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern u8 wait_hotknot_state; -extern u8 got_hotknot_state; -extern u8 got_hotknot_extra_state; -extern u8 hotknot_paired_flag; -extern wait_queue_head_t bp_waiter; -extern s32 gup_load_hotknot_system(void); - -extern unsigned char gtp_default_FW[]; -extern unsigned char gtp_default_FW_fl[]; -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 //driver send config to TP on intilization (for no config built in TP flash) -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 1 //turn off power on suspend -#define GTP_AUTO_UPDATE 1 //update FW to TP FLASH -#define GTP_CHANGE_X2Y 0 //set for se1 -#define GTP_HEADER_FW_UPDATE 1 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 1 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF - -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 0 // esd protection with a cycle of 2 seconds -#define GUP_USE_HEADER_FILE 0 -#define GTP_FW_DOWNLOAD 0 //update FW to TP SRAM -//#define GTP_CHARGER_DETECT - -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect -#define GTP_WITH_PEN 0 -#define GTP_SLIDE_WAKEUP 0 -#define GTP_DBL_CLK_WAKEUP 0 // double-click wakup, function together with GTP_SLIDE_WAKEUP -#define HOTKNOT_BLOCK_RW 0 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON //report key as coordinate,Vibration feedback -//#define TPD_WARP_X -//#define TPD_WARP_Y - -#define GTP_DEBUG_ON 0 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) -#define FLASHLESS_FLASH_WORKROUND 0 - -#if GTP_COMPATIBLE_MODE -extern void force_reset_guitar(void); -#endif -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -/*TODO: puts the config info corresponded to your TP here, the following is just -a sample config, send this config should cause the chip cannot work normally*/ -#define CTP_CFG_GROUP1 {\ -0x41,0x20,0x03,0x00,0x05,0x05,0x38,0x06,\ -0x01,0x0F,0x28,0x07,0x55,0x37,0x03,0x05,\ -0x00,0x00,0x00,0x00,0x11,0x11,0x05,0x0C,\ -0x0E,0x0F,0x0B,0x8C,0x2E,0x0E,0x2F,0x2D,\ -0x7F,0x08,0x00,0x00,0x00,0x9A,0x02,0x1D,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x24,0x5A,0x94,0xC5,0x02,\ -0x05,0x00,0x00,0x04,0xD9,0x27,0x00,0xB6,\ -0x2F,0x00,0x99,0x39,0x00,0x85,0x44,0x00,\ -0x73,0x52,0x00,0x73,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1A,0x0D,0x03,0x06,0x00,\ -0x21,0x43,0x06,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,\ -0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,\ -0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,\ -0x26,0x28,0x29,0x2A,0x00,0x02,0x04,0x06,\ -0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x6E,0x01,\ -} - -//default config for K82 - -#define CTP_CFG_GROUP1_CHARGER {\ -} - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2 {\ - } - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2_CHARGER {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3 {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3_CHARGER {\ - } - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - - -//STEP_2(REQUIRED):Change I/O define & I/O operation mode. -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -//STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG -#define GTP_MAX_HEIGHT 800 -#define GTP_MAX_WIDTH 480 -#define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1280 - #define GTP_MAX_WIDTH 800 -#define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 - -#define TPD_POWER_SOURCE_CUSTOM MT65XX_POWER_LDO_VGP6 //MT6323_POWER_LDO_VGP1 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY -#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.1<2014/01/10>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E -#define GTP_REG_HN_STATE 0xAB10 - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_HOTKNOT_CODE 0x20 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -#define HN_DEVICE_PAIRED 0x80 -#define HN_MASTER_DEPARTED 0x40 -#define HN_SLAVE_DEPARTED 0x20 -#define HN_MASTER_SEND 0x10 -#define HN_SLAVE_RECEIVED 0x08 - - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 -#define GTP_REG_REFRESH_RATE 0x8056 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - - -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define TPD_I2C_NUMBER 1 -#define I2C_MASTER_CLOCK 300 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -//#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_NORMAL {0,2559,0,-6557,0,5238784,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_FACTORY {0,2559,0,-6557,0,5238784,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - -//****************************PART4:UPDATE define******************************* -//Error no -#define ERROR_NO_FILE 2 //ENOENT -#define ERROR_FILE_READ 23 //ENFILE -#define ERROR_FILE_TYPE 21 //EISDIR -#define ERROR_GPIO_REQUEST 4 //EINTR -#define ERROR_I2C_TRANSFER 5 //EIO -#define ERROR_NO_RESPONSE 16 //EBUSY -#define ERROR_TIMEOUT 110 //ETIMEDOUT - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/Makefile b/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_c_mlc/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/cust_acc.c deleted file mode 100644 index 88d72fb66f6..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/cust_alsps.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/dummyds.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.c deleted file mode 100644 index 63512557674..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,335 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - -u32 pinSetIdx = 0;//default main sensor - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - -u32 pinSet[2][8] = { - //for main sensor - {GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - {GPIO_CAMERA_CMRST1_PIN, - GPIO_CAMERA_CMRST1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - - - - - - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx){ - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) { - pinSetIdx = 1; - } - - - //power ON - if (On) { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx==0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5647_RAW, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D2 power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A2 power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } -#if 0 - while(1){ - - mdelay(2000); - PK_DBG("im sleep ...\n"); - } -#endif -#if 1 - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } -#endif - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2659_YUV, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define.h deleted file mode 100644 index 8a2504f5206..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0xa8) - - -#define PART_NUM 25 - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info *PartInfo; - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define_private.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/pmt.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/pmt.h deleted file mode 100644 index 23504536328..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/common/pmt.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board-custom.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board-custom.h deleted file mode 100644 index 93d88239e1e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board.c deleted file mode 100644 index 1ad05f7eec7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mt6575_nand_host_hw mt6575_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/logger_custom.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/codegen.dws b/arch/arm/mach-mt8127/tcl8127_tb_c_l/dct/dct/codegen.dws deleted file mode 100755 index 02e46f5bebf0df1783202f7a0d41d3639a889fc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23493 zcmeHP$#Ua15LNcQDw92*kejWkO6JNTX_;k_R4B^MocKSvyZvCXSbVFF&(u-(uP&E=EdEg}#Au}d1{(BIjInImH`FPkQ{y78 z%q7H!V!{t{*nh9+YE!ktrmpg#teSq zSjWhaGwf`FmOB?NBJf~*KUc_gCW1o7_LE}tN@lxa$k#VR-EOPcV#;6u@Po-fEhr&B&E*Jo5b6l_kGb5NkBaRV(JSgmC(+LDRhC3{W;*g3|w$&4~hmq!?`_UkxK0p2Qj*B@R0!aAzz6jZG2mdox;*SoLt+!_lG~Llw+j6*k zyim(%DAt=bNBQL1fk%^eMq>Nv0sdxF3^!eScM&>?&ULwGb~YcwaU)R9O+ZRH=yY0wR^G0I)uK13j6hzZ(pJjA??t){&FMpB2?R7! zMgf)bSfuHKgZfoPQLPScI0*?}hGR%6gN#h&kG|8>1MVD=r-yT0j}oq361j#U zo@*y{TvN!VE7{mt8jGb!3~v-oVCtVoM9i5E!zb71hs^Q?O0Z1aBtv0+o%(lyOR= zl!NX^Q&T%C8l#XBl~G732i-5Enp@~T31=P*;8O;m9Rg4We!8$$%lvZK7TF^O%4Y*1 zJAXEip>Z~HCPp*PPAlAwK0YSKj_-(18L5kAibzb*7_RmkG077XRLcS#L^z%TSEs|= z6qPNIs+of_n#)(tMPh=F;X-~0m%g;aShhJ_*vh=XL#F*kN*;2yglj7CRCVyz>>=xx zo{;S6hxNn}sxM@Ey+<3#o892vQ7#_qj-mqH?~ZcJjPxu69Ym}^s9MxXJIYWk%?CPZ zAHtn{i2;FV(>tAA*7d`#`>O~(t1yhtK)IhFRDU285}XSqQxFrAz7#KccSldf41`{&J^lj;Tnh!+Gn#y$R~?V~(+7$%A4no5l!r$|&KQ zN~JoaI-mmSdUoFH*>kHe|C)j8L+ly>IT~%u$o5+AbqUw(v*%t1tg^iKf#6cR6)xt@`jMB|kfFhbhZczLSH;WM%UA1cdmZ^_FSrqhRK}xBQV~kC(_e>Ho9(b} zX5Wpn<}wa|CtBs}8*Gk*B zyZn0CWKFqNBMS(-kJX{R9S5=Fi+buWvuTZ-4>ij@4Y1TVOSGIhfJPF30`Vs*8+_$J zrzj`&1i4^k>i+ka%a{5GGNxrl#SSd@BWB7q^g_O!SeIIL9!Nk;T+n%I0)U>>8sSAd zDYn1``-M94>u%WgS+7;+DuFjA7Azvxsfg~JB}mx0sI*~IO;SyqO_4T4+7M|&umb69 z*gqTa*+k#XQGYqzPx33Tfb^bZ7c!Li)&Q4DSJE-(o z>Otx`7`Kp`uIuuux03({0Q0ix%g)M~LszY?g*juWUm3irx?0qU@UOG{#+?qPNv(Tz kA)1<~s}Pl$E(FZTRAmys -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd.h deleted file mode 100644 index b173ba13a12..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/dummy_lens.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter.h deleted file mode 100644 index 5ef80601aee..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 3009 -#define Q_MAX_POS_25 3009 -#define Q_MAX_POS_0 3009 -#define Q_MAX_NEG_10 3009 - -#define Q_MAX_POS_50_H_CURRENT 2975 -#define Q_MAX_POS_25_H_CURRENT 2975 -#define Q_MAX_POS_0_H_CURRENT 2975 -#define Q_MAX_NEG_10_H_CURRENT 2975 - - -/* Discharge Percentage */ -#define OAM_D5 1 // 1 : D5, 0: D2 - - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 60 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 70 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 60 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 5400 //90 * 60 = 90 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter_table.h deleted file mode 100644 index 9574fa0095c..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_battery_meter_table.h +++ /dev/null @@ -1,1068 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_charging.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_charging.h deleted file mode 100644 index ca1a98df01c..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_charging.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 50 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 47 -#define MIN_CHARGE_TEMPERATURE 0 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 6 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 150 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -//#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_diso.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pe.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pmic.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/rtc/rtc-mt.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/inc/ssw.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/sim_switch.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/goodix_tool.c deleted file mode 100644 index 7ebef7d3f39..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/goodix_tool.c +++ /dev/null @@ -1,829 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version:1.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#include -#include -#include /*proc*/ - -#include "tpd_custom_gt9xx.h" -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif -extern s32 gup_load_hotknot_system(void); -extern s32 gup_load_fx_system(void); -extern s32 gup_recovery_main_system(void); -extern s32 gup_load_main_system(char *filepath); - -#if 0 -static struct proc_dir_entry *goodix_proc_entry; -#endif - -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; - -#if HOTKNOT_BLOCK_RW -DECLARE_WAIT_QUEUE_HEAD(bp_waiter); -u8 got_hotknot_state = 0; -u8 got_hotknot_extra_state = 0; -u8 wait_hotknot_state = 0; -u8 force_wake_flag = 0; -#endif - -#define HOTKNOTNAME "hotknot" - -static ssize_t hotknot_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t hotknot_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static struct file_operations hotknot_fops = -{ -// .owner = THIS_MODULE, - .read = hotknot_read, - .write = hotknot_write, -}; - -static struct miscdevice hotknot_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = HOTKNOTNAME, - .fops = &hotknot_fops, -}; -static ssize_t goodix_tool_upper_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t goodix_tool_upper_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static const struct file_operations gt_tool_fops = { - .write = goodix_tool_upper_write, - .read = goodix_tool_upper_read, -}; - -static void tool_set_proc_name(char * procname) -{ -#if 1 - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); -#else - sprintf(procname, HOTKNOTNAME); -#endif - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); -#if 0 - goodix_proc_entry = create_proc_entry(procname, 0660, NULL); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - goodix_proc_entry->write_proc = goodix_tool_write; - goodix_proc_entry->read_proc = goodix_tool_read; - } -#else - if(proc_create(procname, 0660, NULL, >_tool_fops)== NULL) - { - GTP_ERROR("create_proc_entry %s failed", procname); - return -1; - } -#endif - -#if 1 // setting by hotknot feature - if (misc_register(&hotknot_misc_device)) - { - printk("mtk_tpd: hotknot_device register failed\n"); - return FAIL; - } -#endif - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[Write]tpd_halt =1 fail!"); - return FAIL; - } - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - GTP_DEBUG("wr :0x%02x.", cmd_head.wr); - /* - GTP_DEBUG("flag:0x%02x.", cmd_head.flag); - GTP_DEBUG("flag addr:0x%02x%02x.", cmd_head.flag_addr[0], cmd_head.flag_addr[1]); - GTP_DEBUG("flag val:0x%02x.", cmd_head.flag_val); - GTP_DEBUG("flag rel:0x%02x.", cmd_head.flag_relation); - GTP_DEBUG("circle :%d.", (s32)cmd_head.circle); - GTP_DEBUG("times :%d.", (s32)cmd_head.times); - GTP_DEBUG("retry :%d.", (s32)cmd_head.retry); - GTP_DEBUG("delay :%d.", (s32)cmd_head.delay); - GTP_DEBUG("data len:%d.", (s32)cmd_head.data_len); - GTP_DEBUG("addr len:%d.", (s32)cmd_head.addr_len); - GTP_DEBUG("addr:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - GTP_DEBUG("len:%d.", (s32)len); - GTP_DEBUG("buf[20]:0x%02x.", buff[CMD_HEAD_LENGTH]); - */ - - if (1 == cmd_head.wr) - { - // copy_from_user(&cmd_head.data[cmd_head.addr_len], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return FAIL; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (3 == cmd_head.wr) //Write ic type - { - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - return CMD_HEAD_LENGTH; - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - return CMD_HEAD_LENGTH; - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - - return CMD_HEAD_LENGTH; - } - -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return FAIL; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - ret = copy_from_user(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - GTP_DEBUG("update firmware, filename: %s", cmd_head.data); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return FAIL; - } - } - -#endif - else if (19 == cmd_head.wr) //load subsystem - { - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(0 == cmd_head.data[0]) - { - if (FAIL == gup_load_hotknot_system()) - { - return FAIL; - } - } - else if(1 == cmd_head.data[0]) - { - if (FAIL == gup_load_fx_system()) - { - return FAIL; - } - } - else if(2 == cmd_head.data[0]) - { - if (FAIL == gup_recovery_main_system()) - { - return FAIL; - } - } - else if(3 == cmd_head.data[0]) - { - if (FAIL == gup_load_main_system(NULL)) - { - return FAIL; - } - } - } -#if HOTKNOT_BLOCK_RW - else if (21 == cmd_head.wr) - { - u16 wait_hotknot_timeout = 0; - u8 rqst_hotknot_state; - - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], - &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - rqst_hotknot_state = cmd_head.data[GTP_ADDR_LENGTH]; - wait_hotknot_state |= rqst_hotknot_state; - wait_hotknot_timeout = (cmd_head.data[GTP_ADDR_LENGTH + 1]<<8) + - cmd_head.data[GTP_ADDR_LENGTH + 2]; - GTP_DEBUG("Goodix tool received wait polling state:0x%x,timeout:%d, all wait state:0x%x", - rqst_hotknot_state, wait_hotknot_timeout, wait_hotknot_state); - got_hotknot_state &= (~rqst_hotknot_state); - //got_hotknot_extra_state = 0; - switch(rqst_hotknot_state) - { - set_current_state(TASK_INTERRUPTIBLE); - case HN_DEVICE_PAIRED: - hotknot_paired_flag = 0; - wait_event_interruptible(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waiter failed.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_SEND: - case HN_SLAVE_RECEIVED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)) - { - return got_hotknot_extra_state; - } - else - { - GTP_ERROR("Wait 0x%x block polling waiter timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_DEPARTED: - case HN_SLAVE_DEPARTED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waitor timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - default: - GTP_ERROR("Invalid rqst_hotknot_state in goodix_tool."); - break; - } - force_wake_flag = 0; - } - else if(23 == cmd_head.wr) - { - GTP_DEBUG("Manual wakeup all block polling waiter!"); - got_hotknot_state = 0; - wait_hotknot_state = 0; - force_wake_flag = 1; - hotknot_paired_flag = 0; - wake_up_interruptible(&bp_waiter); - } -#endif - return CMD_HEAD_LENGTH; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data) -{ - u64 ret = 0; - - GTP_DEBUG_FUNC(); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[READ]tpd_halt =1 fail!"); - return FAIL; - } - if (cmd_head.wr % 2) - { - GTP_ERROR("[READ] invaild operator fail!"); - return FAIL; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= DATA_LENGTH; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return FAIL; - } - - ret = copy_to_user(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - } - else if (2 == cmd_head.wr) - { - // memcpy(page, "gt8", cmd_head.data_len); - // memcpy(page, "GT818", 5); - // page[5] = 0; - - GTP_DEBUG("Return ic type:%s len:%d.", page, (s32)cmd_head.data_len); - return cmd_head.data_len; - //return sizeof(IC_TYPE_NAME); - } - else if (4 == cmd_head.wr) - { - page[0] = show_len >> 8; - page[1] = show_len & 0xff; - page[2] = total_len >> 8; - page[3] = total_len & 0xff; - - return cmd_head.data_len; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - // memcpy(page, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - s32 tmp_len; - tmp_len = strlen(GTP_DRIVER_VERSION); - ret = copy_to_user(page, GTP_DRIVER_VERSION, tmp_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - page[tmp_len] = 0; - } - - return cmd_head.data_len; -} - - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_driver.c deleted file mode 100644 index cde964d3ccc..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,3350 +0,0 @@ -#include "tpd.h" -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#include "cust_gpio_usage.h" - -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif -#include /*proc*/ - -extern struct tpd_device *tpd; -#ifdef VELOCITY_CUSTOM -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -#endif -static int tpd_flag = 0; -int tpd_halt = 0; -static int tpd_eint_mode=1; -static struct task_struct *thread = NULL; -static int tpd_polling_time=50; -extern u8 load_fw_process; - -static DECLARE_WAIT_QUEUE_HEAD(waiter); -DEFINE_MUTEX(i2c_access); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = TPD_KEYS; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -struct touch_vitual_key_map_t -{ - int point_x; - int point_y; -}; -static struct touch_vitual_key_map_t touch_key_point_maping_array[]=GTP_KEY_MAP_ARRAY; -#endif - -#if GTP_SLIDE_WAKEUP -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); -#endif - -#if GTP_CHARGER_SWITCH - extern kal_bool upmu_is_chr_det(void); - static void gtp_charger_switch(s32 dir_update); -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -//static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local_normal[8] = TPD_CALIBRATION_MATRIX_ROTATION_NORMAL; -static int tpd_def_calmat_local_factory[8] = TPD_CALIBRATION_MATRIX_ROTATION_FACTORY; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -static void tpd_on(void); -static void tpd_off(void); - -#ifdef GTP_CHARGER_DETECT -extern bool upmu_get_pchr_chrdet(void); -#define TPD_CHARGER_CHECK_CIRCLE 50 -static struct delayed_work gtp_charger_check_work; -static struct workqueue_struct *gtp_charger_check_workqueue = NULL; -static void gtp_charger_check_func(struct work_struct *); -static u8 gtp_charger_mode = 0; -#endif - - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -u8 esd_running = 0; -spinlock_t esd_lock; -#endif - -#if HOTKNOT_BLOCK_RW -u8 hotknot_paired_flag = 0; -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -#ifndef GTP_REG_REFRESH_RATE -#define GTP_REG_REFRESH_RATE 0x8056 -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#ifdef GTP_CHARGER_DETECT -static u8 config_charger[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#endif -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; -static u8 chip_gt9xxs = 0; // true if chip type is gt9xxs,like gt915s - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -u8 gtp_ref_retries = 0; -u8 gtp_clk_retries = 0; -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 gtp_clk_buf[6]; -u8 rqst_processing = 0; - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern s32 gup_load_main_system(char *filepath); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -u8 is_reseting = 0; -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -static struct proc_dir_entry *gt91xx_config_proc = NULL; - -#ifdef TPD_REFRESH_RATE -/******************************************************* -Function: - Write refresh rate - -Input: - rate: refresh rate N (Duration=5+N ms, N=0~15) - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static u8 gtp_set_refresh_rate(u8 rate) -{ - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff, rate}; - - if (rate > 0xf) - { - GTP_ERROR("Refresh rate is over range (%d)", rate); - return FAIL; - } - - GTP_INFO("Refresh rate change to %d", rate); - return gtp_i2c_write(i2c_client_point, buf, sizeof(buf)); -} - -/******************************************************* -Function: - Get refresh rate - -Output: - Refresh rate or error code -*******************************************************/ -static u8 gtp_get_refresh_rate(void) -{ - int ret; - - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff}; - ret = gtp_i2c_read(i2c_client_point, buf, sizeof(buf)); - if (ret < 0) - return ret; - - GTP_INFO("Refresh rate is %d", buf[GTP_ADDR_LENGTH]); - return buf[GTP_ADDR_LENGTH]; -} - -//============================================================= -static ssize_t show_refresh_rate(struct device *dev,struct device_attribute *attr, char *buf) -{ - int ret = gtp_get_refresh_rate(); - if (ret < 0) - return 0; - else - return sprintf(buf, "%d\n", ret); -} -static ssize_t store_refresh_rate(struct device *dev,struct device_attribute *attr, const char *buf, size_t size) -{ - //u32 rate = 0; - gtp_set_refresh_rate(simple_strtoul(buf, NULL, 16)); - return size; -} -static DEVICE_ATTR(tpd_refresh_rate, 0664, show_refresh_rate, store_refresh_rate); - -static struct device_attribute *gt9xx_attrs[] = -{ - &dev_attr_tpd_refresh_rate, -}; -#endif -//============================================================= - - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - -static int gt91xx_config_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i, len, err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - - ptr = page; - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - /* Touch PID & VID */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== GT9XX Version ID ====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_VERSION, temp_data, 6); - ptr += sprintf(ptr, "Chip PID: %c%c%c VID: 0x%02X%02X\n", temp_data[0], temp_data[1], temp_data[2], temp_data[5], temp_data[4]); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW_fl[12], gtp_default_FW_fl[13]); - } - else - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); - } -#else - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); -#endif - i2c_read_bytes(i2c_client_point, 0x41E4, temp_data, 1); - ptr += sprintf(ptr, "Boot status 0x%X\n", temp_data[0]); - - /* Touch Status and Clock Gate */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== Touch Status and Clock Gate ====\n"); - ptr += sprintf(ptr, "status: 1: on, 0 :off\n"); - ptr += sprintf(ptr, "status:%d\n", (tpd_halt+1)&0x1); - - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; - - //return (ptr - page); -} - -static int gt91xx_config_write_proc(struct file *file, const char *buffer, size_t count, loff_t *ppos) -{ - s32 ret = 0; - char temp[25] = {0}; // for store special format cmd - char mode_str[15] = {0}; - unsigned int mode; - u8 buf[1]; - - GTP_DEBUG("write count %ld\n", (unsigned long)count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%ld]", GTP_CONFIG_MAX_LENGTH, (unsigned long)count); - return -EFAULT; - } - - /**********************************************/ - /* for store special format cmd */ - if (copy_from_user(temp, buffer, sizeof(temp))) - { - GTP_ERROR("copy from user fail 2"); - return -EFAULT; - } - sscanf(temp, "%s %d", (char *)&mode_str, &mode); - - /***********POLLING/EINT MODE switch****************/ - if(strcmp(mode_str, "polling") == 0) - { - if(mode>=10&&mode<=200) - { - GTP_INFO("Switch to polling mode, polling time is %d",mode); - tpd_eint_mode=0; - tpd_polling_time=mode; - tpd_flag = 1; - wake_up_interruptible(&waiter); - } - else - { - GTP_INFO("Wrong polling time, please set between 10~200ms"); - } - return count; - } - if(strcmp(mode_str, "eint") == 0) - { - GTP_INFO("Switch to eint mode"); - tpd_eint_mode=1; - return count; - } - /**********************************************/ - if(strcmp(mode_str, "switch") == 0) - { - if(mode == 0)// turn off - tpd_off(); - else if(mode == 1)//turn on - tpd_on(); - else - GTP_ERROR("error mode :%d", mode); - return count; - } - //force clear config - if(strcmp(mode_str, "clear_config") == 0) - { - GTP_INFO("Force clear config"); - buf[0] = 0x10; - ret = i2c_write_bytes(i2c_client_point, GTP_REG_SLEEP, buf, 1); - return count; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - /***********clk operate reseved****************/ - /**********************************************/ - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_DEBUG("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - if (buf[5] == 'S' || buf[5] == 's') - { - chip_gt9xxs = 1; - } - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing; - } - else - #endif - { - gtp_get_info(client); - } - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(100); // for dbl-system -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = (int)gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return ret; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - } - gtp_chip_type = CHIP_TYPE_GT9; // for test - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("[gtp_bak_ref_proc]Alloc memory for ref failed.use default ref"); - return FAIL; - } - memset(refp, 0, ref_len); - if(gtp_ref_retries >= GTP_CHK_FS_MNT_MAX) - { - for (j = 0; j < ref_grps; ++j) - { - refp[ref_seg_len + j * ref_seg_len -1] = 0x01; - } - ret = i2c_write_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Write ref i2c error."); - ret = FAIL; - } - - GTP_ERROR("[gtp_bak_ref_proc]Bak file or path is not exist,send default ref."); - ret = SUCCESS; - goto exit_ref_proc; - } - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0660); - if (IS_ERR(flp)) - { - GTP_ERROR("[gtp_bak_ref_proc]Ref File not found!Creat ref file."); - //flp->f_op->llseek(flp, 0, SEEK_SET); - //flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - gtp_ref_retries++; - ret = FAIL; - goto exit_ref_proc; - } - else if(GTP_BAK_REF_SEND == mode) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref file failed."); - memset(refp, 0, ref_len); - } - } - - if(GTP_BAK_REF_STORE == mode) - { - ret = i2c_read_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref i2c error."); - ret = FAIL; - goto exit_ref_proc; - } - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - else - { - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; i 120) || - (gtp_clk_buf[i] != gtp_clk_buf[0])) - { - break; - } - clk_chksum += gtp_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_INFO("Clk ram legality check success"); - return SUCCESS; - } - GTP_ERROR("main clock freq in clock buf is wrong"); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - struct file *flp = NULL; - - //check clk legality - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - goto send_main_clk; - } - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("[gtp_main_clk_proc]cal clk result is illegitimate"); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - - if (IS_ERR(flp)) - { - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - } - else - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - goto exit_clk_proc; - } - - ret = SUCCESS; - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -#endif -//************* For GT9XXF End **********************// - -static const struct file_operations gt_upgrade_proc_fops = { - .write = gt91xx_config_write_proc, - .read = gt91xx_config_read_proc -}; - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - -//#ifdef VELOCITY_CUSTOM - #if 0 - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#ifdef VELOCITY_CUSTOM - tpd_v_magnify_x = TPD_VELOCITY_CUSTOM_X; - tpd_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; - -#endif - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0660, NULL, >_upgrade_proc_fops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_INFO(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif -#if GTP_SLIDE_WAKEUP - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); -#endif - -#if GTP_WITH_PEN - // pen support - __set_bit(BTN_TOOL_PEN, tpd->dev->keybit); - __set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); - //__set_bit(INPUT_PROP_POINTER, tpd->dev->propbit); // 20130722 -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; - - return 0; -} - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void) -{ - s32 i = 0; - s32 ret = 0; - //static u8 is_reseting = 0; - - if(is_reseting || (load_fw_process == 1)) - { - return; - } - GTP_INFO("force_reset_guitar"); - is_reseting = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - for (i = 0; i < 5; i++) - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - //check code ram - ret = gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - } - else - #endif - { - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - is_reseting = 0; - -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[2] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - if(1 == load_fw_process) - { - GTP_INFO("Load FW process is runing"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - memset(esd_buf, 0x01, sizeof(esd_buf)); - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, sizeof(esd_buf)); - msleep(50); - force_reset_guitar(); - } - } - -#if FLASHLESS_FLASH_WORKROUND - { - u8 versionBuff[6]; - int retry = 0; - u8 temp = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - //match pid - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - temp = versionBuff[5]; - versionBuff[5] = versionBuff[4]; - versionBuff[4] = temp; - //match vid - if( memcmp(&versionBuff[4], >p_default_FW_fl[12], 2) !=0 ) - { - continue; - } - break; - } - if(retry>=3) - { - GTP_INFO("IC version error., force reset!"); - force_reset_guitar(); - } - } -#endif - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif -static int tpd_history_x=0, tpd_history_y=0; -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(x, y, x, y, id, 1); - tpd_history_x=x; - tpd_history_y=y; - - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 1, x+y); -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - //input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); - input_report_key(tpd->dev, BTN_TOUCH, 0); - //input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(tpd_history_x, tpd_history_y, tpd_history_x, tpd_history_y, id, 0); - tpd_history_x=0; - tpd_history_y=0; - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 0, x+y); - -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - - chr_status = upmu_is_chr_det(); - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -/*Coordination mapping*/ -static void tpd_calibrate_driver(int *x, int *y) -{ - int tx; - - GTP_DEBUG("Call tpd_calibrate of this driver ..\n"); - - tx = ( (tpd_def_calmat[0] * (*x)) + (tpd_def_calmat[1] * (*y)) + (tpd_def_calmat[2]) ) >> 12; - *y = ( (tpd_def_calmat[3] * (*x)) + (tpd_def_calmat[4] * (*y)) + (tpd_def_calmat[5]) ) >> 12; - *x = tx; -} - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#if HOTKNOT_BLOCK_RW - u8 hn_pxy_state = 0; - u8 hn_pxy_state_bak = 0; - u8 hn_paired_cnt = 0; - u8 hn_state_buf[10] = {(u8)(GTP_REG_HN_STATE>> 8), (u8)(GTP_REG_HN_STATE & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - -#if GTP_SLIDE_WAKEUP - u8 doze_buf[3] = {0x81, 0x4B}; -#endif - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - if(tpd_eint_mode) - { - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - } - else - { - msleep(tpd_polling_time); - } - - set_current_state(TASK_RUNNING); - mutex_lock(&i2c_access); - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if (0xAA == doze_buf[2]) - { - GTP_INFO("Forward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xBB == doze_buf[2]) - { - GTP_INFO("Backward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - - } - else if (0xC0 == (doze_buf[2] & 0xC0)) // double click wakeup - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - #endif - if(tpd_halt||(is_reseting == 1) || (load_fw_process == 1)) - { - mutex_unlock(&i2c_access); - GTP_DEBUG("return for interrupt after suspend... "); - continue; - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - switch(rqst_data[2]&0x0F) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - case GTP_RQST_RESET: - GTP_INFO("Request Reset."); - gtp_recovery_reset(i2c_client_point); - goto exit_work_func; - case GTP_RQST_HOTKNOT_CODE: - GTP_INFO("Request HotKnot Code."); - gup_load_hotknot_system(); - goto exit_work_func; - default: - break; - } - } - #endif - - if ((finger & 0x80) == 0) - { - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag) - #endif - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - GTP_ERROR("buffer not ready"); - continue; - } - } - - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag && (finger&0x0F)) - { - id = point_data[GTP_ADDR_LENGTH+1]; - hn_pxy_state = point_data[GTP_ADDR_LENGTH+2]&0x80; - hn_pxy_state_bak = point_data[GTP_ADDR_LENGTH+3]&0x80; - if((32 == id) && (0x80 == hn_pxy_state) && (0x80 == hn_pxy_state_bak)) - { - #ifdef HN_DBLCFM_PAIRED - if(hn_paired_cnt++ < 2) - { - goto exit_work_func; - } - #endif - GTP_DEBUG("HotKnot paired!"); - if(wait_hotknot_state & HN_DEVICE_PAIRED) - { - GTP_DEBUG("INT wakeup HN_DEVICE_PAIRED block polling waiter"); - got_hotknot_state |= HN_DEVICE_PAIRED; - wake_up_interruptible(&bp_waiter); - } - hotknot_paired_flag = 1; - goto exit_work_func; - } - else - { - got_hotknot_state &= (~HN_DEVICE_PAIRED); - hn_paired_cnt = 0; - } - - } - - if(hotknot_paired_flag) - { - ret = gtp_i2c_read(i2c_client_point, hn_state_buf, 6); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - - got_hotknot_state = 0; - - GTP_DEBUG("[0xAB10~0xAB13]=0x%x,0x%x,0x%x,0x%x", hn_state_buf[GTP_ADDR_LENGTH], - hn_state_buf[GTP_ADDR_LENGTH+1], - hn_state_buf[GTP_ADDR_LENGTH+2], - hn_state_buf[GTP_ADDR_LENGTH+3]); - - if(wait_hotknot_state & HN_MASTER_SEND) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH])) - { - GTP_DEBUG("Wakeup HN_MASTER_SEND block polling waiter"); - got_hotknot_state |= HN_MASTER_SEND; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_RECEIVED) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH+1])) - { - GTP_DEBUG("Wakeup HN_SLAVE_RECEIVED block polling waiter:0x%x", hn_state_buf[GTP_ADDR_LENGTH+1]); - got_hotknot_state |= HN_SLAVE_RECEIVED; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH+1]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_MASTER_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Wakeup HN_MASTER_DEPARTED block polling waiter"); - got_hotknot_state |= HN_MASTER_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH+1]) - { - GTP_DEBUG("Wakeup HN_SLAVE_DEPARTED block polling waiter"); - got_hotknot_state |= HN_SLAVE_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - } - - #endif - - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - GTP_ERROR("Bad number of fingers!"); - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - -#if GTP_HAVE_TOUCH_KEY - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - for (i = 0; i < TPD_KEY_COUNT; i++) - { - //input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - if( key_value&(0x01<dev, BTN_TOOL_PEN, 1); - pre_pen = 1; - id = 0; - } - #endif - GTP_DEBUG(" %d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - else if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - input_report_key(tpd->dev, BTN_TOOL_PEN, 0); - pre_pen = 0; - } - #endif - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - else - { - GTP_DEBUG("Additional Eint!"); - } - pre_touch = touch_num; - - if (tpd != NULL && tpd->dev != NULL) - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_INFO("I2C write end_cmd error!"); - } - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_INFO("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_INFO("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_INFO("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH-1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - //memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - //memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); - if (FACTORY_BOOT == get_boot_mode()) - { - TPD_DEBUG("Factory mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_factory, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_factory, 8 * 4); - } - else - { - TPD_DEBUG("Normal mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_normal, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_normal, 8 * 4); - } -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_INFO("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -#if GTP_SLIDE_WAKEUP -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); -#if GTP_DBL_CLK_WAKEUP - i2c_control_buf[2] = 0x09; -#endif - - GTP_DEBUG("entering doze mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("failed to set doze flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_DEBUG("GTP has been working in doze mode!"); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send doze cmd failed."); - return ret; -} - -#else -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif - -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} -#endif - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if (GTP_POWER_CTRL_SLEEP) - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("Esd recovery wakeup."); - return 0; - } -#endif - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 opr_buf[2] = {0}; - - while (retry++ < 10) - { - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); - msleep(5); - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) - { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) - { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(); - } - if (retry >= 10) - { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(); - } - GTP_ERROR("GTP wakeup sleep failed."); - return ret; - } -#endif - while (retry++ < 10) - { - #if GTP_SLIDE_WAKEUP - if (DOZE_WAKEUP != doze_status) - { - GTP_DEBUG("power wakeup, reset guitar"); - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - } - else - { - GTP_DEBUG("slide(double click) wakeup, no reset guitar"); - doze_status = DOZE_DISABLED; - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #else -// if (chip_gt9xxs == 1) -// { -// gtp_reset_guitar(client, 10); -// } -// else -// { -// GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); -// msleep(5); -// } - - //GTP_GPIO_AS_INT(GTP_INT_PORT); - gtp_reset_guitar(client, 20); // for double-system, reset to default system - - return 2; - #endif - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - #if (!GTP_SLIDE_WAKEUP) - if (chip_gt9xxs == 0) - { - gtp_int_sync(25); - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #endif - - return ret; - } - gtp_reset_guitar(client, 20); - } -#endif - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - u8 buf[3] = {0x81, 0xaa, 0}; - -#ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - return ; - } -#endif - -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - - mutex_lock(&i2c_access); - - gtp_i2c_read(i2c_client_point,buf,sizeof(buf)); - if(buf[2] == 0x55) - { - mutex_unlock(&i2c_access); - GTP_INFO("GTP early suspend pair sucess"); - return; - } - tpd_halt = 1; - - mutex_unlock(&i2c_access); -#if GTP_ESD_PROTECT - cancel_delayed_work_sync(>p_esd_check_work); -#endif - -#ifdef GTP_CHARGER_DETECT - cancel_delayed_work_sync(>p_charger_check_work); -#endif - mutex_lock(&i2c_access); - -#if GTP_SLIDE_WAKEUP - ret = gtp_enter_doze(i2c_client_point); -#else - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } -#endif - mutex_unlock(&i2c_access); - - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - printk("mtk-tpd: %s start\n", __FUNCTION__); -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - if(load_fw_process == 0) - { - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - //gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - -#if GTP_SLIDE_WAKEUP - doze_status = DOZE_DISABLED; -#else - mutex_lock(&i2c_access); - tpd_halt = 0; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); -#endif - -#if GTP_ESD_PROTECT - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); -#endif - -#ifdef GTP_CHARGER_DETECT - queue_delayed_work(gtp_charger_check_workqueue, >p_charger_check_work, clk_tick_cnt); -#endif - printk("mtk-tpd: %s end\n", __FUNCTION__); -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -static void tpd_off(void) -{ - -#ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); -#else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); -#endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - GTP_INFO("GTP enter sleep!"); - - tpd_halt = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -} - -static void tpd_on(void) -{ - s32 ret = -1, retry = 0; - - while (retry++ < 5) - { - ret = tpd_power_on(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - } - - ret = gtp_send_cfg(i2c_client_point); - - if (ret > 0) - { - GTP_DEBUG("Wakeup sleep send config success."); - } - } - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - tpd_halt = 0; -} - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#if defined(TPD_I2C_NUMBER) - i2c_register_board_info(TPD_I2C_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_firmware.h deleted file mode 100644 index 21c067ead60..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]9150 -*[VID]1010 -*[GENERATED]2013/11/16 20:59:13 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { -}; - -unsigned char gtp_default_FW_hotknot[] = { -}; - -unsigned char gtp_default_FW_hotknot2[] = { -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_update.c deleted file mode 100644 index 1949bbc0a0d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3986 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.0 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_LINK_LENGTH 0x3000 // 12k -#define FW_APP_CODE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define FIRMWARE_LENGTH (FW_SS51_LENGTH + FW_DSP_LENGTH + FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH + FW_APP_CODE_LENGTH) - -#define FW_HOTKNOT_LENGTH 0x3000 -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#define FAIL 0 -#define SUCCESS 1 - -#define MAIN_SYSTEM_PATH "/sdcard/goodix/_main_.bin" -#define HOTKNOT_SYSTEM_PATH "/sdcard/goodix/_hotknot_.bin" -#define FX_SYSTEM_PATH "/sdcard/goodix/_authorization_.bin" - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -extern struct mutex i2c_access; -u8 searching_file = 0; -u8 got_file_flag = 0; -u8 load_fw_process = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_recovery_main_system(void); -s32 gup_load_main_system(char *filepath); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -char * gup_load_fw_from_file(char *filepath); -s32 gup_load_system(char *firmware, s32 length, u8 need_check); -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_INFO("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("User layer reset GT9XXF."); - return; - } -#endif - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - if ((update_msg.fw_total_len < 36*1024) || (update_msg.fw_total_len > 128*1024)) - { - GTP_ERROR("Invalid firmware length(%d), update aborted!", update_msg.fw_total_len); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_INFO("[check_update_file]default firmware array is INVALID!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware with checksum(0x%04X)", fw_checksum & 0xFFFF); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - goto load_failed; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - goto load_failed; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - goto load_failed; - } - - return SUCCESS; - -load_failed: - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - - if (retry > MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - - burn_length += frame_length; - burn_addr += frame_length; - } - - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_DEBUG("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_boot_isp]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_LINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_LINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_LINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_app_code(struct i2c_client *client) -{ - u8* fw_app_code = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the app code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_fw_app_code]Begin burn app_code firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_app_code]step1:alloc memory"); - while(retry++ < 5) - { - fw_app_code = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_app_code == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_app_code]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_app_code]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_app_code]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_app_code, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_app_code]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_app_code]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_app_code, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_app_code]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_app_code]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_app_code, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_app_code]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_app_code]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_app_code, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_app_code]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - update_msg.fw_burned_len += FW_APP_CODE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_app_code: - kfree(fw_app_code); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8 *)dir); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - GTP_DEBUG("[update_proc]Burned length:%d", update_msg.fw_burned_len); - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 50; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 60; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 80; - ret = gup_burn_fw_app_code(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 90; - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 95; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE && GTP_AUTO_UPDATE_CFG) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("Update config failed!"); - } - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - return FAIL; - } - else - { - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - else - { - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_INFO("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_INFO("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - if (NULL != dir) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; - -download_fail: - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - - -#define BANK_LENGTH (16*1024) -#define FIRMWARE_HEADER_LEN 14 - -static u32 current_system_length = 0; - -char * gup_load_fw_from_file(char *filepath) -{ - struct file *fw_file = NULL; - mm_segment_t old_fs; - long len = 0; - char *buffer = NULL; - - if(filepath == NULL) - { - GTP_ERROR("[Load_firmware]filepath: NULL"); - goto load_firmware_exit; - } - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - fw_file = filp_open(filepath, O_RDONLY, 0); - if (fw_file == NULL || IS_ERR(fw_file)) - { - GTP_ERROR("[Load_firmware]Failed to open: %s", filepath); - goto load_firmware_exit; - } - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - len = fw_file->f_op->llseek(fw_file, 0, SEEK_END); - if(len<1024) - { - GTP_ERROR("[Load_firmware]Firmware is too short: %ld", len); - goto load_firmware_failed; - } - buffer = (char *)kmalloc(sizeof(char) * len, GFP_KERNEL); - if(buffer == NULL) - { - GTP_ERROR("[Load_firmware]Failed to allocate buffer: %ld", len); - goto load_firmware_failed; - } - - memset(buffer, 0, sizeof(char) * len); - - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - fw_file->f_op->read(fw_file, buffer, len, &fw_file->f_pos); - - GTP_ERROR("[Load_firmware]Load from file success: %ld %s", len, filepath); - - -load_firmware_failed: - filp_close(fw_file, NULL); - set_fs(old_fs); - -load_firmware_exit: - return buffer; -} - -s32 gup_check_firmware(char *fw, u32 length) -{ - u32 i = 0; - u32 fw_checksum = 0; - u16 temp; - - for(i=0; i 0) - { - u32 len = length >BANK_LENGTH? BANK_LENGTH:length; - ret = gup_load_by_bank(bank, need_check, &firmware[bank*BANK_LENGTH], len); - if(FAIL == ret) - { - goto gup_load_system_exit; - } - GTP_DEBUG("load bank%d length:%d success.", bank, len); - bank++; - length -= len; - } - - ret = gtp_fw_startup(i2c_client_point); - -gup_load_system_exit: -#if GTP_ESD_PROTECT -#if FLASHLESS_FLASH_WORKROUND - -#else - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif -#endif - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return ret; -} - -s32 gup_load_fx_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_fx_system] Load authorization system."); - - firmware = gtp_default_FW_hotknot2; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( FX_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot2; - GTP_INFO("[load_fx_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_fx_system]firmware's length is invalid."); - goto load_fx_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_fx_system]firmware's checksum is error."); - goto load_fx_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - -load_fx_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} - - -s32 gup_load_hotknot_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - load_fw_process = 1; - /* - if(gtp_chip_type == CHIP_TYPE_GT9) - { - u8 retry = 0; - u8 wr_buf[3] = {0x80, 0x46, 0x22}; - u8 rd_buf[4] = {0x81, 0xA8, 0x00, 0x00}; - while(retry++ < 10) - { - wr_buf[1] = 0x46; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - wr_buf[1] = 0x40; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - msleep(50); - ret = gup_i2c_read(i2c_client_point, rd_buf, sizeof(rd_buf)); - if(ret <= 0) - { - continue; - } - if(rd_buf[GTP_ADDR_LENGTH] == 0xAA && - rd_buf[GTP_ADDR_LENGTH] == rd_buf[GTP_ADDR_LENGTH + 1]) - { - GTP_INFO("[load_hotknot_system]Hotknot switch system success."); - return SUCCESS; - } - } - GTP_ERROR("[load_hotknot_system]Hotknot switch system failed."); - return FAIL; - } - */ - GTP_INFO("[load_hotknot_system] Load hotknot system."); - - firmware = gtp_default_FW_hotknot; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( HOTKNOT_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot; - GTP_INFO("[load_hotknot_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_hotknot_system]firmware's length is invalid."); - goto load_hotknot_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_hotknot_system]firmware's checksum is error."); - goto load_hotknot_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 0); - -load_hotknot_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; - -} - - -s32 gup_recovery_main_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[recovery_main_system] Recovery main system."); - - if(gtp_chip_type == CHIP_TYPE_GT9) - { - gtp_reset_guitar(i2c_client_point,10); - load_fw_process = 0; - return SUCCESS; - } - - firmware = gtp_default_FW_fl; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(MAIN_SYSTEM_PATH); - if(firmware == NULL) - { - firmware = gtp_default_FW_fl; - GTP_INFO("[recovery_main_system]Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - } - if(length > 36*1024 || length < 16*1024 ) - { - GTP_ERROR("[recovery_main_system]firmware's length is invalid."); - goto recovery_main_system_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[recovery_main_system]firmware's checksum is error."); - goto recovery_main_system_exit; - } - - if(current_system_length == 0) - { - current_system_length = length; - } - - GTP_INFO("[recovery_main_system] Recovery length: %d.", current_system_length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], current_system_length, 0); - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -recovery_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - load_fw_process = 0; - return ret; - -} - -s32 gup_load_main_system(char *filepath) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_main_system] Load main system."); - - if(filepath != NULL) - { - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - GTP_INFO("[load_main_system]can not open file: %s", filepath); - goto load_main_system_exit; - } - else - { - is_load_from_file = 1; - } - } - else - { - firmware = gtp_default_FW_fl; - } -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - if(gtp_chip_type == CHIP_TYPE_GT9) - firmware = gtp_default_FW; - else - firmware = gtp_default_FW_fl; - GTP_INFO("[load_main_system]Use default firmware. type:%d", gtp_chip_type); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 36*1024) - { - length = 36*1024; - } - } - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_main_system]firmware's checksum is error."); - goto load_main_system_exit; - } - GTP_INFO("[load_main_system] Firmware length: %d.", length); - - //memcpy(gtp_default_FW_fl, firmware, length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - show_len = 100; - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -load_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/mtk_tpd.c deleted file mode 100644 index 91b7ffb872e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,450 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index 6fdcf995a06..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,409 +0,0 @@ -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -struct goodix_ts_data -{ - spinlock_t irq_lock; - struct i2c_client *client; - struct input_dev *input_dev; - struct hrtimer timer; - struct work_struct work; - struct early_suspend early_suspend; - s32 irq_is_disable; - s32 use_irq; - u16 abs_x_max; - u16 abs_y_max; - u8 max_touch_num; - u8 int_trigger_type; - u8 green_wake_mode; - u8 chip_type; - u8 enter_update; - u8 gtp_is_suspend; - u8 gtp_rawdiff_mode; -}; - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; -extern u8 load_fw_process; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern u8 wait_hotknot_state; -extern u8 got_hotknot_state; -extern u8 got_hotknot_extra_state; -extern u8 hotknot_paired_flag; -extern wait_queue_head_t bp_waiter; -extern s32 gup_load_hotknot_system(void); - -extern unsigned char gtp_default_FW[]; -extern unsigned char gtp_default_FW_fl[]; -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 //driver send config to TP on intilization (for no config built in TP flash) -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 1 //turn off power on suspend -#define GTP_AUTO_UPDATE 1 //update FW to TP FLASH -#define GTP_CHANGE_X2Y 0 //set for se1 -#define GTP_HEADER_FW_UPDATE 1 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 1 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF - -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 0 // esd protection with a cycle of 2 seconds -#define GUP_USE_HEADER_FILE 0 -#define GTP_FW_DOWNLOAD 0 //update FW to TP SRAM -//#define GTP_CHARGER_DETECT - -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect -#define GTP_WITH_PEN 0 -#define GTP_SLIDE_WAKEUP 0 -#define GTP_DBL_CLK_WAKEUP 0 // double-click wakup, function together with GTP_SLIDE_WAKEUP -#define HOTKNOT_BLOCK_RW 0 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON //report key as coordinate,Vibration feedback -//#define TPD_WARP_X -//#define TPD_WARP_Y - -#define GTP_DEBUG_ON 0 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) -#define FLASHLESS_FLASH_WORKROUND 0 - -#if GTP_COMPATIBLE_MODE -extern void force_reset_guitar(void); -#endif -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -/*TODO: puts the config info corresponded to your TP here, the following is just -a sample config, send this config should cause the chip cannot work normally*/ -#define CTP_CFG_GROUP1 {\ -0x42,0x20,0x03,0x00,0x05,0x05,0x38,0x06,\ -0x01,0x88,0x28,0x07,0x55,0x37,0x03,0x04,\ -0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x17,\ -0x19,0x20,0x14,0x8C,0x2E,0x0E,0x2B,0x29,\ -0xA0,0x0B,0x00,0x00,0x00,0x99,0x03,0x1D,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1A,0x42,0x94,0xC5,0x02,\ -0x05,0x00,0x00,0x04,0xB4,0x1C,0x00,0x97,\ -0x22,0x00,0x80,0x29,0x00,0x6C,0x32,0x00,\ -0x5D,0x3C,0x00,0x5D,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x28,0x28,0x03,0x06,0x00,\ -0x31,0x85,0x0D,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,\ -0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,\ -0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,\ -0x26,0x28,0x29,0x2A,0x00,0x02,0x04,0x06,\ -0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x60,0x01\ -} - -//default config for K82 - -#define CTP_CFG_GROUP1_CHARGER {\ -} - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2 {\ - } - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2_CHARGER {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3 {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3_CHARGER {\ - } - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - - -//STEP_2(REQUIRED):Change I/O define & I/O operation mode. -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -//STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG -#define GTP_MAX_HEIGHT 800 -#define GTP_MAX_WIDTH 480 -#define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1280 - #define GTP_MAX_WIDTH 800 -#define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 - -#define TPD_POWER_SOURCE_CUSTOM MT65XX_POWER_LDO_VGP6 //MT6323_POWER_LDO_VGP1 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY -#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.1<2014/01/10>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E -#define GTP_REG_HN_STATE 0xAB10 - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_HOTKNOT_CODE 0x20 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -#define HN_DEVICE_PAIRED 0x80 -#define HN_MASTER_DEPARTED 0x40 -#define HN_SLAVE_DEPARTED 0x20 -#define HN_MASTER_SEND 0x10 -#define HN_SLAVE_RECEIVED 0x08 - - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 -#define GTP_REG_REFRESH_RATE 0x8056 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - - -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define TPD_I2C_NUMBER 1 -#define I2C_MASTER_CLOCK 300 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -//#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_NORMAL {0,2559,0,-6557,0,5238784,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_FACTORY {0,2559,0,-6557,0,5238784,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - -//****************************PART4:UPDATE define******************************* -//Error no -#define ERROR_NO_FILE 2 //ENOENT -#define ERROR_FILE_READ 23 //ENFILE -#define ERROR_FILE_TYPE 21 //EISDIR -#define ERROR_GPIO_REQUEST 4 //EINTR -#define ERROR_I2C_TRANSFER 5 //EIO -#define ERROR_NO_RESPONSE 16 //EBUSY -#define ERROR_TIMEOUT 110 //ETIMEDOUT - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/Makefile b/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/tcl8127_tb_c_l/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/cust_acc.c deleted file mode 100644 index 88d72fb66f6..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/cust_alsps.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/dummyds.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.c deleted file mode 100644 index dc223652adc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,348 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - -u32 pinSetIdx = 0;//default main sensor - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - -u32 pinSet[2][8] = { - //for main sensor - {GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - {GPIO_CAMERA_CMRST1_PIN, - GPIO_CAMERA_CMRST1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - - - - - - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx){ - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) { - pinSetIdx = 1; - } - - - //power ON - if (On) { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx==0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5647_RAW, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D2 power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A2 power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } -#if 0 - while(1){ - - mdelay(2000); - PK_DBG("im sleep ...\n"); - } -#endif -#if 1 - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } -#endif - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2659_YUV, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - /* Enlarge the VCAMIO voltage to increase driving capability to avoid unexpected lines shown - VCAMIO 1.8V + 0.02V ~ 0.16V - 4'b1000: 160 mV - 4'b1001: 140 mV - 4'b1010: 120 mV - 4'b1011: 100 mV - 4'b1100: 80 mV - 4'b1101: 60 mV - 4'b1110: 40 mV - 4'b1111: 20 mV - */ - upmu_set_rg_vcam_io_cal(0x08); // 1.96V - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/combo_nand.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/common/combo_nand.h deleted file mode 100644 index 3a7677056c3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/combo_nand.h +++ /dev/null @@ -1,2 +0,0 @@ -#define COMBO_NAND_BLOCK_SIZE 4194304 -#define COMBO_NAND_PAGE_SIZE 16384 diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define.h deleted file mode 100644 index a47debbbbc4..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define.h +++ /dev/null @@ -1,140 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0)//(0xa8) - -#ifdef CONFIG_MTK_EMMC_SUPPORT -#define PART_NUM 25 -#else -extern int get_part_num_nand(); - -#define PART_NUM get_part_num_nand() -#endif - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info PartInfo[PART_MAX_COUNT]; - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define_private.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/pmt.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/common/pmt.h deleted file mode 100644 index 50a1bd4077a..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/common/pmt.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -#define REGION_LOW_PAGE 0x004C4F57 -#define REGION_FULL_PAGE 0x46554C4C -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region *///will be used as download type on L branch. xiaolei - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/board-custom.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/core/board-custom.h deleted file mode 100644 index e18a154ffd2..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -//#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/board.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/core/board.c deleted file mode 100644 index a5abb61b9a4..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mtk_nand_host_hw mtk_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/logger_custom.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/codegen.dws b/arch/arm/mach-mt8127/tpw8127_c_mlc/dct/dct/codegen.dws deleted file mode 100755 index a84fb6d6d9f0b285d8f306e2b9aa5472e60281d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23492 zcmeHP$#Ua15LNcQD*N&Yx!IbkWUd^NwpkWQg`(`tiT{&JJ~_c_@DWW2lsL9zk7j@> zq8q)uZZyC}w52j@?mk#77T=oVGjo*f%gg1Ti+>FZF&gQAfd;)6W2~F_hB{+(Y+S_E zxrF#oO!z?#`yULwUKe$@E{n9wi>mF`MP*a>IOw%~h-U&?2N@2?hP6rC_1=1EfDk`BP_o*bG|+HI zyWZs8<O>@~)*aDB|T4L3Az zKWElR%OS%7*>K@4&1Gue(*%JKG}Ndkh0P8x0@u+-CpU!+FO5gv;pqW)j)|v-PkT_r z0R|~CN%!R;vAyoGxQuHj=D<&li%3&7ppLcZODAM1UnprmMP+uL9r55ZT*0niH}%1t z$Sfr-uVW-qsCRe~xDGZ`nNtoMG>$X-{5{#lt8_VZ%1O{YaBCZ;~!8 zC$>2p0J^UcRNFv?z>xi7s60;&!PZ$7yqVAoR5v11#wn3f4!Rr7Ol?*)Mj<6CqmWV# zx?4yyx6pkO&O8{vrwl+l1fUH3aA7T$>1DUck|zq39t?!+{MkT;#@XnZSWQ1WQH(qK z_?Q@ve0zM#NXKZlh{Ob)!WF+BlRPm&MHc8F!torqk`8k-RJTB?b`HkqP`-LD8Wa2! zF68@g=}S9|bvuL$Tb&np$i%Ow#gjt z3n&Ax?CQaLI zo4>Q*vkJpV2FCpeq1rv6kl>+EIt4W$VZ}Gpod6dBnJajm7kJ3fXhUkHw*STuc|={M zWw*X>{N+BkYeUS}uHd=VfqN6w-^Uzd$C3xdSU154b;c;-+DgSb#5$k?=XQOF`JVQ= z&c9~h`Y?5kfEvrySz$)u|FZg5Zhg0GDxgIOuW8q@ntRH!e4H+72 zc!)rCzZqV?UcOo-o12M$_JSL6NOe5QG*zL59sW9Wz20=I>fpOk)?CK{5ar+z4-GQQ z^)gY6JLX0^AD39Z9qq?xHnjH9c$$a5KPD#V`+}=$03LHEeM}wRCftuP5!0}y%uDl- z`D5CHqJ{QD#I+2(gY`6y^ zCMw~o5cj9Qd*+W_6&)ArIlq3srK_UjVm*ds8WnZ4XfRMaZ=>^uPMEYq@bK8knp<^iF}h#p1$FQ1Ar4AUm8`p$;|&9 z7u80LwbR!|+t%CkrduafzA_^R2s^y*GT)Aac;t(E%9q(hqvu1-az_I!^UV^GGY8O# z#GgTow>kLAfuyJ>^$fXSWy9@i3OVwODd{6WeFm7sw!>SSd&(6Eo-J&>^(!`qd6`0r%@xpf=r}|l3 zkDe?^eDE*L_X+VEEQ<>}vcKiDxWM~0wb{+v#(g7L?@t@=CJ_P0UA@|t`F6edY8Yho zeYL=Qv8t}}2Qq+uB*dI z$Lbdg7Y@kSdS%`wz;%m&uc9`2THoc(Ytf9(C?H-XXW8 z9A~Gef*n+HmU@sf2kRD6({+_!wQdr?0AQL|ZQeLJb7+d|8)eQI=2r%F{{vk%cy<5) diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/Makefile deleted file mode 100755 index 6ec6676af91..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_eeprom.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.c deleted file mode 100644 index faafd31f13b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Driver for EEPROM - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd.h deleted file mode 100644 index b173ba13a12..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/dummy_lens.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter.h deleted file mode 100644 index 5ef80601aee..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 3009 -#define Q_MAX_POS_25 3009 -#define Q_MAX_POS_0 3009 -#define Q_MAX_NEG_10 3009 - -#define Q_MAX_POS_50_H_CURRENT 2975 -#define Q_MAX_POS_25_H_CURRENT 2975 -#define Q_MAX_POS_0_H_CURRENT 2975 -#define Q_MAX_NEG_10_H_CURRENT 2975 - - -/* Discharge Percentage */ -#define OAM_D5 1 // 1 : D5, 0: D2 - - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 60 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 70 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 60 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 5400 //90 * 60 = 90 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter_table.h deleted file mode 100644 index 9574fa0095c..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_battery_meter_table.h +++ /dev/null @@ -1,1068 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_charging.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_charging.h deleted file mode 100644 index fe4f1b2fafd..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_charging.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 50 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 47 -#define MIN_CHARGE_TEMPERATURE 0 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 6 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 150 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -//#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_diso.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pe.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pmic.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/rtc/rtc-mt.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/inc/ssw.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/sim_switch.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/goodix_tool.c deleted file mode 100644 index 7ebef7d3f39..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/goodix_tool.c +++ /dev/null @@ -1,829 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version:1.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#include -#include -#include /*proc*/ - -#include "tpd_custom_gt9xx.h" -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif -extern s32 gup_load_hotknot_system(void); -extern s32 gup_load_fx_system(void); -extern s32 gup_recovery_main_system(void); -extern s32 gup_load_main_system(char *filepath); - -#if 0 -static struct proc_dir_entry *goodix_proc_entry; -#endif - -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; - -#if HOTKNOT_BLOCK_RW -DECLARE_WAIT_QUEUE_HEAD(bp_waiter); -u8 got_hotknot_state = 0; -u8 got_hotknot_extra_state = 0; -u8 wait_hotknot_state = 0; -u8 force_wake_flag = 0; -#endif - -#define HOTKNOTNAME "hotknot" - -static ssize_t hotknot_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t hotknot_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static struct file_operations hotknot_fops = -{ -// .owner = THIS_MODULE, - .read = hotknot_read, - .write = hotknot_write, -}; - -static struct miscdevice hotknot_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = HOTKNOTNAME, - .fops = &hotknot_fops, -}; -static ssize_t goodix_tool_upper_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t goodix_tool_upper_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static const struct file_operations gt_tool_fops = { - .write = goodix_tool_upper_write, - .read = goodix_tool_upper_read, -}; - -static void tool_set_proc_name(char * procname) -{ -#if 1 - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); -#else - sprintf(procname, HOTKNOTNAME); -#endif - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); -#if 0 - goodix_proc_entry = create_proc_entry(procname, 0660, NULL); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - goodix_proc_entry->write_proc = goodix_tool_write; - goodix_proc_entry->read_proc = goodix_tool_read; - } -#else - if(proc_create(procname, 0660, NULL, >_tool_fops)== NULL) - { - GTP_ERROR("create_proc_entry %s failed", procname); - return -1; - } -#endif - -#if 1 // setting by hotknot feature - if (misc_register(&hotknot_misc_device)) - { - printk("mtk_tpd: hotknot_device register failed\n"); - return FAIL; - } -#endif - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[Write]tpd_halt =1 fail!"); - return FAIL; - } - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - GTP_DEBUG("wr :0x%02x.", cmd_head.wr); - /* - GTP_DEBUG("flag:0x%02x.", cmd_head.flag); - GTP_DEBUG("flag addr:0x%02x%02x.", cmd_head.flag_addr[0], cmd_head.flag_addr[1]); - GTP_DEBUG("flag val:0x%02x.", cmd_head.flag_val); - GTP_DEBUG("flag rel:0x%02x.", cmd_head.flag_relation); - GTP_DEBUG("circle :%d.", (s32)cmd_head.circle); - GTP_DEBUG("times :%d.", (s32)cmd_head.times); - GTP_DEBUG("retry :%d.", (s32)cmd_head.retry); - GTP_DEBUG("delay :%d.", (s32)cmd_head.delay); - GTP_DEBUG("data len:%d.", (s32)cmd_head.data_len); - GTP_DEBUG("addr len:%d.", (s32)cmd_head.addr_len); - GTP_DEBUG("addr:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - GTP_DEBUG("len:%d.", (s32)len); - GTP_DEBUG("buf[20]:0x%02x.", buff[CMD_HEAD_LENGTH]); - */ - - if (1 == cmd_head.wr) - { - // copy_from_user(&cmd_head.data[cmd_head.addr_len], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return FAIL; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (3 == cmd_head.wr) //Write ic type - { - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - return CMD_HEAD_LENGTH; - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - return CMD_HEAD_LENGTH; - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - - return CMD_HEAD_LENGTH; - } - -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return FAIL; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - ret = copy_from_user(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - GTP_DEBUG("update firmware, filename: %s", cmd_head.data); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return FAIL; - } - } - -#endif - else if (19 == cmd_head.wr) //load subsystem - { - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(0 == cmd_head.data[0]) - { - if (FAIL == gup_load_hotknot_system()) - { - return FAIL; - } - } - else if(1 == cmd_head.data[0]) - { - if (FAIL == gup_load_fx_system()) - { - return FAIL; - } - } - else if(2 == cmd_head.data[0]) - { - if (FAIL == gup_recovery_main_system()) - { - return FAIL; - } - } - else if(3 == cmd_head.data[0]) - { - if (FAIL == gup_load_main_system(NULL)) - { - return FAIL; - } - } - } -#if HOTKNOT_BLOCK_RW - else if (21 == cmd_head.wr) - { - u16 wait_hotknot_timeout = 0; - u8 rqst_hotknot_state; - - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], - &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - rqst_hotknot_state = cmd_head.data[GTP_ADDR_LENGTH]; - wait_hotknot_state |= rqst_hotknot_state; - wait_hotknot_timeout = (cmd_head.data[GTP_ADDR_LENGTH + 1]<<8) + - cmd_head.data[GTP_ADDR_LENGTH + 2]; - GTP_DEBUG("Goodix tool received wait polling state:0x%x,timeout:%d, all wait state:0x%x", - rqst_hotknot_state, wait_hotknot_timeout, wait_hotknot_state); - got_hotknot_state &= (~rqst_hotknot_state); - //got_hotknot_extra_state = 0; - switch(rqst_hotknot_state) - { - set_current_state(TASK_INTERRUPTIBLE); - case HN_DEVICE_PAIRED: - hotknot_paired_flag = 0; - wait_event_interruptible(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waiter failed.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_SEND: - case HN_SLAVE_RECEIVED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)) - { - return got_hotknot_extra_state; - } - else - { - GTP_ERROR("Wait 0x%x block polling waiter timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_DEPARTED: - case HN_SLAVE_DEPARTED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waitor timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - default: - GTP_ERROR("Invalid rqst_hotknot_state in goodix_tool."); - break; - } - force_wake_flag = 0; - } - else if(23 == cmd_head.wr) - { - GTP_DEBUG("Manual wakeup all block polling waiter!"); - got_hotknot_state = 0; - wait_hotknot_state = 0; - force_wake_flag = 1; - hotknot_paired_flag = 0; - wake_up_interruptible(&bp_waiter); - } -#endif - return CMD_HEAD_LENGTH; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data) -{ - u64 ret = 0; - - GTP_DEBUG_FUNC(); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[READ]tpd_halt =1 fail!"); - return FAIL; - } - if (cmd_head.wr % 2) - { - GTP_ERROR("[READ] invaild operator fail!"); - return FAIL; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= DATA_LENGTH; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return FAIL; - } - - ret = copy_to_user(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - } - else if (2 == cmd_head.wr) - { - // memcpy(page, "gt8", cmd_head.data_len); - // memcpy(page, "GT818", 5); - // page[5] = 0; - - GTP_DEBUG("Return ic type:%s len:%d.", page, (s32)cmd_head.data_len); - return cmd_head.data_len; - //return sizeof(IC_TYPE_NAME); - } - else if (4 == cmd_head.wr) - { - page[0] = show_len >> 8; - page[1] = show_len & 0xff; - page[2] = total_len >> 8; - page[3] = total_len & 0xff; - - return cmd_head.data_len; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - // memcpy(page, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - s32 tmp_len; - tmp_len = strlen(GTP_DRIVER_VERSION); - ret = copy_to_user(page, GTP_DRIVER_VERSION, tmp_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - page[tmp_len] = 0; - } - - return cmd_head.data_len; -} - - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_driver.c deleted file mode 100644 index cde964d3ccc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,3350 +0,0 @@ -#include "tpd.h" -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#include "cust_gpio_usage.h" - -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif -#include /*proc*/ - -extern struct tpd_device *tpd; -#ifdef VELOCITY_CUSTOM -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -#endif -static int tpd_flag = 0; -int tpd_halt = 0; -static int tpd_eint_mode=1; -static struct task_struct *thread = NULL; -static int tpd_polling_time=50; -extern u8 load_fw_process; - -static DECLARE_WAIT_QUEUE_HEAD(waiter); -DEFINE_MUTEX(i2c_access); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = TPD_KEYS; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -struct touch_vitual_key_map_t -{ - int point_x; - int point_y; -}; -static struct touch_vitual_key_map_t touch_key_point_maping_array[]=GTP_KEY_MAP_ARRAY; -#endif - -#if GTP_SLIDE_WAKEUP -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); -#endif - -#if GTP_CHARGER_SWITCH - extern kal_bool upmu_is_chr_det(void); - static void gtp_charger_switch(s32 dir_update); -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -//static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local_normal[8] = TPD_CALIBRATION_MATRIX_ROTATION_NORMAL; -static int tpd_def_calmat_local_factory[8] = TPD_CALIBRATION_MATRIX_ROTATION_FACTORY; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -static void tpd_on(void); -static void tpd_off(void); - -#ifdef GTP_CHARGER_DETECT -extern bool upmu_get_pchr_chrdet(void); -#define TPD_CHARGER_CHECK_CIRCLE 50 -static struct delayed_work gtp_charger_check_work; -static struct workqueue_struct *gtp_charger_check_workqueue = NULL; -static void gtp_charger_check_func(struct work_struct *); -static u8 gtp_charger_mode = 0; -#endif - - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -u8 esd_running = 0; -spinlock_t esd_lock; -#endif - -#if HOTKNOT_BLOCK_RW -u8 hotknot_paired_flag = 0; -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -#ifndef GTP_REG_REFRESH_RATE -#define GTP_REG_REFRESH_RATE 0x8056 -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#ifdef GTP_CHARGER_DETECT -static u8 config_charger[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#endif -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; -static u8 chip_gt9xxs = 0; // true if chip type is gt9xxs,like gt915s - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -u8 gtp_ref_retries = 0; -u8 gtp_clk_retries = 0; -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 gtp_clk_buf[6]; -u8 rqst_processing = 0; - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern s32 gup_load_main_system(char *filepath); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -u8 is_reseting = 0; -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -static struct proc_dir_entry *gt91xx_config_proc = NULL; - -#ifdef TPD_REFRESH_RATE -/******************************************************* -Function: - Write refresh rate - -Input: - rate: refresh rate N (Duration=5+N ms, N=0~15) - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static u8 gtp_set_refresh_rate(u8 rate) -{ - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff, rate}; - - if (rate > 0xf) - { - GTP_ERROR("Refresh rate is over range (%d)", rate); - return FAIL; - } - - GTP_INFO("Refresh rate change to %d", rate); - return gtp_i2c_write(i2c_client_point, buf, sizeof(buf)); -} - -/******************************************************* -Function: - Get refresh rate - -Output: - Refresh rate or error code -*******************************************************/ -static u8 gtp_get_refresh_rate(void) -{ - int ret; - - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff}; - ret = gtp_i2c_read(i2c_client_point, buf, sizeof(buf)); - if (ret < 0) - return ret; - - GTP_INFO("Refresh rate is %d", buf[GTP_ADDR_LENGTH]); - return buf[GTP_ADDR_LENGTH]; -} - -//============================================================= -static ssize_t show_refresh_rate(struct device *dev,struct device_attribute *attr, char *buf) -{ - int ret = gtp_get_refresh_rate(); - if (ret < 0) - return 0; - else - return sprintf(buf, "%d\n", ret); -} -static ssize_t store_refresh_rate(struct device *dev,struct device_attribute *attr, const char *buf, size_t size) -{ - //u32 rate = 0; - gtp_set_refresh_rate(simple_strtoul(buf, NULL, 16)); - return size; -} -static DEVICE_ATTR(tpd_refresh_rate, 0664, show_refresh_rate, store_refresh_rate); - -static struct device_attribute *gt9xx_attrs[] = -{ - &dev_attr_tpd_refresh_rate, -}; -#endif -//============================================================= - - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - -static int gt91xx_config_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i, len, err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - - ptr = page; - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - /* Touch PID & VID */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== GT9XX Version ID ====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_VERSION, temp_data, 6); - ptr += sprintf(ptr, "Chip PID: %c%c%c VID: 0x%02X%02X\n", temp_data[0], temp_data[1], temp_data[2], temp_data[5], temp_data[4]); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW_fl[12], gtp_default_FW_fl[13]); - } - else - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); - } -#else - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); -#endif - i2c_read_bytes(i2c_client_point, 0x41E4, temp_data, 1); - ptr += sprintf(ptr, "Boot status 0x%X\n", temp_data[0]); - - /* Touch Status and Clock Gate */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== Touch Status and Clock Gate ====\n"); - ptr += sprintf(ptr, "status: 1: on, 0 :off\n"); - ptr += sprintf(ptr, "status:%d\n", (tpd_halt+1)&0x1); - - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; - - //return (ptr - page); -} - -static int gt91xx_config_write_proc(struct file *file, const char *buffer, size_t count, loff_t *ppos) -{ - s32 ret = 0; - char temp[25] = {0}; // for store special format cmd - char mode_str[15] = {0}; - unsigned int mode; - u8 buf[1]; - - GTP_DEBUG("write count %ld\n", (unsigned long)count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%ld]", GTP_CONFIG_MAX_LENGTH, (unsigned long)count); - return -EFAULT; - } - - /**********************************************/ - /* for store special format cmd */ - if (copy_from_user(temp, buffer, sizeof(temp))) - { - GTP_ERROR("copy from user fail 2"); - return -EFAULT; - } - sscanf(temp, "%s %d", (char *)&mode_str, &mode); - - /***********POLLING/EINT MODE switch****************/ - if(strcmp(mode_str, "polling") == 0) - { - if(mode>=10&&mode<=200) - { - GTP_INFO("Switch to polling mode, polling time is %d",mode); - tpd_eint_mode=0; - tpd_polling_time=mode; - tpd_flag = 1; - wake_up_interruptible(&waiter); - } - else - { - GTP_INFO("Wrong polling time, please set between 10~200ms"); - } - return count; - } - if(strcmp(mode_str, "eint") == 0) - { - GTP_INFO("Switch to eint mode"); - tpd_eint_mode=1; - return count; - } - /**********************************************/ - if(strcmp(mode_str, "switch") == 0) - { - if(mode == 0)// turn off - tpd_off(); - else if(mode == 1)//turn on - tpd_on(); - else - GTP_ERROR("error mode :%d", mode); - return count; - } - //force clear config - if(strcmp(mode_str, "clear_config") == 0) - { - GTP_INFO("Force clear config"); - buf[0] = 0x10; - ret = i2c_write_bytes(i2c_client_point, GTP_REG_SLEEP, buf, 1); - return count; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - /***********clk operate reseved****************/ - /**********************************************/ - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_DEBUG("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - if (buf[5] == 'S' || buf[5] == 's') - { - chip_gt9xxs = 1; - } - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing; - } - else - #endif - { - gtp_get_info(client); - } - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(100); // for dbl-system -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = (int)gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return ret; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - } - gtp_chip_type = CHIP_TYPE_GT9; // for test - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("[gtp_bak_ref_proc]Alloc memory for ref failed.use default ref"); - return FAIL; - } - memset(refp, 0, ref_len); - if(gtp_ref_retries >= GTP_CHK_FS_MNT_MAX) - { - for (j = 0; j < ref_grps; ++j) - { - refp[ref_seg_len + j * ref_seg_len -1] = 0x01; - } - ret = i2c_write_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Write ref i2c error."); - ret = FAIL; - } - - GTP_ERROR("[gtp_bak_ref_proc]Bak file or path is not exist,send default ref."); - ret = SUCCESS; - goto exit_ref_proc; - } - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0660); - if (IS_ERR(flp)) - { - GTP_ERROR("[gtp_bak_ref_proc]Ref File not found!Creat ref file."); - //flp->f_op->llseek(flp, 0, SEEK_SET); - //flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - gtp_ref_retries++; - ret = FAIL; - goto exit_ref_proc; - } - else if(GTP_BAK_REF_SEND == mode) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref file failed."); - memset(refp, 0, ref_len); - } - } - - if(GTP_BAK_REF_STORE == mode) - { - ret = i2c_read_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref i2c error."); - ret = FAIL; - goto exit_ref_proc; - } - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - else - { - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; i 120) || - (gtp_clk_buf[i] != gtp_clk_buf[0])) - { - break; - } - clk_chksum += gtp_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_INFO("Clk ram legality check success"); - return SUCCESS; - } - GTP_ERROR("main clock freq in clock buf is wrong"); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - struct file *flp = NULL; - - //check clk legality - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - goto send_main_clk; - } - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("[gtp_main_clk_proc]cal clk result is illegitimate"); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - - if (IS_ERR(flp)) - { - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - } - else - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - goto exit_clk_proc; - } - - ret = SUCCESS; - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -#endif -//************* For GT9XXF End **********************// - -static const struct file_operations gt_upgrade_proc_fops = { - .write = gt91xx_config_write_proc, - .read = gt91xx_config_read_proc -}; - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - -//#ifdef VELOCITY_CUSTOM - #if 0 - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#ifdef VELOCITY_CUSTOM - tpd_v_magnify_x = TPD_VELOCITY_CUSTOM_X; - tpd_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; - -#endif - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0660, NULL, >_upgrade_proc_fops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_INFO(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif -#if GTP_SLIDE_WAKEUP - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); -#endif - -#if GTP_WITH_PEN - // pen support - __set_bit(BTN_TOOL_PEN, tpd->dev->keybit); - __set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); - //__set_bit(INPUT_PROP_POINTER, tpd->dev->propbit); // 20130722 -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; - - return 0; -} - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void) -{ - s32 i = 0; - s32 ret = 0; - //static u8 is_reseting = 0; - - if(is_reseting || (load_fw_process == 1)) - { - return; - } - GTP_INFO("force_reset_guitar"); - is_reseting = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - for (i = 0; i < 5; i++) - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - //check code ram - ret = gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - } - else - #endif - { - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - is_reseting = 0; - -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[2] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - if(1 == load_fw_process) - { - GTP_INFO("Load FW process is runing"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - memset(esd_buf, 0x01, sizeof(esd_buf)); - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, sizeof(esd_buf)); - msleep(50); - force_reset_guitar(); - } - } - -#if FLASHLESS_FLASH_WORKROUND - { - u8 versionBuff[6]; - int retry = 0; - u8 temp = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - //match pid - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - temp = versionBuff[5]; - versionBuff[5] = versionBuff[4]; - versionBuff[4] = temp; - //match vid - if( memcmp(&versionBuff[4], >p_default_FW_fl[12], 2) !=0 ) - { - continue; - } - break; - } - if(retry>=3) - { - GTP_INFO("IC version error., force reset!"); - force_reset_guitar(); - } - } -#endif - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif -static int tpd_history_x=0, tpd_history_y=0; -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(x, y, x, y, id, 1); - tpd_history_x=x; - tpd_history_y=y; - - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 1, x+y); -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - //input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); - input_report_key(tpd->dev, BTN_TOUCH, 0); - //input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(tpd_history_x, tpd_history_y, tpd_history_x, tpd_history_y, id, 0); - tpd_history_x=0; - tpd_history_y=0; - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 0, x+y); - -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - - chr_status = upmu_is_chr_det(); - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -/*Coordination mapping*/ -static void tpd_calibrate_driver(int *x, int *y) -{ - int tx; - - GTP_DEBUG("Call tpd_calibrate of this driver ..\n"); - - tx = ( (tpd_def_calmat[0] * (*x)) + (tpd_def_calmat[1] * (*y)) + (tpd_def_calmat[2]) ) >> 12; - *y = ( (tpd_def_calmat[3] * (*x)) + (tpd_def_calmat[4] * (*y)) + (tpd_def_calmat[5]) ) >> 12; - *x = tx; -} - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#if HOTKNOT_BLOCK_RW - u8 hn_pxy_state = 0; - u8 hn_pxy_state_bak = 0; - u8 hn_paired_cnt = 0; - u8 hn_state_buf[10] = {(u8)(GTP_REG_HN_STATE>> 8), (u8)(GTP_REG_HN_STATE & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - -#if GTP_SLIDE_WAKEUP - u8 doze_buf[3] = {0x81, 0x4B}; -#endif - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - if(tpd_eint_mode) - { - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - } - else - { - msleep(tpd_polling_time); - } - - set_current_state(TASK_RUNNING); - mutex_lock(&i2c_access); - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if (0xAA == doze_buf[2]) - { - GTP_INFO("Forward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xBB == doze_buf[2]) - { - GTP_INFO("Backward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - - } - else if (0xC0 == (doze_buf[2] & 0xC0)) // double click wakeup - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - #endif - if(tpd_halt||(is_reseting == 1) || (load_fw_process == 1)) - { - mutex_unlock(&i2c_access); - GTP_DEBUG("return for interrupt after suspend... "); - continue; - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - switch(rqst_data[2]&0x0F) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - case GTP_RQST_RESET: - GTP_INFO("Request Reset."); - gtp_recovery_reset(i2c_client_point); - goto exit_work_func; - case GTP_RQST_HOTKNOT_CODE: - GTP_INFO("Request HotKnot Code."); - gup_load_hotknot_system(); - goto exit_work_func; - default: - break; - } - } - #endif - - if ((finger & 0x80) == 0) - { - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag) - #endif - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - GTP_ERROR("buffer not ready"); - continue; - } - } - - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag && (finger&0x0F)) - { - id = point_data[GTP_ADDR_LENGTH+1]; - hn_pxy_state = point_data[GTP_ADDR_LENGTH+2]&0x80; - hn_pxy_state_bak = point_data[GTP_ADDR_LENGTH+3]&0x80; - if((32 == id) && (0x80 == hn_pxy_state) && (0x80 == hn_pxy_state_bak)) - { - #ifdef HN_DBLCFM_PAIRED - if(hn_paired_cnt++ < 2) - { - goto exit_work_func; - } - #endif - GTP_DEBUG("HotKnot paired!"); - if(wait_hotknot_state & HN_DEVICE_PAIRED) - { - GTP_DEBUG("INT wakeup HN_DEVICE_PAIRED block polling waiter"); - got_hotknot_state |= HN_DEVICE_PAIRED; - wake_up_interruptible(&bp_waiter); - } - hotknot_paired_flag = 1; - goto exit_work_func; - } - else - { - got_hotknot_state &= (~HN_DEVICE_PAIRED); - hn_paired_cnt = 0; - } - - } - - if(hotknot_paired_flag) - { - ret = gtp_i2c_read(i2c_client_point, hn_state_buf, 6); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - - got_hotknot_state = 0; - - GTP_DEBUG("[0xAB10~0xAB13]=0x%x,0x%x,0x%x,0x%x", hn_state_buf[GTP_ADDR_LENGTH], - hn_state_buf[GTP_ADDR_LENGTH+1], - hn_state_buf[GTP_ADDR_LENGTH+2], - hn_state_buf[GTP_ADDR_LENGTH+3]); - - if(wait_hotknot_state & HN_MASTER_SEND) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH])) - { - GTP_DEBUG("Wakeup HN_MASTER_SEND block polling waiter"); - got_hotknot_state |= HN_MASTER_SEND; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_RECEIVED) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH+1])) - { - GTP_DEBUG("Wakeup HN_SLAVE_RECEIVED block polling waiter:0x%x", hn_state_buf[GTP_ADDR_LENGTH+1]); - got_hotknot_state |= HN_SLAVE_RECEIVED; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH+1]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_MASTER_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Wakeup HN_MASTER_DEPARTED block polling waiter"); - got_hotknot_state |= HN_MASTER_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH+1]) - { - GTP_DEBUG("Wakeup HN_SLAVE_DEPARTED block polling waiter"); - got_hotknot_state |= HN_SLAVE_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - } - - #endif - - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - GTP_ERROR("Bad number of fingers!"); - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - -#if GTP_HAVE_TOUCH_KEY - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - for (i = 0; i < TPD_KEY_COUNT; i++) - { - //input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - if( key_value&(0x01<dev, BTN_TOOL_PEN, 1); - pre_pen = 1; - id = 0; - } - #endif - GTP_DEBUG(" %d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - else if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - input_report_key(tpd->dev, BTN_TOOL_PEN, 0); - pre_pen = 0; - } - #endif - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - else - { - GTP_DEBUG("Additional Eint!"); - } - pre_touch = touch_num; - - if (tpd != NULL && tpd->dev != NULL) - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_INFO("I2C write end_cmd error!"); - } - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_INFO("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_INFO("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_INFO("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH-1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - //memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - //memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); - if (FACTORY_BOOT == get_boot_mode()) - { - TPD_DEBUG("Factory mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_factory, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_factory, 8 * 4); - } - else - { - TPD_DEBUG("Normal mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_normal, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_normal, 8 * 4); - } -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_INFO("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -#if GTP_SLIDE_WAKEUP -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); -#if GTP_DBL_CLK_WAKEUP - i2c_control_buf[2] = 0x09; -#endif - - GTP_DEBUG("entering doze mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("failed to set doze flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_DEBUG("GTP has been working in doze mode!"); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send doze cmd failed."); - return ret; -} - -#else -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif - -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} -#endif - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if (GTP_POWER_CTRL_SLEEP) - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("Esd recovery wakeup."); - return 0; - } -#endif - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 opr_buf[2] = {0}; - - while (retry++ < 10) - { - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); - msleep(5); - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) - { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) - { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(); - } - if (retry >= 10) - { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(); - } - GTP_ERROR("GTP wakeup sleep failed."); - return ret; - } -#endif - while (retry++ < 10) - { - #if GTP_SLIDE_WAKEUP - if (DOZE_WAKEUP != doze_status) - { - GTP_DEBUG("power wakeup, reset guitar"); - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - } - else - { - GTP_DEBUG("slide(double click) wakeup, no reset guitar"); - doze_status = DOZE_DISABLED; - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #else -// if (chip_gt9xxs == 1) -// { -// gtp_reset_guitar(client, 10); -// } -// else -// { -// GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); -// msleep(5); -// } - - //GTP_GPIO_AS_INT(GTP_INT_PORT); - gtp_reset_guitar(client, 20); // for double-system, reset to default system - - return 2; - #endif - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - #if (!GTP_SLIDE_WAKEUP) - if (chip_gt9xxs == 0) - { - gtp_int_sync(25); - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #endif - - return ret; - } - gtp_reset_guitar(client, 20); - } -#endif - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - u8 buf[3] = {0x81, 0xaa, 0}; - -#ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - return ; - } -#endif - -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - - mutex_lock(&i2c_access); - - gtp_i2c_read(i2c_client_point,buf,sizeof(buf)); - if(buf[2] == 0x55) - { - mutex_unlock(&i2c_access); - GTP_INFO("GTP early suspend pair sucess"); - return; - } - tpd_halt = 1; - - mutex_unlock(&i2c_access); -#if GTP_ESD_PROTECT - cancel_delayed_work_sync(>p_esd_check_work); -#endif - -#ifdef GTP_CHARGER_DETECT - cancel_delayed_work_sync(>p_charger_check_work); -#endif - mutex_lock(&i2c_access); - -#if GTP_SLIDE_WAKEUP - ret = gtp_enter_doze(i2c_client_point); -#else - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } -#endif - mutex_unlock(&i2c_access); - - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - printk("mtk-tpd: %s start\n", __FUNCTION__); -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - if(load_fw_process == 0) - { - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - //gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - -#if GTP_SLIDE_WAKEUP - doze_status = DOZE_DISABLED; -#else - mutex_lock(&i2c_access); - tpd_halt = 0; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); -#endif - -#if GTP_ESD_PROTECT - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); -#endif - -#ifdef GTP_CHARGER_DETECT - queue_delayed_work(gtp_charger_check_workqueue, >p_charger_check_work, clk_tick_cnt); -#endif - printk("mtk-tpd: %s end\n", __FUNCTION__); -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -static void tpd_off(void) -{ - -#ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); -#else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); -#endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - GTP_INFO("GTP enter sleep!"); - - tpd_halt = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -} - -static void tpd_on(void) -{ - s32 ret = -1, retry = 0; - - while (retry++ < 5) - { - ret = tpd_power_on(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - } - - ret = gtp_send_cfg(i2c_client_point); - - if (ret > 0) - { - GTP_DEBUG("Wakeup sleep send config success."); - } - } - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - tpd_halt = 0; -} - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#if defined(TPD_I2C_NUMBER) - i2c_register_board_info(TPD_I2C_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_firmware.h deleted file mode 100644 index 21c067ead60..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]9150 -*[VID]1010 -*[GENERATED]2013/11/16 20:59:13 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { -}; - -unsigned char gtp_default_FW_hotknot[] = { -}; - -unsigned char gtp_default_FW_hotknot2[] = { -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_update.c deleted file mode 100644 index 1949bbc0a0d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3986 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.0 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_LINK_LENGTH 0x3000 // 12k -#define FW_APP_CODE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define FIRMWARE_LENGTH (FW_SS51_LENGTH + FW_DSP_LENGTH + FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH + FW_APP_CODE_LENGTH) - -#define FW_HOTKNOT_LENGTH 0x3000 -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#define FAIL 0 -#define SUCCESS 1 - -#define MAIN_SYSTEM_PATH "/sdcard/goodix/_main_.bin" -#define HOTKNOT_SYSTEM_PATH "/sdcard/goodix/_hotknot_.bin" -#define FX_SYSTEM_PATH "/sdcard/goodix/_authorization_.bin" - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -extern struct mutex i2c_access; -u8 searching_file = 0; -u8 got_file_flag = 0; -u8 load_fw_process = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_recovery_main_system(void); -s32 gup_load_main_system(char *filepath); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -char * gup_load_fw_from_file(char *filepath); -s32 gup_load_system(char *firmware, s32 length, u8 need_check); -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_INFO("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("User layer reset GT9XXF."); - return; - } -#endif - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - if ((update_msg.fw_total_len < 36*1024) || (update_msg.fw_total_len > 128*1024)) - { - GTP_ERROR("Invalid firmware length(%d), update aborted!", update_msg.fw_total_len); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_INFO("[check_update_file]default firmware array is INVALID!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware with checksum(0x%04X)", fw_checksum & 0xFFFF); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - goto load_failed; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - goto load_failed; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - goto load_failed; - } - - return SUCCESS; - -load_failed: - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - - if (retry > MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - - burn_length += frame_length; - burn_addr += frame_length; - } - - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_DEBUG("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_boot_isp]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_LINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_LINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_LINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_app_code(struct i2c_client *client) -{ - u8* fw_app_code = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the app code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_fw_app_code]Begin burn app_code firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_app_code]step1:alloc memory"); - while(retry++ < 5) - { - fw_app_code = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_app_code == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_app_code]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_app_code]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_app_code]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_app_code, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_app_code]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_app_code]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_app_code, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_app_code]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_app_code]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_app_code, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_app_code]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_app_code]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_app_code, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_app_code]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - update_msg.fw_burned_len += FW_APP_CODE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_app_code: - kfree(fw_app_code); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8 *)dir); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - GTP_DEBUG("[update_proc]Burned length:%d", update_msg.fw_burned_len); - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 50; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 60; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 80; - ret = gup_burn_fw_app_code(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 90; - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 95; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE && GTP_AUTO_UPDATE_CFG) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("Update config failed!"); - } - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - return FAIL; - } - else - { - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - else - { - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_INFO("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_INFO("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - if (NULL != dir) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; - -download_fail: - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - - -#define BANK_LENGTH (16*1024) -#define FIRMWARE_HEADER_LEN 14 - -static u32 current_system_length = 0; - -char * gup_load_fw_from_file(char *filepath) -{ - struct file *fw_file = NULL; - mm_segment_t old_fs; - long len = 0; - char *buffer = NULL; - - if(filepath == NULL) - { - GTP_ERROR("[Load_firmware]filepath: NULL"); - goto load_firmware_exit; - } - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - fw_file = filp_open(filepath, O_RDONLY, 0); - if (fw_file == NULL || IS_ERR(fw_file)) - { - GTP_ERROR("[Load_firmware]Failed to open: %s", filepath); - goto load_firmware_exit; - } - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - len = fw_file->f_op->llseek(fw_file, 0, SEEK_END); - if(len<1024) - { - GTP_ERROR("[Load_firmware]Firmware is too short: %ld", len); - goto load_firmware_failed; - } - buffer = (char *)kmalloc(sizeof(char) * len, GFP_KERNEL); - if(buffer == NULL) - { - GTP_ERROR("[Load_firmware]Failed to allocate buffer: %ld", len); - goto load_firmware_failed; - } - - memset(buffer, 0, sizeof(char) * len); - - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - fw_file->f_op->read(fw_file, buffer, len, &fw_file->f_pos); - - GTP_ERROR("[Load_firmware]Load from file success: %ld %s", len, filepath); - - -load_firmware_failed: - filp_close(fw_file, NULL); - set_fs(old_fs); - -load_firmware_exit: - return buffer; -} - -s32 gup_check_firmware(char *fw, u32 length) -{ - u32 i = 0; - u32 fw_checksum = 0; - u16 temp; - - for(i=0; i 0) - { - u32 len = length >BANK_LENGTH? BANK_LENGTH:length; - ret = gup_load_by_bank(bank, need_check, &firmware[bank*BANK_LENGTH], len); - if(FAIL == ret) - { - goto gup_load_system_exit; - } - GTP_DEBUG("load bank%d length:%d success.", bank, len); - bank++; - length -= len; - } - - ret = gtp_fw_startup(i2c_client_point); - -gup_load_system_exit: -#if GTP_ESD_PROTECT -#if FLASHLESS_FLASH_WORKROUND - -#else - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif -#endif - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return ret; -} - -s32 gup_load_fx_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_fx_system] Load authorization system."); - - firmware = gtp_default_FW_hotknot2; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( FX_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot2; - GTP_INFO("[load_fx_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_fx_system]firmware's length is invalid."); - goto load_fx_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_fx_system]firmware's checksum is error."); - goto load_fx_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - -load_fx_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} - - -s32 gup_load_hotknot_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - load_fw_process = 1; - /* - if(gtp_chip_type == CHIP_TYPE_GT9) - { - u8 retry = 0; - u8 wr_buf[3] = {0x80, 0x46, 0x22}; - u8 rd_buf[4] = {0x81, 0xA8, 0x00, 0x00}; - while(retry++ < 10) - { - wr_buf[1] = 0x46; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - wr_buf[1] = 0x40; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - msleep(50); - ret = gup_i2c_read(i2c_client_point, rd_buf, sizeof(rd_buf)); - if(ret <= 0) - { - continue; - } - if(rd_buf[GTP_ADDR_LENGTH] == 0xAA && - rd_buf[GTP_ADDR_LENGTH] == rd_buf[GTP_ADDR_LENGTH + 1]) - { - GTP_INFO("[load_hotknot_system]Hotknot switch system success."); - return SUCCESS; - } - } - GTP_ERROR("[load_hotknot_system]Hotknot switch system failed."); - return FAIL; - } - */ - GTP_INFO("[load_hotknot_system] Load hotknot system."); - - firmware = gtp_default_FW_hotknot; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( HOTKNOT_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot; - GTP_INFO("[load_hotknot_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_hotknot_system]firmware's length is invalid."); - goto load_hotknot_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_hotknot_system]firmware's checksum is error."); - goto load_hotknot_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 0); - -load_hotknot_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; - -} - - -s32 gup_recovery_main_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[recovery_main_system] Recovery main system."); - - if(gtp_chip_type == CHIP_TYPE_GT9) - { - gtp_reset_guitar(i2c_client_point,10); - load_fw_process = 0; - return SUCCESS; - } - - firmware = gtp_default_FW_fl; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(MAIN_SYSTEM_PATH); - if(firmware == NULL) - { - firmware = gtp_default_FW_fl; - GTP_INFO("[recovery_main_system]Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - } - if(length > 36*1024 || length < 16*1024 ) - { - GTP_ERROR("[recovery_main_system]firmware's length is invalid."); - goto recovery_main_system_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[recovery_main_system]firmware's checksum is error."); - goto recovery_main_system_exit; - } - - if(current_system_length == 0) - { - current_system_length = length; - } - - GTP_INFO("[recovery_main_system] Recovery length: %d.", current_system_length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], current_system_length, 0); - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -recovery_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - load_fw_process = 0; - return ret; - -} - -s32 gup_load_main_system(char *filepath) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_main_system] Load main system."); - - if(filepath != NULL) - { - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - GTP_INFO("[load_main_system]can not open file: %s", filepath); - goto load_main_system_exit; - } - else - { - is_load_from_file = 1; - } - } - else - { - firmware = gtp_default_FW_fl; - } -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - if(gtp_chip_type == CHIP_TYPE_GT9) - firmware = gtp_default_FW; - else - firmware = gtp_default_FW_fl; - GTP_INFO("[load_main_system]Use default firmware. type:%d", gtp_chip_type); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 36*1024) - { - length = 36*1024; - } - } - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_main_system]firmware's checksum is error."); - goto load_main_system_exit; - } - GTP_INFO("[load_main_system] Firmware length: %d.", length); - - //memcpy(gtp_default_FW_fl, firmware, length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - show_len = 100; - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -load_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/mtk_tpd.c deleted file mode 100644 index 91b7ffb872e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,450 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index 4749c861fc5..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,409 +0,0 @@ -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -struct goodix_ts_data -{ - spinlock_t irq_lock; - struct i2c_client *client; - struct input_dev *input_dev; - struct hrtimer timer; - struct work_struct work; - struct early_suspend early_suspend; - s32 irq_is_disable; - s32 use_irq; - u16 abs_x_max; - u16 abs_y_max; - u8 max_touch_num; - u8 int_trigger_type; - u8 green_wake_mode; - u8 chip_type; - u8 enter_update; - u8 gtp_is_suspend; - u8 gtp_rawdiff_mode; -}; - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; -extern u8 load_fw_process; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern u8 wait_hotknot_state; -extern u8 got_hotknot_state; -extern u8 got_hotknot_extra_state; -extern u8 hotknot_paired_flag; -extern wait_queue_head_t bp_waiter; -extern s32 gup_load_hotknot_system(void); - -extern unsigned char gtp_default_FW[]; -extern unsigned char gtp_default_FW_fl[]; -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 //driver send config to TP on intilization (for no config built in TP flash) -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 1 //turn off power on suspend -#define GTP_AUTO_UPDATE 1 //update FW to TP FLASH -#define GTP_CHANGE_X2Y 0 //set for se1 -#define GTP_HEADER_FW_UPDATE 1 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 1 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF - -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 0 // esd protection with a cycle of 2 seconds -#define GUP_USE_HEADER_FILE 0 -#define GTP_FW_DOWNLOAD 0 //update FW to TP SRAM -//#define GTP_CHARGER_DETECT - -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect -#define GTP_WITH_PEN 0 -#define GTP_SLIDE_WAKEUP 0 -#define GTP_DBL_CLK_WAKEUP 0 // double-click wakup, function together with GTP_SLIDE_WAKEUP -#define HOTKNOT_BLOCK_RW 0 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON //report key as coordinate,Vibration feedback -//#define TPD_WARP_X -//#define TPD_WARP_Y - -#define GTP_DEBUG_ON 0 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) -#define FLASHLESS_FLASH_WORKROUND 0 - -#if GTP_COMPATIBLE_MODE -extern void force_reset_guitar(void); -#endif -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -/*TODO: puts the config info corresponded to your TP here, the following is just -a sample config, send this config should cause the chip cannot work normally*/ -#define CTP_CFG_GROUP1 {\ -0x41,0x20,0x03,0x00,0x05,0x05,0x38,0x06,\ -0x01,0x0F,0x28,0x07,0x55,0x37,0x03,0x05,\ -0x00,0x00,0x00,0x00,0x11,0x11,0x05,0x0C,\ -0x0E,0x0F,0x0B,0x8C,0x2E,0x0E,0x2F,0x2D,\ -0x7F,0x08,0x00,0x00,0x00,0x9A,0x02,0x1D,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x24,0x5A,0x94,0xC5,0x02,\ -0x05,0x00,0x00,0x04,0xD9,0x27,0x00,0xB6,\ -0x2F,0x00,0x99,0x39,0x00,0x85,0x44,0x00,\ -0x73,0x52,0x00,0x73,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1A,0x0D,0x03,0x06,0x00,\ -0x21,0x43,0x06,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,\ -0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,\ -0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,\ -0x26,0x28,0x29,0x2A,0x00,0x02,0x04,0x06,\ -0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x6E,0x01,\ -} - -//default config for K82 - -#define CTP_CFG_GROUP1_CHARGER {\ -} - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2 {\ - } - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2_CHARGER {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3 {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3_CHARGER {\ - } - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - - -//STEP_2(REQUIRED):Change I/O define & I/O operation mode. -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -//STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG -#define GTP_MAX_HEIGHT 800 -#define GTP_MAX_WIDTH 480 -#define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1280 - #define GTP_MAX_WIDTH 800 -#define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 - -#define TPD_POWER_SOURCE_CUSTOM MT65XX_POWER_LDO_VGP6 //MT6323_POWER_LDO_VGP1 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY -#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.1<2014/01/10>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E -#define GTP_REG_HN_STATE 0xAB10 - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_HOTKNOT_CODE 0x20 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -#define HN_DEVICE_PAIRED 0x80 -#define HN_MASTER_DEPARTED 0x40 -#define HN_SLAVE_DEPARTED 0x20 -#define HN_MASTER_SEND 0x10 -#define HN_SLAVE_RECEIVED 0x08 - - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 -#define GTP_REG_REFRESH_RATE 0x8056 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - - -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define TPD_I2C_NUMBER 1 -#define I2C_MASTER_CLOCK 300 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -//#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_NORMAL {0,2559,0,-6557,0,5238784,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_FACTORY {0,2559,0,-6557,0,5238784,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - -//****************************PART4:UPDATE define******************************* -//Error no -#define ERROR_NO_FILE 2 //ENOENT -#define ERROR_FILE_READ 23 //ENFILE -#define ERROR_FILE_TYPE 21 //EISDIR -#define ERROR_GPIO_REQUEST 4 //EINTR -#define ERROR_I2C_TRANSFER 5 //EIO -#define ERROR_NO_RESPONSE 16 //EBUSY -#define ERROR_TIMEOUT 110 //ETIMEDOUT - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/Makefile b/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_c_mlc/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/cust_acc.c deleted file mode 100644 index 88d72fb66f6..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/cust_alsps.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/dummyds.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.c deleted file mode 100644 index 63512557674..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,335 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - -u32 pinSetIdx = 0;//default main sensor - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - -u32 pinSet[2][8] = { - //for main sensor - {GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - {GPIO_CAMERA_CMRST1_PIN, - GPIO_CAMERA_CMRST1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - - - - - - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx){ - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) { - pinSetIdx = 1; - } - - - //power ON - if (On) { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if ((pinSetIdx==0) && currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5647_RAW, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D2 power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable D power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable A2 power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } -#if 0 - while(1){ - - mdelay(2000); - PK_DBG("im sleep ...\n"); - } -#endif -#if 1 - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } -#endif - } - else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2659_YUV, currSensorName))) - { - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin,active low - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin,high - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - //DOVDD - PK_DBG("[ON_general 1.8V]sensorIdx:%d \n",SensorIdx); - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //AVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - //DVDD - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1500,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - //return -EIO; - //goto _kdCISModulePowerOn_exit_; - } - mdelay(5); - - #if 0 - // AF_VCC - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A2, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - //return -EIO; - goto _kdCISModulePowerOn_exit_; - } - #endif - - //enable active sensor - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(5); - - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - mdelay(5); - } - - - //disable inactive sensor - if(pinSetIdx == 0 || pinSetIdx == 2) {//disable sub - if (GPIO_CAMERA_INVALID != pinSet[1][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[1][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMRST],pinSet[1][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[1][IDX_PS_CMPDN],pinSet[1][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - else { - if (GPIO_CAMERA_INVALID != pinSet[0][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[0][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMRST],pinSet[0][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[0][IDX_PS_CMPDN],pinSet[0][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - } - - - } - } - else {//power OFF - - //PK_DBG("[OFF]sensorIdx:%d \n",SensorIdx); - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A2,mode_name)){ - PK_DBG("[CAMERA SENSOR] Fail to OFF a2 power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define.h deleted file mode 100644 index 8a2504f5206..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0xa8) - - -#define PART_NUM 25 - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info *PartInfo; - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define_private.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/pmt.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/pmt.h deleted file mode 100644 index 23504536328..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/common/pmt.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board-custom.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board-custom.h deleted file mode 100644 index 93d88239e1e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board.c deleted file mode 100644 index 1ad05f7eec7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR |MSDC_SD_NEED_POWER, - -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mt6575_nand_host_hw mt6575_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/logger_custom.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/codegen.dws b/arch/arm/mach-mt8127/tpw8127_tb_c_l/dct/dct/codegen.dws deleted file mode 100755 index 02e46f5bebf0df1783202f7a0d41d3639a889fc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23493 zcmeHP$#Ua15LNcQDw92*kejWkO6JNTX_;k_R4B^MocKSvyZvCXSbVFF&(u-(uP&E=EdEg}#Au}d1{(BIjInImH`FPkQ{y78 z%q7H!V!{t{*nh9+YE!ktrmpg#teSq zSjWhaGwf`FmOB?NBJf~*KUc_gCW1o7_LE}tN@lxa$k#VR-EOPcV#;6u@Po-fEhr&B&E*Jo5b6l_kGb5NkBaRV(JSgmC(+LDRhC3{W;*g3|w$&4~hmq!?`_UkxK0p2Qj*B@R0!aAzz6jZG2mdox;*SoLt+!_lG~Llw+j6*k zyim(%DAt=bNBQL1fk%^eMq>Nv0sdxF3^!eScM&>?&ULwGb~YcwaU)R9O+ZRH=yY0wR^G0I)uK13j6hzZ(pJjA??t){&FMpB2?R7! zMgf)bSfuHKgZfoPQLPScI0*?}hGR%6gN#h&kG|8>1MVD=r-yT0j}oq361j#U zo@*y{TvN!VE7{mt8jGb!3~v-oVCtVoM9i5E!zb71hs^Q?O0Z1aBtv0+o%(lyOR= zl!NX^Q&T%C8l#XBl~G732i-5Enp@~T31=P*;8O;m9Rg4We!8$$%lvZK7TF^O%4Y*1 zJAXEip>Z~HCPp*PPAlAwK0YSKj_-(18L5kAibzb*7_RmkG077XRLcS#L^z%TSEs|= z6qPNIs+of_n#)(tMPh=F;X-~0m%g;aShhJ_*vh=XL#F*kN*;2yglj7CRCVyz>>=xx zo{;S6hxNn}sxM@Ey+<3#o892vQ7#_qj-mqH?~ZcJjPxu69Ym}^s9MxXJIYWk%?CPZ zAHtn{i2;FV(>tAA*7d`#`>O~(t1yhtK)IhFRDU285}XSqQxFrAz7#KccSldf41`{&J^lj;Tnh!+Gn#y$R~?V~(+7$%A4no5l!r$|&KQ zN~JoaI-mmSdUoFH*>kHe|C)j8L+ly>IT~%u$o5+AbqUw(v*%t1tg^iKf#6cR6)xt@`jMB|kfFhbhZczLSH;WM%UA1cdmZ^_FSrqhRK}xBQV~kC(_e>Ho9(b} zX5Wpn<}wa|CtBs}8*Gk*B zyZn0CWKFqNBMS(-kJX{R9S5=Fi+buWvuTZ-4>ij@4Y1TVOSGIhfJPF30`Vs*8+_$J zrzj`&1i4^k>i+ka%a{5GGNxrl#SSd@BWB7q^g_O!SeIIL9!Nk;T+n%I0)U>>8sSAd zDYn1``-M94>u%WgS+7;+DuFjA7Azvxsfg~JB}mx0sI*~IO;SyqO_4T4+7M|&umb69 z*gqTa*+k#XQGYqzPx33Tfb^bZ7c!Li)&Q4DSJE-(o z>Otx`7`Kp`uIuuux03({0Q0ix%g)M~LszY?g*juWUm3irx?0qU@UOG{#+?qPNv(Tz kA)1<~s}Pl$E(FZTRAmys -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd.h deleted file mode 100644 index b173ba13a12..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.c deleted file mode 100644 index c152acc299f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; - - mapped_level = level; - - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/dummy_lens.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter.h deleted file mode 100644 index 5ef80601aee..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 3009 -#define Q_MAX_POS_25 3009 -#define Q_MAX_POS_0 3009 -#define Q_MAX_NEG_10 3009 - -#define Q_MAX_POS_50_H_CURRENT 2975 -#define Q_MAX_POS_25_H_CURRENT 2975 -#define Q_MAX_POS_0_H_CURRENT 2975 -#define Q_MAX_NEG_10_H_CURRENT 2975 - - -/* Discharge Percentage */ -#define OAM_D5 1 // 1 : D5, 0: D2 - - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 200 -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 60 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 70 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 60 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 5400 //90 * 60 = 90 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter_table.h deleted file mode 100644 index 9574fa0095c..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_battery_meter_table.h +++ /dev/null @@ -1,1068 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 30000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC -{ - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC -{ - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum -{ - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,76241}, - {-15,58649}, - {-10,45569}, - { -5,35735}, - { 0,28271}, - { 5,22551}, - { 10,18136}, - { 15,14696}, - { 20,11997}, - { 25,10000}, - { 30,8365}, - { 35,7011}, - { 40,5951}, - { 45,4992}, - { 50,4217}, - { 55,3579}, - { 60,3051} - }; -#endif - -#if (BAT_NTC_47 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} - }; -#endif - -#if (BAT_NTC_100 == 1) - BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} - }; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = -{ - {0, 4175}, - {2, 4152}, - {4, 4133}, - {5, 4115}, - {7, 4098}, - {9, 4083}, - {11, 4069}, - {13, 4054}, - {14, 4037}, - {16, 4020}, - {18, 4005}, - {20, 3993}, - {21, 3981}, - {23, 3971}, - {25, 3959}, - {27, 3948}, - {29, 3937}, - {30, 3927}, - {32, 3917}, - {34, 3907}, - {36, 3897}, - {38, 3886}, - {39, 3875}, - {41, 3861}, - {43, 3848}, - {45, 3836}, - {47, 3826}, - {48, 3818}, - {50, 3811}, - {52, 3805}, - {54, 3800}, - {55, 3795}, - {57, 3791}, - {59, 3788}, - {61, 3783}, - {63, 3780}, - {64, 3777}, - {66, 3775}, - {68, 3773}, - {70, 3771}, - {72, 3769}, - {73, 3766}, - {75, 3762}, - {77, 3755}, - {79, 3748}, - {80, 3741}, - {82, 3733}, - {84, 3721}, - {86, 3710}, - {88, 3694}, - {89, 3689}, - {91, 3686}, - {93, 3684}, - {95, 3679}, - {97, 3638}, - {98, 3544}, - {100, 3381}, - {101, 3312}, - {101, 3301}, - {101, 3295}, - {101, 3293}, - {101, 3291}, - {101, 3290}, - {101, 3288}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, - {101, 3283}, - {101, 3282}, - {101, 3283}, - {101, 3282}, - {101, 3281}, - {101, 3280}, - {101, 3280}, - {101, 3280}, - {101, 3277}, - {101, 3277}, - {101, 3278}, - {101, 3279}, - {101, 3278}, - {101, 3276}, - {101, 3275}, - {101, 3275}, - {101, 3274}, - {101, 3274}, -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = -{ - {145, 4175}, - {145, 4152}, - {147, 4133}, - {147, 4115}, - {148, 4098}, - {150, 4083}, - {153, 4069}, - {155, 4054}, - {157, 4037}, - {157, 4020}, - {160, 4005}, - {165, 3993}, - {165, 3981}, - {168, 3971}, - {170, 3959}, - {172, 3948}, - {173, 3937}, - {177, 3927}, - {177, 3917}, - {178, 3907}, - {178, 3897}, - {177, 3886}, - {175, 3875}, - {167, 3861}, - {160, 3848}, - {153, 3836}, - {150, 3826}, - {150, 3818}, - {148, 3811}, - {148, 3805}, - {148, 3800}, - {150, 3795}, - {152, 3791}, - {153, 3788}, - {152, 3783}, - {153, 3780}, - {155, 3777}, - {157, 3775}, - {157, 3773}, - {157, 3771}, - {157, 3769}, - {157, 3766}, - {155, 3762}, - {152, 3755}, - {150, 3748}, - {148, 3741}, - {152, 3733}, - {148, 3721}, - {152, 3710}, - {147, 3694}, - {147, 3689}, - {148, 3686}, - {158, 3684}, - {170, 3679}, - {162, 3638}, - {165, 3544}, - {190, 3381}, - {188, 3312}, - {168, 3301}, - {162, 3295}, - {155, 3293}, - {153, 3291}, - {152, 3290}, - {152, 3288}, - {148, 3288}, - {145, 3285}, - {147, 3285}, - {143, 3284}, - {140, 3283}, - {138, 3282}, - {138, 3283}, - {138, 3282}, - {138, 3281}, - {137, 3280}, - {137, 3280}, - {137, 3280}, - {135, 3277}, - {132, 3277}, - {133, 3278}, - {135, 3279}, - {137, 3278}, - {132, 3276}, - {138, 3275}, - {133, 3275}, - {133, 3274}, - {133, 3274}, -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = -{ - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_charging.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_charging.h deleted file mode 100644 index ca1a98df01c..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_charging.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 50 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 47 -#define MIN_CHARGE_TEMPERATURE 0 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 6 -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 150 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -//#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -//#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_diso.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pe.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pmic.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/rtc/rtc-mt.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/inc/ssw.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/sim_switch.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/goodix_tool.c deleted file mode 100644 index 7ebef7d3f39..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/goodix_tool.c +++ /dev/null @@ -1,829 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version:1.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#include -#include -#include /*proc*/ - -#include "tpd_custom_gt9xx.h" -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif -extern s32 gup_load_hotknot_system(void); -extern s32 gup_load_fx_system(void); -extern s32 gup_recovery_main_system(void); -extern s32 gup_load_main_system(char *filepath); - -#if 0 -static struct proc_dir_entry *goodix_proc_entry; -#endif - -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; - -#if HOTKNOT_BLOCK_RW -DECLARE_WAIT_QUEUE_HEAD(bp_waiter); -u8 got_hotknot_state = 0; -u8 got_hotknot_extra_state = 0; -u8 wait_hotknot_state = 0; -u8 force_wake_flag = 0; -#endif - -#define HOTKNOTNAME "hotknot" - -static ssize_t hotknot_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t hotknot_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static struct file_operations hotknot_fops = -{ -// .owner = THIS_MODULE, - .read = hotknot_read, - .write = hotknot_write, -}; - -static struct miscdevice hotknot_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = HOTKNOTNAME, - .fops = &hotknot_fops, -}; -static ssize_t goodix_tool_upper_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_read(buffer, NULL,0, count, NULL, ppos); -} - -static ssize_t goodix_tool_upper_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return goodix_tool_write(file, buffer, count, ppos); -} - -static const struct file_operations gt_tool_fops = { - .write = goodix_tool_upper_write, - .read = goodix_tool_upper_read, -}; - -static void tool_set_proc_name(char * procname) -{ -#if 1 - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); -#else - sprintf(procname, HOTKNOTNAME); -#endif - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); -#if 0 - goodix_proc_entry = create_proc_entry(procname, 0660, NULL); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - goodix_proc_entry->write_proc = goodix_tool_write; - goodix_proc_entry->read_proc = goodix_tool_read; - } -#else - if(proc_create(procname, 0660, NULL, >_tool_fops)== NULL) - { - GTP_ERROR("create_proc_entry %s failed", procname); - return -1; - } -#endif - -#if 1 // setting by hotknot feature - if (misc_register(&hotknot_misc_device)) - { - printk("mtk_tpd: hotknot_device register failed\n"); - return FAIL; - } -#endif - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[Write]tpd_halt =1 fail!"); - return FAIL; - } - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - GTP_DEBUG("wr :0x%02x.", cmd_head.wr); - /* - GTP_DEBUG("flag:0x%02x.", cmd_head.flag); - GTP_DEBUG("flag addr:0x%02x%02x.", cmd_head.flag_addr[0], cmd_head.flag_addr[1]); - GTP_DEBUG("flag val:0x%02x.", cmd_head.flag_val); - GTP_DEBUG("flag rel:0x%02x.", cmd_head.flag_relation); - GTP_DEBUG("circle :%d.", (s32)cmd_head.circle); - GTP_DEBUG("times :%d.", (s32)cmd_head.times); - GTP_DEBUG("retry :%d.", (s32)cmd_head.retry); - GTP_DEBUG("delay :%d.", (s32)cmd_head.delay); - GTP_DEBUG("data len:%d.", (s32)cmd_head.data_len); - GTP_DEBUG("addr len:%d.", (s32)cmd_head.addr_len); - GTP_DEBUG("addr:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - GTP_DEBUG("len:%d.", (s32)len); - GTP_DEBUG("buf[20]:0x%02x.", buff[CMD_HEAD_LENGTH]); - */ - - if (1 == cmd_head.wr) - { - // copy_from_user(&cmd_head.data[cmd_head.addr_len], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return FAIL; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (3 == cmd_head.wr) //Write ic type - { - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - - return cmd_head.data_len + CMD_HEAD_LENGTH; - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - return CMD_HEAD_LENGTH; - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - return CMD_HEAD_LENGTH; - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - - return CMD_HEAD_LENGTH; - } - -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return FAIL; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - ret = copy_from_user(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - GTP_DEBUG("update firmware, filename: %s", cmd_head.data); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return FAIL; - } - } - -#endif - else if (19 == cmd_head.wr) //load subsystem - { - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(0 == cmd_head.data[0]) - { - if (FAIL == gup_load_hotknot_system()) - { - return FAIL; - } - } - else if(1 == cmd_head.data[0]) - { - if (FAIL == gup_load_fx_system()) - { - return FAIL; - } - } - else if(2 == cmd_head.data[0]) - { - if (FAIL == gup_recovery_main_system()) - { - return FAIL; - } - } - else if(3 == cmd_head.data[0]) - { - if (FAIL == gup_load_main_system(NULL)) - { - return FAIL; - } - } - } -#if HOTKNOT_BLOCK_RW - else if (21 == cmd_head.wr) - { - u16 wait_hotknot_timeout = 0; - u8 rqst_hotknot_state; - - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], - &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - } - - rqst_hotknot_state = cmd_head.data[GTP_ADDR_LENGTH]; - wait_hotknot_state |= rqst_hotknot_state; - wait_hotknot_timeout = (cmd_head.data[GTP_ADDR_LENGTH + 1]<<8) + - cmd_head.data[GTP_ADDR_LENGTH + 2]; - GTP_DEBUG("Goodix tool received wait polling state:0x%x,timeout:%d, all wait state:0x%x", - rqst_hotknot_state, wait_hotknot_timeout, wait_hotknot_state); - got_hotknot_state &= (~rqst_hotknot_state); - //got_hotknot_extra_state = 0; - switch(rqst_hotknot_state) - { - set_current_state(TASK_INTERRUPTIBLE); - case HN_DEVICE_PAIRED: - hotknot_paired_flag = 0; - wait_event_interruptible(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waiter failed.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_SEND: - case HN_SLAVE_RECEIVED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state)) - { - return got_hotknot_extra_state; - } - else - { - GTP_ERROR("Wait 0x%x block polling waiter timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - case HN_MASTER_DEPARTED: - case HN_SLAVE_DEPARTED: - wait_event_interruptible_timeout(bp_waiter, force_wake_flag || - rqst_hotknot_state == (got_hotknot_state&rqst_hotknot_state), - wait_hotknot_timeout); - wait_hotknot_state &= (~rqst_hotknot_state); - if(rqst_hotknot_state != (got_hotknot_state&rqst_hotknot_state)) - { - GTP_ERROR("Wait 0x%x block polling waitor timeout.", rqst_hotknot_state); - force_wake_flag = 0; - return FAIL; - } - break; - default: - GTP_ERROR("Invalid rqst_hotknot_state in goodix_tool."); - break; - } - force_wake_flag = 0; - } - else if(23 == cmd_head.wr) - { - GTP_DEBUG("Manual wakeup all block polling waiter!"); - got_hotknot_state = 0; - wait_hotknot_state = 0; - force_wake_flag = 1; - hotknot_paired_flag = 0; - wake_up_interruptible(&bp_waiter); - } -#endif - return CMD_HEAD_LENGTH; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -static s32 goodix_tool_read(char *page, char **start, off_t off, int count, int *eof, void *data) -{ - u64 ret = 0; - - GTP_DEBUG_FUNC(); - - if(tpd_halt == 1||is_reseting == 1) - { - //GTP_ERROR("[READ]tpd_halt =1 fail!"); - return FAIL; - } - if (cmd_head.wr % 2) - { - GTP_ERROR("[READ] invaild operator fail!"); - return FAIL; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return FAIL; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= DATA_LENGTH; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return FAIL; - } - - ret = copy_to_user(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - } - else if (2 == cmd_head.wr) - { - // memcpy(page, "gt8", cmd_head.data_len); - // memcpy(page, "GT818", 5); - // page[5] = 0; - - GTP_DEBUG("Return ic type:%s len:%d.", page, (s32)cmd_head.data_len); - return cmd_head.data_len; - //return sizeof(IC_TYPE_NAME); - } - else if (4 == cmd_head.wr) - { - page[0] = show_len >> 8; - page[1] = show_len & 0xff; - page[2] = total_len >> 8; - page[3] = total_len & 0xff; - - return cmd_head.data_len; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - // memcpy(page, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - s32 tmp_len; - tmp_len = strlen(GTP_DRIVER_VERSION); - ret = copy_to_user(page, GTP_DRIVER_VERSION, tmp_len); - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return FAIL; - } - page[tmp_len] = 0; - } - - return cmd_head.data_len; -} - - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_driver.c deleted file mode 100644 index cde964d3ccc..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,3350 +0,0 @@ -#include "tpd.h" -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#include "cust_gpio_usage.h" - -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif -#include /*proc*/ - -extern struct tpd_device *tpd; -#ifdef VELOCITY_CUSTOM -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -#endif -static int tpd_flag = 0; -int tpd_halt = 0; -static int tpd_eint_mode=1; -static struct task_struct *thread = NULL; -static int tpd_polling_time=50; -extern u8 load_fw_process; - -static DECLARE_WAIT_QUEUE_HEAD(waiter); -DEFINE_MUTEX(i2c_access); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = TPD_KEYS; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -struct touch_vitual_key_map_t -{ - int point_x; - int point_y; -}; -static struct touch_vitual_key_map_t touch_key_point_maping_array[]=GTP_KEY_MAP_ARRAY; -#endif - -#if GTP_SLIDE_WAKEUP -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); -#endif - -#if GTP_CHARGER_SWITCH - extern kal_bool upmu_is_chr_det(void); - static void gtp_charger_switch(s32 dir_update); -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -//static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local_normal[8] = TPD_CALIBRATION_MATRIX_ROTATION_NORMAL; -static int tpd_def_calmat_local_factory[8] = TPD_CALIBRATION_MATRIX_ROTATION_FACTORY; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -static void tpd_on(void); -static void tpd_off(void); - -#ifdef GTP_CHARGER_DETECT -extern bool upmu_get_pchr_chrdet(void); -#define TPD_CHARGER_CHECK_CIRCLE 50 -static struct delayed_work gtp_charger_check_work; -static struct workqueue_struct *gtp_charger_check_workqueue = NULL; -static void gtp_charger_check_func(struct work_struct *); -static u8 gtp_charger_mode = 0; -#endif - - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -u8 esd_running = 0; -spinlock_t esd_lock; -#endif - -#if HOTKNOT_BLOCK_RW -u8 hotknot_paired_flag = 0; -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -#ifndef GTP_REG_REFRESH_RATE -#define GTP_REG_REFRESH_RATE 0x8056 -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#ifdef GTP_CHARGER_DETECT -static u8 config_charger[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; -#endif -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; -static u8 chip_gt9xxs = 0; // true if chip type is gt9xxs,like gt915s - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -u8 gtp_ref_retries = 0; -u8 gtp_clk_retries = 0; -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 gtp_clk_buf[6]; -u8 rqst_processing = 0; - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern s32 gup_load_main_system(char *filepath); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -u8 is_reseting = 0; -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -static struct proc_dir_entry *gt91xx_config_proc = NULL; - -#ifdef TPD_REFRESH_RATE -/******************************************************* -Function: - Write refresh rate - -Input: - rate: refresh rate N (Duration=5+N ms, N=0~15) - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static u8 gtp_set_refresh_rate(u8 rate) -{ - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff, rate}; - - if (rate > 0xf) - { - GTP_ERROR("Refresh rate is over range (%d)", rate); - return FAIL; - } - - GTP_INFO("Refresh rate change to %d", rate); - return gtp_i2c_write(i2c_client_point, buf, sizeof(buf)); -} - -/******************************************************* -Function: - Get refresh rate - -Output: - Refresh rate or error code -*******************************************************/ -static u8 gtp_get_refresh_rate(void) -{ - int ret; - - u8 buf[3] = {GTP_REG_REFRESH_RATE>>8, GTP_REG_REFRESH_RATE& 0xff}; - ret = gtp_i2c_read(i2c_client_point, buf, sizeof(buf)); - if (ret < 0) - return ret; - - GTP_INFO("Refresh rate is %d", buf[GTP_ADDR_LENGTH]); - return buf[GTP_ADDR_LENGTH]; -} - -//============================================================= -static ssize_t show_refresh_rate(struct device *dev,struct device_attribute *attr, char *buf) -{ - int ret = gtp_get_refresh_rate(); - if (ret < 0) - return 0; - else - return sprintf(buf, "%d\n", ret); -} -static ssize_t store_refresh_rate(struct device *dev,struct device_attribute *attr, const char *buf, size_t size) -{ - //u32 rate = 0; - gtp_set_refresh_rate(simple_strtoul(buf, NULL, 16)); - return size; -} -static DEVICE_ATTR(tpd_refresh_rate, 0664, show_refresh_rate, store_refresh_rate); - -static struct device_attribute *gt9xx_attrs[] = -{ - &dev_attr_tpd_refresh_rate, -}; -#endif -//============================================================= - - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - -static int gt91xx_config_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i, len, err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - - ptr = page; - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - /* Touch PID & VID */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== GT9XX Version ID ====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_VERSION, temp_data, 6); - ptr += sprintf(ptr, "Chip PID: %c%c%c VID: 0x%02X%02X\n", temp_data[0], temp_data[1], temp_data[2], temp_data[5], temp_data[4]); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW_fl[12], gtp_default_FW_fl[13]); - } - else - { - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); - } -#else - ptr += sprintf(ptr, "Driver VID: 0x%02X%02X\n", gtp_default_FW[12], gtp_default_FW[13]); -#endif - i2c_read_bytes(i2c_client_point, 0x41E4, temp_data, 1); - ptr += sprintf(ptr, "Boot status 0x%X\n", temp_data[0]); - - /* Touch Status and Clock Gate */ - ptr += sprintf(ptr, "\n"); - ptr += sprintf(ptr, "==== Touch Status and Clock Gate ====\n"); - ptr += sprintf(ptr, "status: 1: on, 0 :off\n"); - ptr += sprintf(ptr, "status:%d\n", (tpd_halt+1)&0x1); - - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; - - //return (ptr - page); -} - -static int gt91xx_config_write_proc(struct file *file, const char *buffer, size_t count, loff_t *ppos) -{ - s32 ret = 0; - char temp[25] = {0}; // for store special format cmd - char mode_str[15] = {0}; - unsigned int mode; - u8 buf[1]; - - GTP_DEBUG("write count %ld\n", (unsigned long)count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%ld]", GTP_CONFIG_MAX_LENGTH, (unsigned long)count); - return -EFAULT; - } - - /**********************************************/ - /* for store special format cmd */ - if (copy_from_user(temp, buffer, sizeof(temp))) - { - GTP_ERROR("copy from user fail 2"); - return -EFAULT; - } - sscanf(temp, "%s %d", (char *)&mode_str, &mode); - - /***********POLLING/EINT MODE switch****************/ - if(strcmp(mode_str, "polling") == 0) - { - if(mode>=10&&mode<=200) - { - GTP_INFO("Switch to polling mode, polling time is %d",mode); - tpd_eint_mode=0; - tpd_polling_time=mode; - tpd_flag = 1; - wake_up_interruptible(&waiter); - } - else - { - GTP_INFO("Wrong polling time, please set between 10~200ms"); - } - return count; - } - if(strcmp(mode_str, "eint") == 0) - { - GTP_INFO("Switch to eint mode"); - tpd_eint_mode=1; - return count; - } - /**********************************************/ - if(strcmp(mode_str, "switch") == 0) - { - if(mode == 0)// turn off - tpd_off(); - else if(mode == 1)//turn on - tpd_on(); - else - GTP_ERROR("error mode :%d", mode); - return count; - } - //force clear config - if(strcmp(mode_str, "clear_config") == 0) - { - GTP_INFO("Force clear config"); - buf[0] = 0x10; - ret = i2c_write_bytes(i2c_client_point, GTP_REG_SLEEP, buf, 1); - return count; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - /***********clk operate reseved****************/ - /**********************************************/ - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 5) - { - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - return ret; - } - #endif - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - gtp_recovery_reset(client); - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_DEBUG("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - if (buf[5] == 'S' || buf[5] == 's') - { - chip_gt9xxs = 1; - } - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing; - } - else - #endif - { - gtp_get_info(client); - } - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(100); // for dbl-system -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = (int)gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return ret; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); - } - gtp_chip_type = CHIP_TYPE_GT9; // for test - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_bak_ref_proc]/data not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/data mounted !!!!"); - } - - if (!memcmp(>p_default_FW_fl[4], "950", 3)) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("[gtp_bak_ref_proc]Alloc memory for ref failed.use default ref"); - return FAIL; - } - memset(refp, 0, ref_len); - if(gtp_ref_retries >= GTP_CHK_FS_MNT_MAX) - { - for (j = 0; j < ref_grps; ++j) - { - refp[ref_seg_len + j * ref_seg_len -1] = 0x01; - } - ret = i2c_write_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Write ref i2c error."); - ret = FAIL; - } - - GTP_ERROR("[gtp_bak_ref_proc]Bak file or path is not exist,send default ref."); - ret = SUCCESS; - goto exit_ref_proc; - } - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0660); - if (IS_ERR(flp)) - { - GTP_ERROR("[gtp_bak_ref_proc]Ref File not found!Creat ref file."); - //flp->f_op->llseek(flp, 0, SEEK_SET); - //flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - gtp_ref_retries++; - ret = FAIL; - goto exit_ref_proc; - } - else if(GTP_BAK_REF_SEND == mode) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref file failed."); - memset(refp, 0, ref_len); - } - } - - if(GTP_BAK_REF_STORE == mode) - { - ret = i2c_read_bytes(client, 0x99D0, refp, ref_len); - if(-1 == ret) - { - GTP_ERROR("[gtp_bak_ref_proc]Read ref i2c error."); - ret = FAIL; - goto exit_ref_proc; - } - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - else - { - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; i 120) || - (gtp_clk_buf[i] != gtp_clk_buf[0])) - { - break; - } - clk_chksum += gtp_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_INFO("Clk ram legality check success"); - return SUCCESS; - } - GTP_ERROR("main clock freq in clock buf is wrong"); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - struct file *flp = NULL; - - //check clk legality - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - goto send_main_clk; - } - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/data") == FAIL) - { - GTP_DEBUG("[gtp_main_clk_proc]/data not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/data mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("[gtp_main_clk_proc]cal clk result is illegitimate"); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - - if (IS_ERR(flp)) - { - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0660); - } - else - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - goto exit_clk_proc; - } - - ret = SUCCESS; - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -#endif -//************* For GT9XXF End **********************// - -static const struct file_operations gt_upgrade_proc_fops = { - .write = gt91xx_config_write_proc, - .read = gt91xx_config_read_proc -}; - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - -//#ifdef VELOCITY_CUSTOM - #if 0 - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#ifdef VELOCITY_CUSTOM - tpd_v_magnify_x = TPD_VELOCITY_CUSTOM_X; - tpd_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; - -#endif - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0660, NULL, >_upgrade_proc_fops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_INFO(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif -#if GTP_SLIDE_WAKEUP - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); -#endif - -#if GTP_WITH_PEN - // pen support - __set_bit(BTN_TOOL_PEN, tpd->dev->keybit); - __set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); - //__set_bit(INPUT_PROP_POINTER, tpd->dev->propbit); // 20130722 -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; - - return 0; -} - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -void force_reset_guitar(void) -{ - s32 i = 0; - s32 ret = 0; - //static u8 is_reseting = 0; - - if(is_reseting || (load_fw_process == 1)) - { - return; - } - GTP_INFO("force_reset_guitar"); - is_reseting = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - for (i = 0; i < 5; i++) - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - //check code ram - ret = gup_load_main_system(NULL); - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - } - else - #endif - { - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - is_reseting = 0; - -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[2] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - if(1 == load_fw_process) - { - GTP_INFO("Load FW process is runing"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - memset(esd_buf, 0x01, sizeof(esd_buf)); - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, sizeof(esd_buf)); - msleep(50); - force_reset_guitar(); - } - } - -#if FLASHLESS_FLASH_WORKROUND - { - u8 versionBuff[6]; - int retry = 0; - u8 temp = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - //match pid - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - temp = versionBuff[5]; - versionBuff[5] = versionBuff[4]; - versionBuff[4] = temp; - //match vid - if( memcmp(&versionBuff[4], >p_default_FW_fl[12], 2) !=0 ) - { - continue; - } - break; - } - if(retry>=3) - { - GTP_INFO("IC version error., force reset!"); - force_reset_guitar(); - } - } -#endif - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif -static int tpd_history_x=0, tpd_history_y=0; -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(x, y, x, y, id, 1); - tpd_history_x=x; - tpd_history_y=y; - - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 1, x+y); -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - //input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0); - input_report_key(tpd->dev, BTN_TOUCH, 0); - //input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 0); - input_mt_sync(tpd->dev); - TPD_DEBUG_SET_TIME; - TPD_EM_PRINT(tpd_history_x, tpd_history_y, tpd_history_x, tpd_history_y, id, 0); - tpd_history_x=0; - tpd_history_y=0; - //MMProfileLogEx(MMP_TouchPanelEvent, MMProfileFlagPulse, 0, x+y); - -#ifdef TPD_HAVE_BUTTON - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - - chr_status = upmu_is_chr_det(); - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -/*Coordination mapping*/ -static void tpd_calibrate_driver(int *x, int *y) -{ - int tx; - - GTP_DEBUG("Call tpd_calibrate of this driver ..\n"); - - tx = ( (tpd_def_calmat[0] * (*x)) + (tpd_def_calmat[1] * (*y)) + (tpd_def_calmat[2]) ) >> 12; - *y = ( (tpd_def_calmat[3] * (*x)) + (tpd_def_calmat[4] * (*y)) + (tpd_def_calmat[5]) ) >> 12; - *x = tx; -} - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#if HOTKNOT_BLOCK_RW - u8 hn_pxy_state = 0; - u8 hn_pxy_state_bak = 0; - u8 hn_paired_cnt = 0; - u8 hn_state_buf[10] = {(u8)(GTP_REG_HN_STATE>> 8), (u8)(GTP_REG_HN_STATE & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - -#if GTP_SLIDE_WAKEUP - u8 doze_buf[3] = {0x81, 0x4B}; -#endif - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - if(tpd_eint_mode) - { - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - } - else - { - msleep(tpd_polling_time); - } - - set_current_state(TASK_RUNNING); - mutex_lock(&i2c_access); - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - #if GTP_SLIDE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if (0xAA == doze_buf[2]) - { - GTP_INFO("Forward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xBB == doze_buf[2]) - { - GTP_INFO("Backward slide to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - - } - else if (0xC0 == (doze_buf[2] & 0xC0)) // double click wakeup - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - #endif - if(tpd_halt||(is_reseting == 1) || (load_fw_process == 1)) - { - mutex_unlock(&i2c_access); - GTP_DEBUG("return for interrupt after suspend... "); - continue; - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - switch(rqst_data[2]&0x0F) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - case GTP_RQST_RESET: - GTP_INFO("Request Reset."); - gtp_recovery_reset(i2c_client_point); - goto exit_work_func; - case GTP_RQST_HOTKNOT_CODE: - GTP_INFO("Request HotKnot Code."); - gup_load_hotknot_system(); - goto exit_work_func; - default: - break; - } - } - #endif - - if ((finger & 0x80) == 0) - { - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag) - #endif - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - GTP_ERROR("buffer not ready"); - continue; - } - } - - #if HOTKNOT_BLOCK_RW - if(!hotknot_paired_flag && (finger&0x0F)) - { - id = point_data[GTP_ADDR_LENGTH+1]; - hn_pxy_state = point_data[GTP_ADDR_LENGTH+2]&0x80; - hn_pxy_state_bak = point_data[GTP_ADDR_LENGTH+3]&0x80; - if((32 == id) && (0x80 == hn_pxy_state) && (0x80 == hn_pxy_state_bak)) - { - #ifdef HN_DBLCFM_PAIRED - if(hn_paired_cnt++ < 2) - { - goto exit_work_func; - } - #endif - GTP_DEBUG("HotKnot paired!"); - if(wait_hotknot_state & HN_DEVICE_PAIRED) - { - GTP_DEBUG("INT wakeup HN_DEVICE_PAIRED block polling waiter"); - got_hotknot_state |= HN_DEVICE_PAIRED; - wake_up_interruptible(&bp_waiter); - } - hotknot_paired_flag = 1; - goto exit_work_func; - } - else - { - got_hotknot_state &= (~HN_DEVICE_PAIRED); - hn_paired_cnt = 0; - } - - } - - if(hotknot_paired_flag) - { - ret = gtp_i2c_read(i2c_client_point, hn_state_buf, 6); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - goto exit_work_func; - } - - got_hotknot_state = 0; - - GTP_DEBUG("[0xAB10~0xAB13]=0x%x,0x%x,0x%x,0x%x", hn_state_buf[GTP_ADDR_LENGTH], - hn_state_buf[GTP_ADDR_LENGTH+1], - hn_state_buf[GTP_ADDR_LENGTH+2], - hn_state_buf[GTP_ADDR_LENGTH+3]); - - if(wait_hotknot_state & HN_MASTER_SEND) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH])) - { - GTP_DEBUG("Wakeup HN_MASTER_SEND block polling waiter"); - got_hotknot_state |= HN_MASTER_SEND; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_RECEIVED) - { - if((0x03 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x04 == hn_state_buf[GTP_ADDR_LENGTH+1]) || - (0x07 == hn_state_buf[GTP_ADDR_LENGTH+1])) - { - GTP_DEBUG("Wakeup HN_SLAVE_RECEIVED block polling waiter:0x%x", hn_state_buf[GTP_ADDR_LENGTH+1]); - got_hotknot_state |= HN_SLAVE_RECEIVED; - got_hotknot_extra_state = hn_state_buf[GTP_ADDR_LENGTH+1]; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_MASTER_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Wakeup HN_MASTER_DEPARTED block polling waiter"); - got_hotknot_state |= HN_MASTER_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - else if(wait_hotknot_state & HN_SLAVE_DEPARTED) - { - if(0x07 == hn_state_buf[GTP_ADDR_LENGTH+1]) - { - GTP_DEBUG("Wakeup HN_SLAVE_DEPARTED block polling waiter"); - got_hotknot_state |= HN_SLAVE_DEPARTED; - wake_up_interruptible(&bp_waiter); - } - } - } - - #endif - - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - GTP_ERROR("Bad number of fingers!"); - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - -#if GTP_HAVE_TOUCH_KEY - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - for (i = 0; i < TPD_KEY_COUNT; i++) - { - //input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - if( key_value&(0x01<dev, BTN_TOOL_PEN, 1); - pre_pen = 1; - id = 0; - } - #endif - GTP_DEBUG(" %d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - else if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - input_report_key(tpd->dev, BTN_TOOL_PEN, 0); - pre_pen = 0; - } - #endif - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - else - { - GTP_DEBUG("Additional Eint!"); - } - pre_touch = touch_num; - - if (tpd != NULL && tpd->dev != NULL) - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_INFO("I2C write end_cmd error!"); - } - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); - - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_INFO("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_INFO("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_INFO("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH-1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - //memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - //memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); - if (FACTORY_BOOT == get_boot_mode()) - { - TPD_DEBUG("Factory mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_factory, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_factory, 8 * 4); - } - else - { - TPD_DEBUG("Normal mode is detected! \n"); - memcpy(tpd_calmat, tpd_def_calmat_local_normal, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local_normal, 8 * 4); - } -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_INFO("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - return 0; -} - -#if GTP_SLIDE_WAKEUP -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); -#if GTP_DBL_CLK_WAKEUP - i2c_control_buf[2] = 0x09; -#endif - - GTP_DEBUG("entering doze mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("failed to set doze flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_DEBUG("GTP has been working in doze mode!"); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send doze cmd failed."); - return ret; -} - -#else -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif - -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} -#endif - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if (GTP_POWER_CTRL_SLEEP) - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("Esd recovery wakeup."); - return 0; - } -#endif - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 opr_buf[2] = {0}; - - while (retry++ < 10) - { - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); - msleep(5); - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) - { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) - { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) - { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(); - } - if (retry >= 10) - { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(); - } - GTP_ERROR("GTP wakeup sleep failed."); - return ret; - } -#endif - while (retry++ < 10) - { - #if GTP_SLIDE_WAKEUP - if (DOZE_WAKEUP != doze_status) - { - GTP_DEBUG("power wakeup, reset guitar"); - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - } - else - { - GTP_DEBUG("slide(double click) wakeup, no reset guitar"); - doze_status = DOZE_DISABLED; - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #else -// if (chip_gt9xxs == 1) -// { -// gtp_reset_guitar(client, 10); -// } -// else -// { -// GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); -// msleep(5); -// } - - //GTP_GPIO_AS_INT(GTP_INT_PORT); - gtp_reset_guitar(client, 20); // for double-system, reset to default system - - return 2; - #endif - - ret = gtp_i2c_test(client); - - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - #if (!GTP_SLIDE_WAKEUP) - if (chip_gt9xxs == 0) - { - gtp_int_sync(25); - #if GTP_ESD_PROTECT - gtp_init_ext_watchdog(client); - #endif - } - #endif - - return ret; - } - gtp_reset_guitar(client, 20); - } -#endif - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - u8 buf[3] = {0x81, 0xaa, 0}; - -#ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - return ; - } -#endif - -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - - mutex_lock(&i2c_access); - - gtp_i2c_read(i2c_client_point,buf,sizeof(buf)); - if(buf[2] == 0x55) - { - mutex_unlock(&i2c_access); - GTP_INFO("GTP early suspend pair sucess"); - return; - } - tpd_halt = 1; - - mutex_unlock(&i2c_access); -#if GTP_ESD_PROTECT - cancel_delayed_work_sync(>p_esd_check_work); -#endif - -#ifdef GTP_CHARGER_DETECT - cancel_delayed_work_sync(>p_charger_check_work); -#endif - mutex_lock(&i2c_access); - -#if GTP_SLIDE_WAKEUP - ret = gtp_enter_doze(i2c_client_point); -#else - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } -#endif - mutex_unlock(&i2c_access); - - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - printk("mtk-tpd: %s start\n", __FUNCTION__); -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if HOTKNOT_BLOCK_RW - if(hotknot_paired_flag) - { - return; - } -#endif - if(load_fw_process == 0) - { - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - //gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - -#if GTP_SLIDE_WAKEUP - doze_status = DOZE_DISABLED; -#else - mutex_lock(&i2c_access); - tpd_halt = 0; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - mutex_unlock(&i2c_access); -#endif - -#if GTP_ESD_PROTECT - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); -#endif - -#ifdef GTP_CHARGER_DETECT - queue_delayed_work(gtp_charger_check_workqueue, >p_charger_check_work, clk_tick_cnt); -#endif - printk("mtk-tpd: %s end\n", __FUNCTION__); -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -static void tpd_off(void) -{ - -#ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); -#else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); -#endif -#ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); -#endif - GTP_INFO("GTP enter sleep!"); - - tpd_halt = 1; - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -} - -static void tpd_on(void) -{ - s32 ret = -1, retry = 0; - - while (retry++ < 5) - { - ret = tpd_power_on(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - } - - ret = gtp_send_cfg(i2c_client_point); - - if (ret > 0) - { - GTP_DEBUG("Wakeup sleep send config success."); - } - } - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - tpd_halt = 0; -} - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#if defined(TPD_I2C_NUMBER) - i2c_register_board_info(TPD_I2C_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_firmware.h deleted file mode 100644 index 21c067ead60..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]9150 -*[VID]1010 -*[GENERATED]2013/11/16 20:59:13 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { -}; - -unsigned char gtp_default_FW_hotknot[] = { -}; - -unsigned char gtp_default_FW_hotknot2[] = { -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_update.c deleted file mode 100644 index 1949bbc0a0d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3986 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.0 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include -#define GUP_FW_INFO -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_LINK_LENGTH 0x3000 // 12k -#define FW_APP_CODE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define FIRMWARE_LENGTH (FW_SS51_LENGTH + FW_DSP_LENGTH + FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH + FW_APP_CODE_LENGTH) - -#define FW_HOTKNOT_LENGTH 0x3000 -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#define FAIL 0 -#define SUCCESS 1 - -#define MAIN_SYSTEM_PATH "/sdcard/goodix/_main_.bin" -#define HOTKNOT_SYSTEM_PATH "/sdcard/goodix/_hotknot_.bin" -#define FX_SYSTEM_PATH "/sdcard/goodix/_authorization_.bin" - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -extern struct mutex i2c_access; -u8 searching_file = 0; -u8 got_file_flag = 0; -u8 load_fw_process = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -extern u8 is_reseting; -#endif - - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_recovery_main_system(void); -s32 gup_load_main_system(char *filepath); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -char * gup_load_fw_from_file(char *filepath); -s32 gup_load_system(char *firmware, s32 length, u8 need_check); -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_INFO("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - force_reset_guitar(); - GTP_INFO("User layer reset GT9XXF."); - return; - } -#endif - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - if ((update_msg.fw_total_len < 36*1024) || (update_msg.fw_total_len > 128*1024)) - { - GTP_ERROR("Invalid firmware length(%d), update aborted!", update_msg.fw_total_len); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_INFO("[check_update_file]default firmware array is INVALID!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware with checksum(0x%04X)", fw_checksum & 0xFFFF); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - goto load_failed; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - goto load_failed; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - goto load_failed; - } - - return SUCCESS; - -load_failed: - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - - if (retry > MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - - burn_length += frame_length; - burn_addr += frame_length; - } - - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_DEBUG("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_boot_isp]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_DEBUG("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_LINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_link, 0x9000, FW_LINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_LINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_app_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_app_code(struct i2c_client *client) -{ - u8* fw_app_code = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_INFO("No need to upgrade the app code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_fw_app_code]Begin burn app_code firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_app_code]step1:alloc memory"); - while(retry++ < 5) - { - fw_app_code = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_app_code == NULL) - { - continue; - } - else - { - GTP_INFO("[burn_fw_app_code]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_app_code]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_app_code]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_app_code, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_app_code]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 1 fail."); - goto exit_burn_fw_app_code; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_app_code]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_app_code, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_app_code]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 2 fail."); - goto exit_burn_fw_app_code; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_app_code]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_app_code, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_app_code]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 3 fail."); - goto exit_burn_fw_app_code; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_app_code]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_app_code, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]load app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_app_code]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_app_section(client, fw_app_code, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_code]burn app_code firmware section 4 fail."); - goto exit_burn_fw_app_code; - } - - update_msg.fw_burned_len += FW_APP_CODE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_app_code: - kfree(fw_app_code); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8 *)dir); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - GTP_DEBUG("[update_proc]Burned length:%d", update_msg.fw_burned_len); - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 50; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 60; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 80; - ret = gup_burn_fw_app_code(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 90; - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 95; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE && GTP_AUTO_UPDATE_CFG) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("Update config failed!"); - } - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - return FAIL; - } - else - { - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - else - { - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_INFO("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_INFO("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - FW_DSP_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - if (NULL != dir) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; - -download_fail: - if (NULL != dir) - { - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - - -#define BANK_LENGTH (16*1024) -#define FIRMWARE_HEADER_LEN 14 - -static u32 current_system_length = 0; - -char * gup_load_fw_from_file(char *filepath) -{ - struct file *fw_file = NULL; - mm_segment_t old_fs; - long len = 0; - char *buffer = NULL; - - if(filepath == NULL) - { - GTP_ERROR("[Load_firmware]filepath: NULL"); - goto load_firmware_exit; - } - - old_fs = get_fs(); - set_fs(KERNEL_DS); - - fw_file = filp_open(filepath, O_RDONLY, 0); - if (fw_file == NULL || IS_ERR(fw_file)) - { - GTP_ERROR("[Load_firmware]Failed to open: %s", filepath); - goto load_firmware_exit; - } - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - len = fw_file->f_op->llseek(fw_file, 0, SEEK_END); - if(len<1024) - { - GTP_ERROR("[Load_firmware]Firmware is too short: %ld", len); - goto load_firmware_failed; - } - buffer = (char *)kmalloc(sizeof(char) * len, GFP_KERNEL); - if(buffer == NULL) - { - GTP_ERROR("[Load_firmware]Failed to allocate buffer: %ld", len); - goto load_firmware_failed; - } - - memset(buffer, 0, sizeof(char) * len); - - fw_file->f_op->llseek(fw_file, 0, SEEK_SET); - fw_file->f_op->read(fw_file, buffer, len, &fw_file->f_pos); - - GTP_ERROR("[Load_firmware]Load from file success: %ld %s", len, filepath); - - -load_firmware_failed: - filp_close(fw_file, NULL); - set_fs(old_fs); - -load_firmware_exit: - return buffer; -} - -s32 gup_check_firmware(char *fw, u32 length) -{ - u32 i = 0; - u32 fw_checksum = 0; - u16 temp; - - for(i=0; i 0) - { - u32 len = length >BANK_LENGTH? BANK_LENGTH:length; - ret = gup_load_by_bank(bank, need_check, &firmware[bank*BANK_LENGTH], len); - if(FAIL == ret) - { - goto gup_load_system_exit; - } - GTP_DEBUG("load bank%d length:%d success.", bank, len); - bank++; - length -= len; - } - - ret = gtp_fw_startup(i2c_client_point); - -gup_load_system_exit: -#if GTP_ESD_PROTECT -#if FLASHLESS_FLASH_WORKROUND - -#else - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif -#endif - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return ret; -} - -s32 gup_load_fx_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_fx_system] Load authorization system."); - - firmware = gtp_default_FW_hotknot2; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( FX_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot2; - GTP_INFO("[load_fx_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_fx_system]firmware's length is invalid."); - goto load_fx_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_fx_system]firmware's checksum is error."); - goto load_fx_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - -load_fx_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} - - -s32 gup_load_hotknot_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - load_fw_process = 1; - /* - if(gtp_chip_type == CHIP_TYPE_GT9) - { - u8 retry = 0; - u8 wr_buf[3] = {0x80, 0x46, 0x22}; - u8 rd_buf[4] = {0x81, 0xA8, 0x00, 0x00}; - while(retry++ < 10) - { - wr_buf[1] = 0x46; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - wr_buf[1] = 0x40; - ret = gup_i2c_write(i2c_client_point, wr_buf, sizeof(wr_buf)); - if(ret <= 0) - { - continue; - } - msleep(50); - ret = gup_i2c_read(i2c_client_point, rd_buf, sizeof(rd_buf)); - if(ret <= 0) - { - continue; - } - if(rd_buf[GTP_ADDR_LENGTH] == 0xAA && - rd_buf[GTP_ADDR_LENGTH] == rd_buf[GTP_ADDR_LENGTH + 1]) - { - GTP_INFO("[load_hotknot_system]Hotknot switch system success."); - return SUCCESS; - } - } - GTP_ERROR("[load_hotknot_system]Hotknot switch system failed."); - return FAIL; - } - */ - GTP_INFO("[load_hotknot_system] Load hotknot system."); - - firmware = gtp_default_FW_hotknot; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file( HOTKNOT_SYSTEM_PATH ); - if(firmware == NULL) - { - firmware = gtp_default_FW_hotknot; - GTP_INFO("[load_hotknot_system] Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 32*1024 || length < 4*1024 ) - { - GTP_ERROR("[load_hotknot_system]firmware's length is invalid."); - goto load_hotknot_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_hotknot_system]firmware's checksum is error."); - goto load_hotknot_exit; - } - - current_system_length = length; - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 0); - -load_hotknot_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; - -} - - -s32 gup_recovery_main_system(void) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[recovery_main_system] Recovery main system."); - - if(gtp_chip_type == CHIP_TYPE_GT9) - { - gtp_reset_guitar(i2c_client_point,10); - load_fw_process = 0; - return SUCCESS; - } - - firmware = gtp_default_FW_fl; - -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(MAIN_SYSTEM_PATH); - if(firmware == NULL) - { - firmware = gtp_default_FW_fl; - GTP_INFO("[recovery_main_system]Use default firmware."); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - } - if(length > 36*1024 || length < 16*1024 ) - { - GTP_ERROR("[recovery_main_system]firmware's length is invalid."); - goto recovery_main_system_exit; - } - - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[recovery_main_system]firmware's checksum is error."); - goto recovery_main_system_exit; - } - - if(current_system_length == 0) - { - current_system_length = length; - } - - GTP_INFO("[recovery_main_system] Recovery length: %d.", current_system_length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], current_system_length, 0); - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -recovery_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - load_fw_process = 0; - return ret; - -} - -s32 gup_load_main_system(char *filepath) -{ - s32 ret = -1; - char *firmware = NULL; - u32 is_load_from_file = 0; - u32 length = 0; - - GTP_INFO("[load_main_system] Load main system."); - - if(filepath != NULL) - { - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - GTP_INFO("[load_main_system]can not open file: %s", filepath); - goto load_main_system_exit; - } - else - { - is_load_from_file = 1; - } - } - else - { - firmware = gtp_default_FW_fl; - } -#if GTP_AUTO_UPDATE - firmware = gup_load_fw_from_file(filepath); - if(firmware == NULL) - { - if(gtp_chip_type == CHIP_TYPE_GT9) - firmware = gtp_default_FW; - else - firmware = gtp_default_FW_fl; - GTP_INFO("[load_main_system]Use default firmware. type:%d", gtp_chip_type); - } - else - { - is_load_from_file = 1; - } -#endif - - if(firmware[0]==0x00&&firmware[1]==0x90&&firmware[2]==0x06&&firmware[3]==0x00) - { - length = 36*1024; - } - else - { - length = firmware[0]*256*256*256+ - firmware[1]*256*256+ - firmware[2]*256+ - firmware[3]; - if(length > 36*1024) - { - length = 36*1024; - } - } - ret = gup_check_firmware(&firmware[FIRMWARE_HEADER_LEN],length); - if(ret == FAIL) - { - GTP_ERROR("[load_main_system]firmware's checksum is error."); - goto load_main_system_exit; - } - GTP_INFO("[load_main_system] Firmware length: %d.", length); - - //memcpy(gtp_default_FW_fl, firmware, length); - - ret = gup_load_system(&firmware[FIRMWARE_HEADER_LEN], length, 1); - show_len = 100; - -#if (FLASHLESS_FLASH_WORKROUND && GTP_ESD_PROTECT) - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -load_main_system_exit: - - if(is_load_from_file) - { - kfree(firmware); - } - - return ret; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/mtk_tpd.c deleted file mode 100644 index 91b7ffb872e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,450 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index 6fdcf995a06..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,409 +0,0 @@ -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -struct goodix_ts_data -{ - spinlock_t irq_lock; - struct i2c_client *client; - struct input_dev *input_dev; - struct hrtimer timer; - struct work_struct work; - struct early_suspend early_suspend; - s32 irq_is_disable; - s32 use_irq; - u16 abs_x_max; - u16 abs_y_max; - u8 max_touch_num; - u8 int_trigger_type; - u8 green_wake_mode; - u8 chip_type; - u8 enter_update; - u8 gtp_is_suspend; - u8 gtp_rawdiff_mode; -}; - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; -extern u8 load_fw_process; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern u8 wait_hotknot_state; -extern u8 got_hotknot_state; -extern u8 got_hotknot_extra_state; -extern u8 hotknot_paired_flag; -extern wait_queue_head_t bp_waiter; -extern s32 gup_load_hotknot_system(void); - -extern unsigned char gtp_default_FW[]; -extern unsigned char gtp_default_FW_fl[]; -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 //driver send config to TP on intilization (for no config built in TP flash) -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 1 //turn off power on suspend -#define GTP_AUTO_UPDATE 1 //update FW to TP FLASH -#define GTP_CHANGE_X2Y 0 //set for se1 -#define GTP_HEADER_FW_UPDATE 1 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 1 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF - -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 0 // esd protection with a cycle of 2 seconds -#define GUP_USE_HEADER_FILE 0 -#define GTP_FW_DOWNLOAD 0 //update FW to TP SRAM -//#define GTP_CHARGER_DETECT - -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect -#define GTP_WITH_PEN 0 -#define GTP_SLIDE_WAKEUP 0 -#define GTP_DBL_CLK_WAKEUP 0 // double-click wakup, function together with GTP_SLIDE_WAKEUP -#define HOTKNOT_BLOCK_RW 0 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON //report key as coordinate,Vibration feedback -//#define TPD_WARP_X -//#define TPD_WARP_Y - -#define GTP_DEBUG_ON 0 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) -#define FLASHLESS_FLASH_WORKROUND 0 - -#if GTP_COMPATIBLE_MODE -extern void force_reset_guitar(void); -#endif -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -/*TODO: puts the config info corresponded to your TP here, the following is just -a sample config, send this config should cause the chip cannot work normally*/ -#define CTP_CFG_GROUP1 {\ -0x42,0x20,0x03,0x00,0x05,0x05,0x38,0x06,\ -0x01,0x88,0x28,0x07,0x55,0x37,0x03,0x04,\ -0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x17,\ -0x19,0x20,0x14,0x8C,0x2E,0x0E,0x2B,0x29,\ -0xA0,0x0B,0x00,0x00,0x00,0x99,0x03,0x1D,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1A,0x42,0x94,0xC5,0x02,\ -0x05,0x00,0x00,0x04,0xB4,0x1C,0x00,0x97,\ -0x22,0x00,0x80,0x29,0x00,0x6C,0x32,0x00,\ -0x5D,0x3C,0x00,0x5D,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x28,0x28,0x03,0x06,0x00,\ -0x31,0x85,0x0D,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,\ -0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x18,\ -0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x24,\ -0x26,0x28,0x29,0x2A,0x00,0x02,0x04,0x06,\ -0x08,0x0A,0x0C,0x0F,0x10,0x12,0x13,0x14,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x60,0x01\ -} - -//default config for K82 - -#define CTP_CFG_GROUP1_CHARGER {\ -} - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2 {\ - } - -//TODO puts your group2 config info here,if need. -#define CTP_CFG_GROUP2_CHARGER {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3 {\ - } - -//TODO puts your group3 config info here,if need. -#define CTP_CFG_GROUP3_CHARGER {\ - } - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ - } - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ - } - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ - } - - -//STEP_2(REQUIRED):Change I/O define & I/O operation mode. -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -//STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG -#define GTP_MAX_HEIGHT 800 -#define GTP_MAX_WIDTH 480 -#define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1280 - #define GTP_MAX_WIDTH 800 -#define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 - -#define TPD_POWER_SOURCE_CUSTOM MT65XX_POWER_LDO_VGP6 //MT6323_POWER_LDO_VGP1 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY -#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.1<2014/01/10>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E -#define GTP_REG_HN_STATE 0xAB10 - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/data/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_HOTKNOT_CODE 0x20 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -#define HN_DEVICE_PAIRED 0x80 -#define HN_MASTER_DEPARTED 0x40 -#define HN_SLAVE_DEPARTED 0x20 -#define HN_MASTER_SEND 0x10 -#define HN_SLAVE_RECEIVED 0x08 - - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 -#define GTP_REG_REFRESH_RATE 0x8056 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - - -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define TPD_I2C_NUMBER 1 -#define I2C_MASTER_CLOCK 300 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -//#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_NORMAL {0,2559,0,-6557,0,5238784,0,0}; -#define TPD_CALIBRATION_MATRIX_ROTATION_FACTORY {0,2559,0,-6557,0,5238784,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - -//****************************PART4:UPDATE define******************************* -//Error no -#define ERROR_NO_FILE 2 //ENOENT -#define ERROR_FILE_READ 23 //ENFILE -#define ERROR_FILE_TYPE 21 //EISDIR -#define ERROR_GPIO_REQUEST 4 //EINTR -#define ERROR_I2C_TRANSFER 5 //EIO -#define ERROR_NO_RESPONSE 16 //EBUSY -#define ERROR_TIMEOUT 110 //ETIMEDOUT - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.c deleted file mode 100644 index aa1515d977e..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/Makefile b/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/tpw8127_tb_c_l/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm/mach-mt8127/ttab/Makefile b/arch/arm/mach-mt8127/ttab/Makefile deleted file mode 100755 index 45c4abcea48..00000000000 --- a/arch/arm/mach-mt8127/ttab/Makefile +++ /dev/null @@ -1,44 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -ifneq ($(CONFIG_ARCH_MTK_PROJECT),) -ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT)) -obj-y += core/ -obj-y += dct/dct/ -endif - - -ifeq ($(CONFIG_CUSTOM_KERNEL_ACCELEROMETER),y) -obj-y += accelerometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_GYROSCOPE),y) -obj-y += gyroscope/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_MAGNETOMETER),y) -obj-y += magnetometer/ -endif - -ifeq ($(CONFIG_CUSTOM_KERNEL_ALSPS),y) -obj-y += alsps/ -endif - -obj-y += cam_cal/ -obj-y += camera/camera/ -obj-y += eeprom/ -###obj-y += flashlight/ -obj-y += flashlight/constant_flashlight/ -obj-y += headset/ -###zbj-y += imgsensor/ -obj-y += keypad/ -obj-y += leds/ -obj-y += lens/ -obj-y += sound/ -###obj-y += ssw/ -obj-y += touchpanel/ -obj-y += vibrator/ -#obj-y += wmt/ -ifeq ($(CONFIG_MTK_HDMI_SUPPORT),y) -obj-y +=hdmi/ -endif diff --git a/arch/arm/mach-mt8127/ttab/accdet/accdet_custom.h b/arch/arm/mach-mt8127/ttab/accdet/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/ttab/accdet/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/ttab/accdet/accdet_custom_def.h b/arch/arm/mach-mt8127/ttab/accdet/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/ttab/accdet/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/Makefile b/arch/arm/mach-mt8127/ttab/accelerometer/Makefile deleted file mode 100755 index 37a76885eb1..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom -obj-y := cust_acc.o - diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/accel.c b/arch/arm/mach-mt8127/ttab/accelerometer/accel.c deleted file mode 100644 index 18cb7f85314..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/accel.c +++ /dev/null @@ -1,795 +0,0 @@ - -#include "accel.h" - -static struct acc_context *acc_context_obj = NULL; - - -static struct acc_init_info* gsensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified -static void acc_early_suspend(struct early_suspend *h); -static void acc_late_resume(struct early_suspend *h); - -static void acc_work_func(struct work_struct *work) -{ - - struct acc_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = acc_context_obj; - - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - err = cxt->acc_data.get_data(&x,&y,&z,&status); - - if(err) - { - ACC_ERR("get acc data fails!!\n" ); - goto acc_loop; - } - else - { - { - if( 0 == x && 0==y - && 0 == z) - { - goto acc_loop; - } - - cxt->drv_data.acc_data.values[0] = x; - cxt->drv_data.acc_data.values[1] = y; - cxt->drv_data.acc_data.values[2] = z; - cxt->drv_data.acc_data.status = status; - cxt->drv_data.acc_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[0] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[1] || - ACC_INVALID_VALUE == cxt->drv_data.acc_data.values[2]) - { - ACC_LOG(" read invalid data \n"); - goto acc_loop; - - } - } - //report data to input device - //printk("new acc work run....\n"); - //ACC_LOG("acc data[%d,%d,%d] \n" ,cxt->drv_data.acc_data.values[0], - //cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2]); - - acc_data_report(cxt->drv_data.acc_data.values[0], - cxt->drv_data.acc_data.values[1],cxt->drv_data.acc_data.values[2], - cxt->drv_data.acc_data.status); - - acc_loop: - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void acc_poll(unsigned long data) -{ - struct acc_context *obj = (struct acc_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct acc_context *acc_context_alloc_object(void) -{ - - struct acc_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ACC_LOG("acc_context_alloc_object++++\n"); - if(!obj) - { - ACC_ERR("Alloc accel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, acc_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = acc_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - mutex_init(&obj->acc_op_mutex); - obj->is_batch_enable = false;//for batch mode init - ACC_LOG("acc_context_alloc_object----\n"); - return obj; -} - -static int acc_real_enable(int enable) -{ - int err =0; - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - { - err = cxt->acc_ctl.enable_nodata(1); - if(err) - ACC_ERR("acc enable(%d) err 3 timers = %d\n", enable, err); - } - } - ACC_LOG("acc real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->acc_ctl.enable_nodata(0); - if(err) - { - ACC_ERR("acc enable(%d) err = %d\n", enable, err); - } - ACC_LOG("acc real disable \n" ); - } - - } - - return err; -} -static int acc_enable_data(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_ERR("no acc control path\n"); - return -1; - } - - if(1 == enable) - { - ACC_LOG("ACC enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->acc_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - ACC_LOG("ACC disable \n"); - - cxt->is_active_data =false; - cxt->acc_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->acc_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.acc_data.values[0] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[1] = ACC_INVALID_VALUE; - cxt->drv_data.acc_data.values[2] = ACC_INVALID_VALUE; - } - } - - } - acc_real_enable(enable); - return 0; -} - - - -int acc_enable_nodata(int enable) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_ERR("acc_enable_nodata:acc ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - acc_real_enable(enable); - return 0; -} - - -static ssize_t acc_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_enable nodata buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc_ctl enable nodata NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - //cxt->acc_ctl.enable_nodata(1); - acc_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - //cxt->acc_ctl.enable_nodata(0); - acc_enable_nodata(0); - } - else - { - ACC_ERR(" acc_store enable nodata cmd error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); -} - -static ssize_t acc_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_active buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.open_report_data) - { - ACC_LOG("acc_ctl enable NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->acc_ctl.enable(1); - acc_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->acc_ctl.enable(0); - acc_enable_data(0); - } - else - { - ACC_ERR(" acc_store_active error !!\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t acc_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - cxt = acc_context_obj; - int div=cxt->acc_data.vender_div; - ACC_LOG("acc vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t acc_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(NULL == cxt->acc_ctl.set_delay) - { - ACC_LOG("acc_ctl set_delay NULL\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ACC_ERR("invalid format!!\n"); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; - } - - if(false == cxt->acc_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&acc_context_obj->delay, mdelay); - } - cxt->acc_ctl.set_delay(delay); - ACC_LOG(" acc_delay %d ns\n",delay); - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ACC_LOG(" not support now\n"); - return len; -} - -static ssize_t acc_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct acc_context *cxt = NULL; - char *devname = NULL; - cxt = acc_context_obj; - devname = dev_name(&cxt->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t acc_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ACC_LOG("acc_store_batch buf=%s\n",buf); - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - if(cxt->acc_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - ACC_ERR(" acc_store_batch error !!\n"); - } - }else{ - ACC_LOG(" acc_store_batch mot supported\n"); - } - mutex_unlock(&acc_context_obj->acc_op_mutex); - ACC_LOG(" acc_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t acc_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t acc_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&acc_context_obj->acc_op_mutex); - struct acc_context *devobj = (struct acc_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&acc_context_obj->acc_op_mutex); - return count; -} - -static ssize_t acc_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static int gsensor_remove(struct platform_device *pdev) -{ - ACC_LOG("gsensor_remove\n"); - return 0; -} - -static int gsensor_probe(struct platform_device *pdev) -{ - ACC_LOG("gsensor_probe\n"); - return 0; -} - -static struct platform_driver gsensor_driver = { - .probe = gsensor_probe, - .remove = gsensor_remove, - .driver = - { - .name = "gsensor", - } -}; - -static int acc_real_driver_init(void) -{ - int i =0; - int err=0; - ACC_LOG(" acc_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - ACC_LOG(" i=%d\n",i); - if(0 != gsensor_init_list[i]) - { - ACC_LOG(" acc try to init driver %s\n", gsensor_init_list[i]->name); - err = gsensor_init_list[i]->init(); - if(0 == err) - { - ACC_LOG(" acc real driver %s probe ok\n", gsensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - ACC_LOG(" acc_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int acc_driver_add(struct acc_init_info* obj) -{ - int err=0; - int i =0; - - ACC_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - ACC_LOG("register gensor driver for the first time\n"); - if(platform_driver_register(&gsensor_driver)) - { - ACC_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == gsensor_init_list[i]) - { - obj->platform_diver_addr = &gsensor_driver; - gsensor_init_list[i] = obj; - break; - } - } - if(NULL==gsensor_init_list[i]) - { - ACC_ERR("ACC driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(acc_driver_add); - -static int acc_misc_init(struct acc_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ACC_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ACC_ERR("unable to register acc misc device!!\n"); - } - //dev_set_drvdata(cxt->mdev.this_device, cxt); - return err; -} - -static void acc_input_destroy(struct acc_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int acc_input_init(struct acc_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ACC_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ACCEL_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ACCEL_X, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Y, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_Z, ACC_VALUE_MIN, ACC_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ACCEL_STATUS, ACC_STATUS_MIN, ACC_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(accenablenodata, S_IWUSR | S_IRUGO, acc_show_enable_nodata, acc_store_enable_nodata); -DEVICE_ATTR(accactive, S_IWUSR | S_IRUGO, acc_show_active, acc_store_active); -DEVICE_ATTR(accdelay, S_IWUSR | S_IRUGO, acc_show_delay, acc_store_delay); -DEVICE_ATTR(accbatch, S_IWUSR | S_IRUGO, acc_show_batch, acc_store_batch); -DEVICE_ATTR(accflush, S_IWUSR | S_IRUGO, acc_show_flush, acc_store_flush); -DEVICE_ATTR(accdevnum, S_IWUSR | S_IRUGO, acc_show_sensordevnum, NULL); - -static struct attribute *acc_attributes[] = { - &dev_attr_accenablenodata.attr, - &dev_attr_accactive.attr, - &dev_attr_accdelay.attr, - &dev_attr_accbatch.attr, - &dev_attr_accflush.attr, - &dev_attr_accdevnum.attr, - NULL -}; - -static struct attribute_group acc_attribute_group = { - .attrs = acc_attributes -}; - -int acc_register_data_path(struct acc_data_path *data) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_data.get_data = data->get_data; - cxt->acc_data.vender_div = data->vender_div; - ACC_LOG("acc register data path vender_div: %d\n", cxt->acc_data.vender_div); - if(NULL == cxt->acc_data.get_data) - { - ACC_LOG("acc register data path fail \n"); - return -1; - } - return 0; -} - -int acc_register_control_path(struct acc_control_path *ctl) -{ - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - cxt->acc_ctl.set_delay = ctl->set_delay; - cxt->acc_ctl.open_report_data= ctl->open_report_data; - cxt->acc_ctl.enable_nodata = ctl->enable_nodata; - cxt->acc_ctl.is_support_batch = ctl->is_support_batch; - cxt->acc_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->acc_ctl.set_delay || NULL==cxt->acc_ctl.open_report_data - || NULL==cxt->acc_ctl.enable_nodata) - { - ACC_LOG("acc register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = acc_misc_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&acc_context_obj->mdev.this_device->kobj, - &acc_attribute_group); - if (err < 0) - { - ACC_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&acc_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int acc_data_report(int x, int y, int z,int status) -{ - //ACC_LOG("+acc_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct acc_context *cxt = NULL; - int err =0; - cxt = acc_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_ACCEL_STATUS, status); - input_sync(cxt->idev); -} - -static int acc_probe(struct platform_device *pdev) -{ - - int err; - ACC_LOG("+++++++++++++accel_probe!!\n"); - - acc_context_obj = acc_context_alloc_object(); - if (!acc_context_obj) - { - err = -ENOMEM; - ACC_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real acceleration driver - err = acc_real_driver_init(); - if(err) - { - ACC_ERR("acc real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = acc_input_init(acc_context_obj); - if(err) - { - ACC_ERR("unable to register acc input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(acc_context_obj->early_suspend), 0); - acc_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - acc_context_obj->early_drv.suspend = acc_early_suspend, - acc_context_obj->early_drv.resume = acc_late_resume, - register_early_suspend(&acc_context_obj->early_drv); - - - ACC_LOG("----accel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ACC_ERR("sysfs node creation error \n"); - acc_input_destroy(acc_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(acc_context_obj); - - exit_alloc_data_failed: - - - ACC_LOG("----accel_probe fail !!!\n"); - return err; -} - - - -static int acc_remove(struct platform_device *pdev) -{ - ACC_FUN(f); - int err=0; - input_unregister_device(acc_context_obj->idev); - sysfs_remove_group(&acc_context_obj->idev->dev.kobj, - &acc_attribute_group); - - if((err = misc_deregister(&acc_context_obj->mdev))) - { - ACC_ERR("misc_deregister fail: %d\n", err); - } - kfree(acc_context_obj); - - return 0; -} - -static void acc_early_suspend(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 1); - ACC_LOG(" acc_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void acc_late_resume(struct early_suspend *h) -{ - atomic_set(&(acc_context_obj->early_suspend), 0); - ACC_LOG(" acc_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(acc_context_obj->early_suspend))); - return ; -} - -static int acc_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int acc_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver acc_driver = -{ - .probe = acc_probe, - .remove = acc_remove, - .suspend = acc_suspend, - .resume = acc_resume, - .driver = - { - .name = ACC_PL_DEV_NAME, - } -}; - -static int __init acc_init(void) -{ - ACC_FUN(); - - if(platform_driver_register(&acc_driver)) - { - ACC_ERR("failed to register acc driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit acc_exit(void) -{ - platform_driver_unregister(&acc_driver); - platform_driver_unregister(&gsensor_driver); -} - -module_init(acc_init); -module_exit(acc_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ACCELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/accel.h b/arch/arm/mach-mt8127/ttab/accelerometer/accel.h deleted file mode 100644 index 034516d99ca..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/accel.h +++ /dev/null @@ -1,123 +0,0 @@ - -#ifndef __ACC_H__ -#define __ACC_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ACC_TAG " " -#define ACC_FUN(f) printk(KERN_ERR ACC_TAG"%s\n", __func__) -#define ACC_ERR(fmt, args...) printk(KERN_ERR ACC_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ACC_LOG(fmt, args...) printk(KERN_ERR ACC_TAG fmt, ##args) -#define ACC_VER(fmt, args...) printk(KERN_ERR ACC_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ACC_DELAY 0X01 -#define OP_ACC_ENABLE 0X02 -#define OP_ACC_GET_DATA 0X04 - -#define ACC_INVALID_VALUE -1 - -#define EVENT_TYPE_ACCEL_X ABS_X -#define EVENT_TYPE_ACCEL_Y ABS_Y -#define EVENT_TYPE_ACCEL_Z ABS_Z -#define EVENT_TYPE_ACCEL_STATUS ABS_WHEEL -#define EVENT_TYPE_ACCEL_DIV ABS_GAS - - -#define ACC_VALUE_MAX (32767) -#define ACC_VALUE_MIN (-32768) -#define ACC_STATUS_MIN (0) -#define ACC_STATUS_MAX (64) -#define ACC_DIV_MAX (32767) -#define ACC_DIV_MIN (1) - - -#define MAX_CHOOSE_G_NUM 5 - -struct acc_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag -}; - -struct acc_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct acc_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct acc_data{ - hwm_sensor_data acc_data ; - int data_updata; - //struct mutex lock; -}; - -struct acc_drv_obj { - void *self; - int polling; - int (*acc_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct acc_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex acc_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct acc_drv_obj drv_obj; - struct acc_data drv_data; - struct acc_control_path acc_ctl; - struct acc_data_path acc_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; //version2.this is used for judging whether sensor is in batch mode -}; - -//driver API for internal -//extern int acc_enable_nodata(int enable); -//extern int acc_attach(struct acc_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int acc_driver_add(struct acc_init_info* obj) ; -extern int acc_data_report(int x, int y, int z,int status); -extern int acc_register_control_path(struct acc_control_path *ctl); -extern int acc_register_data_path(struct acc_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/cust_acc.c b/arch/arm/mach-mt8127/ttab/accelerometer/cust_acc.c deleted file mode 100644 index 88d72fb66f6..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/cust_acc.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - - -/*---------------------------------------------------------------------------*/ -static struct acc_hw cust_acc_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 0, //old value 16 /*!< don't enable low pass fileter */ -}; -/*---------------------------------------------------------------------------*/ -struct acc_hw* get_cust_acc_hw(void) -{ - return &cust_acc_hw; -} diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/inc/cust_acc.h b/arch/arm/mach-mt8127/ttab/accelerometer/inc/cust_acc.h deleted file mode 100644 index 3bcb8dbb185..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/inc/cust_acc.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __CUST_ACC_H__ -#define __CUST_ACC_H__ - -#include - -#define G_CUST_I2C_ADDR_NUM 2 - -struct acc_hw { - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the VDD Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct acc_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the VIO Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct acc_hw* get_cust_acc_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.c b/arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.c deleted file mode 100644 index 45f8e2c9cab..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.c +++ /dev/null @@ -1,2249 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -/*----------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -#define SW_CALIBRATION -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050G" /* name must different with gyro mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#ifndef CONFIG_HAS_EARLYSUSPEND -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) ; -static int mpu6050_resume(struct i2c_client *client); -#endif -/*----------------------------------------------------------------------------*/ -typedef enum -{ - MPU6050_TRC_FILTER = 0x01, - MPU6050_TRC_RAWDATA = 0x02, - MPU6050_TRC_IOCTL = 0x04, - MPU6050_TRC_CALI = 0X08, - MPU6050_TRC_INFO = 0X10, -} MPU6050_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct acc_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif - u8 bandwidth; -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gsensor_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; -static GSENSOR_VECTOR3D gsensor_gain; -static char selftestRes[8]= {0}; - - -/*----------------------------------------------------------------------------*/ -#define GSE_TAG "[Gsensor] " -#define GSE_FUN(f) printk(GSE_TAG"%s\n", __FUNCTION__) -#define GSE_ERR(fmt, args...) printk(GSE_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GSE_LOG(fmt, args...) printk(GSE_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_data_resolution[] = { - /*8 combination by {FULL_RES,RANGE}*/ - {{ 0, 6}, 16384}, /*+/-2g in 16-bit resolution: 0.06 mg/LSB*/ - {{ 0, 12}, 8192}, /*+/-4g in 16-bit resolution: 0.12 mg/LSB*/ - {{ 0, 24}, 4096}, /*+/-8g in 16-bit resolution: 0.24 mg/LSB*/ - {{ 0, 5}, 2048}, /*+/-16g in 16-bit resolution: 0.49 mg/LSB*/ -}; -/*----------------------------------------------------------------------------*/ -static struct data_resolution mpu6050_offset_resolution = {{ 0, 5}, 2048}; - -static unsigned int power_on = 0; - -extern int MPU6050_gyro_power(void); -extern int MPU6050_gyro_mode(void); - - -int MPU6050_gse_power( void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gse_power); - -int MPU6050_gse_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gse_mode); - - -int MPU6050_i2c_master_send(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_send null ptr!!\n"); - } - else - { - res = i2c_master_send(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_send); - -int MPU6050_i2c_master_recv(u8 *buf, u8 len) -{ - int res = 0; - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_i2c_master_recv null ptr!!\n"); - } - else - { - res = i2c_master_recv(mpu6050_i2c_client, buf, len); - } - - return res; -} -EXPORT_SYMBOL(MPU6050_i2c_master_recv); -/*----------------------------------------------------------------------------*/ -static int mpu_i2c_read_block(struct i2c_client *client, u8 addr, u8 *data, u8 len){ - u8 beg = addr; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, .flags = 0, - .len = 1, .buf = &beg - }, - { - .addr = client->addr, .flags = I2C_M_RD, - .len = len, .buf = data, - } - }; - int err; - - if (!client) - return -EINVAL; - else if (len > C_I2C_FIFO_SIZE) { - GSE_ERR(" length %d exceeds %d\n", len, C_I2C_FIFO_SIZE); - return -EINVAL; - } - - err = i2c_transfer(client->adapter, msgs, sizeof(msgs)/sizeof(msgs[0])); - if (err != 2) { - GSE_ERR("i2c_transfer error: (%d %p %d) %d\n", - addr, data, len, err); - err = -EIO; - } else { - err = 0; - } - return err; - -} -int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_block null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, len); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_block); - - -int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf) -{ - if (NULL == mpu6050_i2c_client) - { - GSE_ERR("MPU6050_hwmsen_read_byte null ptr!!\n"); - return MPU6050_ERR_I2C; - } - return mpu_i2c_read_block(mpu6050_i2c_client, addr, buf, 1); -} -EXPORT_SYMBOL(MPU6050_hwmsen_read_byte); -/*--------------------mpu6050 power control function----------------------------------*/ -static void MPU6050_power(struct acc_hw *hw, unsigned int on) -{ - - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GSE_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GSE_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050G")) - { - GSE_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gyro_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050G")) - { - GSE_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2]; - int res = 0; - //u8 addr = MPU6050_REG_POWER_CTL; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - - if (enable == sensor_power) - { - GSE_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - /* - res = i2c_master_recv(client, databuf, 1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - */ - - databuf[0] &= ~MPU6050_SLEEP; - - if (enable == FALSE) - { - if (MPU6050_gyro_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - GSE_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else if (atomic_read(&obj->trace) & MPU6050_TRC_INFO) - { - GSE_LOG("set power mode ok %d!\n", databuf[1]); - } - - msleep(200); - - sensor_power = enable; - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataResolution(struct mpu6050_i2c_data *obj) -{ - int err; - u8 dat, reso; - - if ((err = mpu_i2c_read_block(obj->client, MPU6050_REG_DATA_FORMAT, &dat, 1))) - { - GSE_ERR("write data format fail!!\n"); - return err; - } - - /*the data_reso is combined by 3 bits: {FULL_RES, DATA_RANGE}*/ - reso = 0x00; - reso = (dat & MPU6050_RANGE_16G) >> 3; - - if (reso < sizeof(mpu6050_data_resolution)/sizeof(mpu6050_data_resolution[0])) - { - obj->reso = &mpu6050_data_resolution[reso]; - return 0; - } - else - { - return -EINVAL; - } -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadData(struct i2c_client *client, s16 data[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *priv = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - int err = 0; - - - if (NULL == client) - { - return -EINVAL; - } - - { - /* write then burst read */ - mpu_i2c_read_block(client, MPU6050_REG_DATAX0, buf, MPU6050_DATA_LEN); - - data[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2] << 8) | - (buf[MPU6050_AXIS_X*2+1] )); - data[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2] << 8) | - (buf[MPU6050_AXIS_Y*2+1] )); - data[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2] << 8) | - (buf[MPU6050_AXIS_Z*2+1] )); - - if (atomic_read(&priv->trace) & MPU6050_TRC_RAWDATA) - { - GSE_LOG("[%08X %08X %08X] => [%5d %5d %5d]\n", data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } -#ifdef CONFIG_MPU6050_LOWPASS - if (atomic_read(&priv->filter)) - { - if (atomic_read(&priv->fir_en) && !atomic_read(&priv->suspend)) - { - int idx, firlen = atomic_read(&priv->firlen); - if (priv->fir.num < firlen) - { - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d]\n", priv->fir.num, - priv->fir.raw[priv->fir.num][MPU6050_AXIS_X], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Y], priv->fir.raw[priv->fir.num][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z]); - } - priv->fir.num++; - priv->fir.idx++; - } - else - { - idx = priv->fir.idx % firlen; - priv->fir.sum[MPU6050_AXIS_X] -= priv->fir.raw[idx][MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] -= priv->fir.raw[idx][MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] -= priv->fir.raw[idx][MPU6050_AXIS_Z]; - priv->fir.raw[idx][MPU6050_AXIS_X] = data[MPU6050_AXIS_X]; - priv->fir.raw[idx][MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y]; - priv->fir.raw[idx][MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z]; - priv->fir.sum[MPU6050_AXIS_X] += data[MPU6050_AXIS_X]; - priv->fir.sum[MPU6050_AXIS_Y] += data[MPU6050_AXIS_Y]; - priv->fir.sum[MPU6050_AXIS_Z] += data[MPU6050_AXIS_Z]; - priv->fir.idx++; - data[MPU6050_AXIS_X] = priv->fir.sum[MPU6050_AXIS_X]/firlen; - data[MPU6050_AXIS_Y] = priv->fir.sum[MPU6050_AXIS_Y]/firlen; - data[MPU6050_AXIS_Z] = priv->fir.sum[MPU6050_AXIS_Z]/firlen; - if (atomic_read(&priv->trace) & MPU6050_TRC_FILTER) - { - GSE_LOG("add [%2d] [%5d %5d %5d] => [%5d %5d %5d] : [%5d %5d %5d]\n", idx, - priv->fir.raw[idx][MPU6050_AXIS_X], priv->fir.raw[idx][MPU6050_AXIS_Y], priv->fir.raw[idx][MPU6050_AXIS_Z], - priv->fir.sum[MPU6050_AXIS_X], priv->fir.sum[MPU6050_AXIS_Y], priv->fir.sum[MPU6050_AXIS_Z], - data[MPU6050_AXIS_X], data[MPU6050_AXIS_Y], data[MPU6050_AXIS_Z]); - } - } - } - } -#endif - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadOffset(struct i2c_client *client, s8 ofs[MPU6050_AXES_NUM]) -{ - int err = 0; -#ifdef SW_CALIBRATION - ofs[0]=ofs[1]=ofs[2]=0x0; -#else - if ((err = mpu_i2c_read_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - //GSE_LOG("offesx=%x, y=%x, z=%x",ofs[0],ofs[1],ofs[2]); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifndef SW_CALIBRATION - s8 ofs[MPU6050_AXES_NUM] = {0x00, 0x00, 0x00}; -#endif - int err = 0; -#ifdef SW_CALIBRATION - /* do not thing */ -#else - - if ((err = hwmsen_write_block(client, MPU6050_REG_OFSX, ofs, MPU6050_AXES_NUM))) - { - GSE_ERR("error: %d\n", err); - } -#endif - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - memset(obj->offset, 0x00, sizeof(obj->offset)); - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*(obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]); - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*(obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]); - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*(obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibrationEx(struct i2c_client *client, int act[MPU6050_AXES_NUM], int raw[MPU6050_AXES_NUM]) -{ - /*raw: the raw calibration data; act: the actual calibration data*/ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); -#ifdef SW_CALIBRATION - int mul; -#else - int err; -#endif -#ifdef SW_CALIBRATION - mul = 0;//only SW Calibration, disable HW Calibration -#else - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; -#endif - - raw[MPU6050_AXIS_X] = obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X]; - raw[MPU6050_AXIS_Y] = obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y]; - raw[MPU6050_AXIS_Z] = obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z]; - - act[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*raw[MPU6050_AXIS_X]; - act[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*raw[MPU6050_AXIS_Y]; - act[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*raw[MPU6050_AXIS_Z]; - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - int cali[MPU6050_AXES_NUM], raw[MPU6050_AXES_NUM]; -#ifndef SW_CALIBRATION - int lsb = mpu6050_offset_resolution.sensitivity; - int divisor = obj->reso->sensitivity/lsb; -#endif - if ((err = MPU6050_ReadCalibrationEx(client, cali, raw))) /*offset will be updated in obj->offset*/ - { - GSE_ERR("read offset fail, %d\n", err); - return err; - } - - GSE_LOG("OLDOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - raw[MPU6050_AXIS_X], raw[MPU6050_AXIS_Y], raw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - /*calculate the real offset expected by caller*/ - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; - - GSE_LOG("UPDATE: (%+3d %+3d %+3d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z]); -#ifdef SW_CALIBRATION - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]]); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]]); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]]); -#else - - obj->offset[MPU6050_AXIS_X] = (s8)(obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])/(divisor)); - obj->offset[MPU6050_AXIS_Y] = (s8)(obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])/(divisor)); - obj->offset[MPU6050_AXIS_Z] = (s8)(obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])/(divisor)); - - /*convert software calibration using standard calibration*/ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*(cali[obj->cvt.map[MPU6050_AXIS_X]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*(cali[obj->cvt.map[MPU6050_AXIS_Y]])%(divisor); - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*(cali[obj->cvt.map[MPU6050_AXIS_Z]])%(divisor); - - GSE_LOG("NEWOFF: (%+3d %+3d %+3d): (%+3d %+3d %+3d) / (%+3d %+3d %+3d)\n", - obj->offset[MPU6050_AXIS_X]*divisor + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*divisor + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*divisor + obj->cali_sw[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - if ((err = hwmsen_write_block(obj->client, MPU6050_REG_OFSX, obj->offset, MPU6050_AXES_NUM))) - { - GSE_ERR("write offset fail: %d\n", err); - return err; - } -#endif - - return err; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_CheckDeviceID(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - databuf[0] = MPU6050_REG_DEVID; - - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - goto exit_MPU6050_CheckDeviceID; - } - - GSE_LOG("MPU6050_CheckDeviceID 0x%x\n", databuf[0]); - - exit_MPU6050_CheckDeviceID: - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - /* write */ - databuf[1] = databuf[0] | dataformat; - databuf[0] = MPU6050_REG_DATA_FORMAT; - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - return MPU6050_SetDataResolution(obj); -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetBWRate(struct i2c_client *client, u8 bwrate) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 databuf[10]; - int res = 0; - - if( (obj->bandwidth != bwrate) || (atomic_read(&obj->suspend)) ) - { - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_BW_RATE; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | bwrate; - databuf[0] = MPU6050_REG_BW_RATE; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - obj->bandwidth = bwrate; - } - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Dev_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*10); - - /* read */ - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - - /* write */ - databuf[1] = databuf[0] | MPU6050_DEV_RESET; - databuf[0] = MPU6050_REG_POWER_CTL; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - do - { - databuf[0] = MPU6050_REG_POWER_CTL; - res = i2c_master_send(client, databuf, 0x1); - - udelay(500); - - databuf[0] = 0x0; - res = i2c_master_recv(client, databuf, 0x01); - - printk("[Gsensor] check reset bit"); - - }while((databuf[0]&MPU6050_DEV_RESET) != 0); - - msleep(50); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_Reset(struct i2c_client *client) -{ - u8 databuf[10]; - int res = 0; - - /* write */ - databuf[1] = 0x7; /* reset gyro, g-sensor, temperature */ - databuf[0] = MPU6050_REG_RESET; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - msleep(20); - return MPU6050_SUCCESS; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetIntEnable(struct i2c_client *client, u8 intenable) -{ - u8 databuf[2]; - int res = 0; - - memset(databuf, 0, sizeof(u8)*2); - databuf[0] = MPU6050_REG_INT_ENABLE; - databuf[1] = intenable; - - res = i2c_master_send(client, databuf, 0x2); - - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ -//because we donot use EINT to support low power -// config to GPIO input mode + PD - -//set to GPIO_GSE_1_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_1_EINT_PIN, GPIO_GSE_1_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_1_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_1_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_1_EINT_PIN, GPIO_PULL_DOWN); - */ -//set to GPIO_GSE_2_EINT_PIN - /* - mt_set_gpio_mode(GPIO_GSE_2_EINT_PIN, GPIO_GSE_2_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GSE_2_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GSE_2_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GSE_2_EINT_PIN, GPIO_PULL_DOWN); - */ - return 0; -} - -static int mpu6050_init_client(struct i2c_client *client, int reset_cali) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - res = MPU6050_CheckDeviceID(client); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("Check ID error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetDataFormat(client, MPU6050_RANGE_16G); - if (res != MPU6050_SUCCESS) //0x2C->BW=100Hz - { - GSE_ERR("set data format error\n"); - return res; - } - - gsensor_gain.x = gsensor_gain.y = gsensor_gain.z = obj->reso->sensitivity; - - res = MPU6050_SetIntEnable(client, 0x00);//disable INT - if (res != MPU6050_SUCCESS) - { - GSE_ERR("mpu6050_SetIntEnable error\n"); - return res; - } - - if (0 != reset_cali) - { - /*reset calibration only in power on*/ - res = MPU6050_ResetCalibration(client); - if (res != MPU6050_SUCCESS) - { - return res; - } - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - msleep(20); - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadAllReg(struct i2c_client *client, char *buf, int bufsize) -{ - u8 total_len= 0x5C; //(0x75-0x19); - - u8 addr = 0x19; - u8 buff[total_len+1]; - int err = 0; - int i; - - - if (sensor_power == FALSE) - { - err = MPU6050_SetPowerMode(client, true); - if (err) - { - GSE_ERR("Power on mpu6050 error %d!\n", err); - } - } - - mpu_i2c_read_block(client, addr, buff, total_len); - - for ( i=0; i<=total_len; i++) - { - GSE_LOG("MPU6050 reg=0x%x, data=0x%x \n",(addr+i), buff[i]); - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadSensorData(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; //(struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int acc[MPU6050_AXES_NUM]; - int res = 0; - client = obj->client; - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - if (sensor_power == FALSE) - { - res = MPU6050_SetPowerMode(client, true); - if (res) - { - GSE_ERR("Power on mpu6050 error %d!\n", res); - } - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return -3; - } - else - { - obj->data[MPU6050_AXIS_X] += obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] += obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] += obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - acc[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - acc[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - acc[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the mg - acc[MPU6050_AXIS_X] = acc[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Y] = acc[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - acc[MPU6050_AXIS_Z] = acc[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - - sprintf(buf, "%04x %04x %04x", acc[MPU6050_AXIS_X], acc[MPU6050_AXIS_Y], acc[MPU6050_AXIS_Z]); - if (atomic_read(&obj->trace) & MPU6050_TRC_IOCTL) - { - GSE_LOG("gsensor data: %s!\n", buf); - } - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadRawData(struct i2c_client *client, char *buf) -{ - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - int res = 0; - - if (!buf || !client) - { - return EINVAL; - } - - - if (atomic_read(&obj->suspend)) - { - return EIO; - } - - if ((res = MPU6050_ReadData(client, obj->data))) - { - GSE_ERR("I2C error: ret value=%d", res); - return EIO; - } - else - { - sprintf(buf, "%04x %04x %04x", obj->data[MPU6050_AXIS_X], - obj->data[MPU6050_AXIS_Y], obj->data[MPU6050_AXIS_Z]); - - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_InitSelfTest(struct i2c_client *client) -{ - int res = 0; - u8 data; - - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - GSE_ERR("set power error\n"); - return res; - } - - res = MPU6050_SetBWRate(client, MPU6050_BW_184HZ); - if (res != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - return res; - } - - res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &data, 1); - - if (res != MPU6050_SUCCESS) - { - return res; - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_JudgeTestResult(struct i2c_client *client, s32 prv[MPU6050_AXES_NUM], s32 nxt[MPU6050_AXES_NUM]) -{ - struct criteria - { - int min; - int max; - }; - - struct criteria self[4][3] = { - {{ 0, 540}, { 0, 540}, { 0, 875}}, - {{ 0, 270}, { 0, 270}, { 0, 438}}, - {{ 0, 135}, { 0, 135}, { 0, 219}}, - {{ 0, 67}, { 0, 67}, { 0, 110}}, - }; - struct criteria (*ptr)[3] = NULL; - u8 format; - int res; - if ((res = mpu_i2c_read_block(client, MPU6050_REG_DATA_FORMAT, &format, 1))) - return res; - - format = format & MPU6050_RANGE_16G; - - switch (format) - { - case MPU6050_RANGE_2G: - GSE_LOG("format use self[0]\n"); - ptr = &self[0]; - break; - - case MPU6050_RANGE_4G: - GSE_LOG("format use self[1]\n"); - ptr = &self[1]; - break; - - case MPU6050_RANGE_8G: - GSE_LOG("format use self[2]\n"); - ptr = &self[2]; - break; - - case MPU6050_RANGE_16G: - GSE_LOG("format use self[3]\n"); - ptr = &self[3]; - break; - - default: - GSE_LOG("format unknow use \n"); - break; - } - - if (!ptr) - { - GSE_ERR("null pointer\n"); - return -EINVAL; - } - GSE_LOG("format=0x%x\n",format); - - GSE_LOG("X diff is %ld\n",abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X])); - GSE_LOG("Y diff is %ld\n",abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y])); - GSE_LOG("Z diff is %ld\n",abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z])); - - - if ((abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) > (*ptr)[MPU6050_AXIS_X].max) || - (abs(nxt[MPU6050_AXIS_X] - prv[MPU6050_AXIS_X]) < (*ptr)[MPU6050_AXIS_X].min)) - { - GSE_ERR("X is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) > (*ptr)[MPU6050_AXIS_Y].max) || - (abs(nxt[MPU6050_AXIS_Y] - prv[MPU6050_AXIS_Y]) < (*ptr)[MPU6050_AXIS_Y].min)) - { - GSE_ERR("Y is over range\n"); - res = -EINVAL; - } - if ((abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) > (*ptr)[MPU6050_AXIS_Z].max) || - (abs(nxt[MPU6050_AXIS_Z] - prv[MPU6050_AXIS_Z]) < (*ptr)[MPU6050_AXIS_Z].min)) - { - GSE_ERR("Z is over range\n"); - res = -EINVAL; - } - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - MPU6050_ReadAllReg(client, strbuf, MPU6050_BUFSIZE); - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_cali_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - int err, len = 0, mul; - int tmp[MPU6050_AXES_NUM]; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - - - if ((err = MPU6050_ReadOffset(client, obj->offset))) - { - return -EINVAL; - } - else if ((err = MPU6050_ReadCalibration(client, tmp))) - { - return -EINVAL; - } - else - { - mul = obj->reso->sensitivity/mpu6050_offset_resolution.sensitivity; - len += snprintf(buf+len, PAGE_SIZE-len, "[HW ][%d] (%+3d, %+3d, %+3d) : (0x%02X, 0x%02X, 0x%02X)\n", mul, - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z], - obj->offset[MPU6050_AXIS_X], obj->offset[MPU6050_AXIS_Y], obj->offset[MPU6050_AXIS_Z]); - len += snprintf(buf+len, PAGE_SIZE-len, "[SW ][%d] (%+3d, %+3d, %+3d)\n", 1, - obj->cali_sw[MPU6050_AXIS_X], obj->cali_sw[MPU6050_AXIS_Y], obj->cali_sw[MPU6050_AXIS_Z]); - - len += snprintf(buf+len, PAGE_SIZE-len, "[ALL] (%+3d, %+3d, %+3d) : (%+3d, %+3d, %+3d)\n", - obj->offset[MPU6050_AXIS_X]*mul + obj->cali_sw[MPU6050_AXIS_X], - obj->offset[MPU6050_AXIS_Y]*mul + obj->cali_sw[MPU6050_AXIS_Y], - obj->offset[MPU6050_AXIS_Z]*mul + obj->cali_sw[MPU6050_AXIS_Z], - tmp[MPU6050_AXIS_X], tmp[MPU6050_AXIS_Y], tmp[MPU6050_AXIS_Z]); - - return len; - } -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_cali_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = mpu6050_i2c_client; - int err, x, y, z; - int dat[MPU6050_AXES_NUM]; - - if (!strncmp(buf, "rst", 3)) - { - if ((err = MPU6050_ResetCalibration(client))) - { - GSE_ERR("reset offset err = %d\n", err); - } - } - else if (3 == sscanf(buf, "0x%02X 0x%02X 0x%02X", &x, &y, &z)) - { - dat[MPU6050_AXIS_X] = x; - dat[MPU6050_AXIS_Y] = y; - dat[MPU6050_AXIS_Z] = z; - if ((err = MPU6050_WriteCalibration(client, dat))) - { - GSE_ERR("write calibration err = %d\n", err); - } - } - else - { - GSE_ERR("invalid format\n"); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_self_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - return snprintf(buf, 8, "%s\n", selftestRes); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_self_value(struct device_driver *ddri, const char *buf, size_t count) -{ /*write anything to this register will trigger the process*/ - struct item - { - s16 raw[MPU6050_AXES_NUM]; - }; - - struct i2c_client *client = mpu6050_i2c_client; - int idx, res, num; - struct item *prv = NULL, *nxt = NULL; - s32 avg_prv[MPU6050_AXES_NUM] = {0, 0, 0}; - s32 avg_nxt[MPU6050_AXES_NUM] = {0, 0, 0}; - - - if (1 != sscanf(buf, "%d", &num)) - { - GSE_ERR("parse number fail\n"); - return count; - } - else if (num == 0) - { - GSE_ERR("invalid data count\n"); - return count; - } - - prv = kzalloc(sizeof(*prv) * num, GFP_KERNEL); - nxt = kzalloc(sizeof(*nxt) * num, GFP_KERNEL); - if (!prv || !nxt) - { - goto exit; - } - - - GSE_LOG("NORMAL:\n"); - MPU6050_SetPowerMode(client,true); - - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, prv[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - - avg_prv[MPU6050_AXIS_X] += prv[idx].raw[MPU6050_AXIS_X]; - avg_prv[MPU6050_AXIS_Y] += prv[idx].raw[MPU6050_AXIS_Y]; - avg_prv[MPU6050_AXIS_Z] += prv[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", prv[idx].raw[MPU6050_AXIS_X], prv[idx].raw[MPU6050_AXIS_Y], prv[idx].raw[MPU6050_AXIS_Z]); - } - - avg_prv[MPU6050_AXIS_X] /= num; - avg_prv[MPU6050_AXIS_Y] /= num; - avg_prv[MPU6050_AXIS_Z] /= num; - - /*initial setting for self test*/ - GSE_LOG("SELFTEST:\n"); - for (idx = 0; idx < num; idx++) - { - if ((res = MPU6050_ReadData(client, nxt[idx].raw))) - { - GSE_ERR("read data fail: %d\n", res); - goto exit; - } - avg_nxt[MPU6050_AXIS_X] += nxt[idx].raw[MPU6050_AXIS_X]; - avg_nxt[MPU6050_AXIS_Y] += nxt[idx].raw[MPU6050_AXIS_Y]; - avg_nxt[MPU6050_AXIS_Z] += nxt[idx].raw[MPU6050_AXIS_Z]; - GSE_LOG("[%5d %5d %5d]\n", nxt[idx].raw[MPU6050_AXIS_X], nxt[idx].raw[MPU6050_AXIS_Y], nxt[idx].raw[MPU6050_AXIS_Z]); - } - - avg_nxt[MPU6050_AXIS_X] /= num; - avg_nxt[MPU6050_AXIS_Y] /= num; - avg_nxt[MPU6050_AXIS_Z] /= num; - - GSE_LOG("X: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_X], avg_prv[MPU6050_AXIS_X], avg_nxt[MPU6050_AXIS_X] - avg_prv[MPU6050_AXIS_X]); - GSE_LOG("Y: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Y], avg_prv[MPU6050_AXIS_Y], avg_nxt[MPU6050_AXIS_Y] - avg_prv[MPU6050_AXIS_Y]); - GSE_LOG("Z: %5d - %5d = %5d \n", avg_nxt[MPU6050_AXIS_Z], avg_prv[MPU6050_AXIS_Z], avg_nxt[MPU6050_AXIS_Z] - avg_prv[MPU6050_AXIS_Z]); - - if (!MPU6050_JudgeTestResult(client, avg_prv, avg_nxt)) - { - GSE_LOG("SELFTEST : PASS\n"); - strcpy(selftestRes,"y"); - } - else - { - GSE_LOG("SELFTEST : FAIL\n"); - strcpy(selftestRes,"n"); - } - - exit: - /*restore the setting*/ - mpu6050_init_client(client, 0); - kfree(prv); - kfree(nxt); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_selftest_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj; - - if (NULL == client) - { - GSE_ERR("i2c client is null!!\n"); - return 0; - } - - obj = i2c_get_clientdata(client); - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->selftest)); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_selftest_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int tmp; - - if (NULL == obj) - { - GSE_ERR("i2c data obj is null!!\n"); - return 0; - } - - - if (1 == sscanf(buf, "%d", &tmp)) - { - if (atomic_read(&obj->selftest) && !tmp) - { - /*enable -> disable*/ - mpu6050_init_client(obj->client, 0); - } - else if (!atomic_read(&obj->selftest) && tmp) - { - /*disable -> enable*/ - MPU6050_InitSelfTest(obj->client); - } - - GSE_LOG("selftest: %d => %d\n", atomic_read(&obj->selftest), tmp); - atomic_set(&obj->selftest, tmp); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_firlen_value(struct device_driver *ddri, char *buf) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - if (atomic_read(&obj->firlen)) - { - int idx, len = atomic_read(&obj->firlen); - GSE_LOG("len = %2d, idx = %2d\n", obj->fir.num, obj->fir.idx); - - for (idx = 0; idx < len; idx++) - { - GSE_LOG("[%5d %5d %5d]\n", obj->fir.raw[idx][MPU6050_AXIS_X], obj->fir.raw[idx][MPU6050_AXIS_Y], obj->fir.raw[idx][MPU6050_AXIS_Z]); - } - - GSE_LOG("sum = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X], obj->fir.sum[MPU6050_AXIS_Y], obj->fir.sum[MPU6050_AXIS_Z]); - GSE_LOG("avg = [%5d %5d %5d]\n", obj->fir.sum[MPU6050_AXIS_X]/len, obj->fir.sum[MPU6050_AXIS_Y]/len, obj->fir.sum[MPU6050_AXIS_Z]/len); - } - return snprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&obj->firlen)); -#else - return snprintf(buf, PAGE_SIZE, "not support\n"); -#endif -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_firlen_value(struct device_driver *ddri, const char *buf, size_t count) -{ -#ifdef CONFIG_MPU6050_LOWPASS - struct i2c_client *client = mpu6050_i2c_client; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int firlen; - - if (1 != sscanf(buf, "%d", &firlen)) - { - GSE_ERR("invallid format\n"); - } - else if (firlen > C_MAX_FIR_LENGTH) - { - GSE_ERR("exceeds maximum filter length\n"); - } - else - { - atomic_set(&obj->firlen, firlen); - if (0 == firlen) - { - atomic_set(&obj->fir_en, 0); - } - else - { - memset(&obj->fir, 0x00, sizeof(obj->fir)); - atomic_set(&obj->fir_en, 1); - } - } -#endif - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GSE_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GSE_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(cali, S_IWUSR | S_IRUGO, show_cali_value, store_cali_value); -static DRIVER_ATTR(self, S_IWUSR | S_IRUGO, show_selftest_value, store_selftest_value); -static DRIVER_ATTR(selftest, S_IWUSR | S_IRUGO, show_self_value , store_self_value ); -static DRIVER_ATTR(firlen, S_IWUSR | S_IRUGO, show_firlen_value, store_firlen_value); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *mpu6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_cali, /*show calibration data*/ - &driver_attr_self, /*self test demo*/ - &driver_attr_selftest, /*self control: 0: disable, 1: enable*/ - &driver_attr_firlen, /*filter length: 0: disable, others: enable*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, mpu6050_attr_list[idx]))) - { - GSE_ERR("driver_create_file (%s) = %d\n", mpu6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(mpu6050_attr_list)/sizeof(mpu6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, mpu6050_attr_list[idx]); - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int gsensor_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value, sample_delay; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gsensor_data; - char buff[MPU6050_BUFSIZE]; - - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - if(value <= 5) - { - sample_delay = MPU6050_BW_184HZ; - } - else if(value <= 10) - { - sample_delay = MPU6050_BW_94HZ; - } - else - { - sample_delay = MPU6050_BW_44HZ; - } - GSE_LOG("Set delay parameter value:%d \n", value); - - - err = MPU6050_SetBWRate(priv->client, sample_delay); - if (err != MPU6050_SUCCESS ) //0x2C->BW=100Hz - { - GSE_ERR("Set delay parameter error!\n"); - } - - if (value >= 50) - { - atomic_set(&priv->filter, 0); - } - else - { -#if defined(CONFIG_MPU6050_LOWPASS) - priv->fir.num = 0; - priv->fir.idx = 0; - priv->fir.sum[MPU6050_AXIS_X] = 0; - priv->fir.sum[MPU6050_AXIS_Y] = 0; - priv->fir.sum[MPU6050_AXIS_Z] = 0; -#endif - atomic_set(&priv->filter, 1); - } - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GSE_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GSE_LOG("Gsensor device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode( priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GSE_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gsensor_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadSensorData(priv->client, buff, MPU6050_BUFSIZE); - if (!err) - { - sscanf(buff, "%x %x %x", &gsensor_data->values[0], - &gsensor_data->values[1], &gsensor_data->values[2]); - gsensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gsensor_data->value_divide = 1000; - } - } - break; - default: - GSE_ERR("gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct mpu6050_i2c_data *obj = (struct mpu6050_i2c_data*)i2c_get_clientdata(client); - char strbuf[MPU6050_BUFSIZE]; - void __user *data; - SENSOR_DATA sensor_data; - long err = 0; - int cali[3]; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GSE_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GSENSOR_IOCTL_INIT: - mpu6050_init_client(client, 0); - break; - - case GSENSOR_IOCTL_READ_CHIPINFO: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadSensorData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_GAIN: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &gsensor_gain, sizeof(GSENSOR_VECTOR3D))) - { - err = -EFAULT; - break; - } - break; - - case GSENSOR_IOCTL_READ_RAW_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (atomic_read(&obj->suspend)) - { - err = -EINVAL; - } - else - { - MPU6050_ReadRawData(client, strbuf); - if (copy_to_user(data, strbuf, strlen(strbuf)+1)) - { - err = -EFAULT; - break; - } - } - break; - - case GSENSOR_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - if (atomic_read(&obj->suspend)) - { - GSE_ERR("Perform calibration in suspend state!!\n"); - err = -EINVAL; - } - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Y] = sensor_data.y * obj->reso->sensitivity / GRAVITY_EARTH_1000; - cali[MPU6050_AXIS_Z] = sensor_data.z * obj->reso->sensitivity / GRAVITY_EARTH_1000; - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GSENSOR_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GSENSOR_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if ((err = MPU6050_ReadCalibration(client, cali))) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.y = cali[MPU6050_AXIS_Y] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - sensor_data.z = cali[MPU6050_AXIS_Z] * GRAVITY_EARTH_1000 / obj->reso->sensitivity; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - - - default: - GSE_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gsensor", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - GSE_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return err; - } - MPU6050_power(obj->hw, 0); - GSE_LOG("mpu6050_suspend ok\n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - GSE_LOG("mpu6050_resume ok\n"); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - - if ((err = MPU6050_SetPowerMode(obj->client, false))) - { - GSE_ERR("write power control fail!!\n"); - return; - } - - /* - if (MPU6050_gyro_mode() == false) - { - MPU6050_Dev_Reset(obj->client); - MPU6050_Reset(obj->client); - } - */ - - obj->bandwidth = 0; - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GSE_FUN(); - - if (obj == NULL) - { - GSE_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - - if ((err = mpu6050_init_client(obj->client, 0))) - { - GSE_ERR("initialize client fail!!\n"); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GSE_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_acc_hw(); - - if ((err = hwmsen_get_convert(obj->hw->direction, &obj->cvt))) - { - GSE_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - obj_i2c_data = obj; - obj->client = client; - obj->client->timing = 400; - - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - -#ifdef CONFIG_MPU6050_LOWPASS - if (obj->hw->firlen > C_MAX_FIR_LENGTH) - { - atomic_set(&obj->firlen, C_MAX_FIR_LENGTH); - } - else - { - atomic_set(&obj->firlen, obj->hw->firlen); - } - - if (atomic_read(&obj->firlen) > 0) - { - atomic_set(&obj->fir_en, 1); - } - -#endif - - mpu6050_i2c_client = new_client; - MPU6050_Dev_Reset(new_client); - MPU6050_Reset(new_client); - - if ((err = mpu6050_init_client(new_client, 1))) - { - goto exit_init_failed; - } - - - if ((err = misc_register(&mpu6050_device))) - { - GSE_ERR("mpu6050_device register failed\n"); - goto exit_misc_device_register_failed; - } - - - if ((err = mpu6050_create_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = gsensor_operate; - if ((err = hwmsen_attach(ID_ACCELEROMETER, &sobj))) - { - GSE_ERR("attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - GSE_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GSE_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - if ((err = mpu6050_delete_attr(&mpu6050_gsensor_driver.driver))) - { - GSE_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - if ((err = misc_deregister(&mpu6050_device))) - { - GSE_ERR("misc_deregister fail: %d\n", err); - } - - if ((err = hwmsen_detach(ID_ACCELEROMETER))) - { - GSE_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_FUN(); - - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GSE_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct acc_hw *hw = get_cust_acc_hw(); - - GSE_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gsensor_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gsensor", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050gse_init(void) -{ - struct acc_hw *hw = get_cust_acc_hw(); - GSE_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gsensor_driver)) - { - GSE_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050gse_exit(void) -{ - GSE_FUN(); - platform_driver_unregister(&mpu6050_gsensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050gse_init); -module_exit(mpu6050gse_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gse driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.h b/arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.h deleted file mode 100644 index 0d0993f2256..00000000000 --- a/arch/arm/mach-mt8127/ttab/accelerometer/mpu6050.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_I2C_SLAVE_ADDR 0xD0 - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_BW_RATE 0x1A -#define MPU6050_REG_POWER_CTL 0x6B -#define MPU6050_REG_POWER_CTL2 0x6C -#define MPU6050_REG_INT_ENABLE 0x38 -#define MPU6050_REG_DATA_FORMAT 0x1C -#define MPU6050_REG_DATAX0 0x3B -#define MPU6050_REG_DATAY0 0x3D -#define MPU6050_REG_DATAZ0 0x3F -#define MPU6050_REG_RESET 0x68 - -/* register Value */ -#define MPU6050_FIXED_DEVID 0x68 // or 0x69 - - // delay(ms) -#define MPU6050_BW_260HZ 0x00 //0 -#define MPU6050_BW_184HZ 0x01 //2.0 -#define MPU6050_BW_94HZ 0x02 //3.0 -#define MPU6050_BW_44HZ 0x03 //4.9 -#define MPU6050_BW_21HZ 0x04 //8.5 -#define MPU6050_BW_10HZ 0x05 //13.8 -#define MPU6050_BW_5HZ 0x06 //19.0 - -#define MPU6050_DEV_RESET 0x80 - -//#define MPU6050_FULL_RES 0x08 -#define MPU6050_RANGE_2G (0x00 << 3) -#define MPU6050_RANGE_4G (0x01 << 3) -#define MPU6050_RANGE_8G (0x02 << 3) -#define MPU6050_RANGE_16G (0x03 << 3) -//#define MPU6050_SELF_TEST 0x80 - - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - - -// below do not modify -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - - -#define MPU6050_BUFSIZE 256 - -#endif - diff --git a/arch/arm/mach-mt8127/ttab/alsps/APDS9930.c b/arch/arm/mach-mt8127/ttab/alsps/APDS9930.c deleted file mode 100644 index f5025af368d..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/APDS9930.c +++ /dev/null @@ -1,1990 +0,0 @@ -/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver - * - * Author: MingHsien Hsieh - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include -#include -#include -#include -#include -#include "APDS9930.h" -#include -/****************************************************************************** - * configuration -*******************************************************************************/ -/*----------------------------------------------------------------------------*/ - -#define APDS9930_DEV_NAME "APDS9930" -/*----------------------------------------------------------------------------*/ -#define APS_TAG "[ALS/PS] " -#define APS_FUN(f) printk(KERN_INFO APS_TAG"%s\n", __FUNCTION__) -#define APS_ERR(fmt, args...) printk(KERN_ERR APS_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define APS_LOG(fmt, args...) printk(KERN_ERR APS_TAG fmt, ##args) -#define APS_DBG(fmt, args...) printk(KERN_INFO APS_TAG fmt, ##args) - -#define I2C_FLAG_WRITE 0 -#define I2C_FLAG_READ 1 - - -/****************************************************************************** - * extern functions -*******************************************************************************/ -extern void mt_eint_mask(unsigned int eint_num); -extern void mt_eint_unmask(unsigned int eint_num); -extern void mt_eint_set_hw_debounce(unsigned int eint_num, unsigned int ms); -extern void mt_eint_set_polarity(unsigned int eint_num, unsigned int pol); -extern unsigned int mt_eint_set_sens(unsigned int eint_num, unsigned int sens); -extern void mt_eint_registration(unsigned int eint_num, unsigned int flow, void (EINT_FUNC_PTR)(void), unsigned int is_auto_umask); -extern void mt_eint_print_status(void); - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *APDS9930_i2c_client = NULL; -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id APDS9930_i2c_id[] = {{APDS9930_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_APDS9930={ I2C_BOARD_INFO("APDS9930", 0x39)}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int APDS9930_i2c_remove(struct i2c_client *client); -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg); -static int APDS9930_i2c_resume(struct i2c_client *client); - -static DEFINE_MUTEX(APDS9930_mutex); - - -static struct APDS9930_priv *g_APDS9930_ptr = NULL; - - struct PS_CALI_DATA_STRUCT -{ - int close; - int far_away; - int valid; -} ; - -static struct PS_CALI_DATA_STRUCT ps_cali={0,0,0}; -static int intr_flag_value = 0; -static unsigned long long int_top_time = 0; -/*----------------------------------------------------------------------------*/ -typedef enum { - CMC_BIT_ALS = 1, - CMC_BIT_PS = 2, -} CMC_BIT; -/*----------------------------------------------------------------------------*/ -struct APDS9930_i2c_addr { /*define a series of i2c slave address*/ - u8 write_addr; - u8 ps_thd; /*PS INT threshold*/ -}; -/*----------------------------------------------------------------------------*/ -struct APDS9930_priv { - struct alsps_hw *hw; - struct i2c_client *client; - struct work_struct eint_work; - - /*i2c address group*/ - struct APDS9930_i2c_addr addr; - - /*misc*/ - u16 als_modulus; - atomic_t i2c_retry; - atomic_t als_suspend; - atomic_t als_debounce; /*debounce time after enabling als*/ - atomic_t als_deb_on; /*indicates if the debounce is on*/ - atomic_t als_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_mask; /*mask ps: always return far away*/ - atomic_t ps_debounce; /*debounce time after enabling ps*/ - atomic_t ps_deb_on; /*indicates if the debounce is on*/ - atomic_t ps_deb_end; /*the jiffies representing the end of debounce*/ - atomic_t ps_suspend; - - - /*data*/ - u16 als; - u16 ps; - u8 _align; - u16 als_level_num; - u16 als_value_num; - u32 als_level[C_CUST_ALS_LEVEL-1]; - u32 als_value[C_CUST_ALS_LEVEL]; - int ps_cali; - - atomic_t als_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_cmd_val; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_high; /*the cmd value can't be read, stored in ram*/ - atomic_t ps_thd_val_low; /*the cmd value can't be read, stored in ram*/ - ulong enable; /*enable mask*/ - ulong pending_intr; /*pending interrupt*/ - - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver APDS9930_i2c_driver = { - .probe = APDS9930_i2c_probe, - .remove = APDS9930_i2c_remove, - .detect = APDS9930_i2c_detect, - .suspend = APDS9930_i2c_suspend, - .resume = APDS9930_i2c_resume, - .id_table = APDS9930_i2c_id, - .driver = { - .name = APDS9930_DEV_NAME, - }, -}; - -static struct APDS9930_priv *APDS9930_obj = NULL; -static struct platform_driver APDS9930_alsps_driver; -/*------------------------i2c function for 89-------------------------------------*/ -int APDS9930_i2c_master_operate(struct i2c_client *client, const char *buf, int count, int i2c_flag) -{ - int res = 0; - mutex_lock(&APDS9930_mutex); - switch(i2c_flag){ - case I2C_FLAG_WRITE: - client->addr &=I2C_MASK_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - - case I2C_FLAG_READ: - client->addr &=I2C_MASK_FLAG; - client->addr |=I2C_WR_FLAG; - client->addr |=I2C_RS_FLAG; - res = i2c_master_send(client, buf, count); - client->addr &=I2C_MASK_FLAG; - break; - default: - APS_LOG("APDS9930_i2c_master_operate i2c_flag command not support!\n"); - break; - } - if(res <= 0) - { - goto EXIT_ERR; - } - mutex_unlock(&APDS9930_mutex); - return res; - EXIT_ERR: - mutex_unlock(&APDS9930_mutex); - APS_ERR("APDS9930_i2c_transfer fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -int APDS9930_get_addr(struct alsps_hw *hw, struct APDS9930_i2c_addr *addr) -{ - if(!hw || !addr) - { - return -EFAULT; - } - addr->write_addr= hw->i2c_addr[0]; - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_power(struct alsps_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - //APS_LOG("power %s\n", on ? "on" : "off"); - - if(hw->power_id != POWER_NONE_MACRO) - { - if(power_on == on) - { - APS_LOG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "APDS9930")) - { - APS_ERR("power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "APDS9930")) - { - APS_ERR("power off fail!!\n"); - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_als(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - //APS_LOG("APDS9930_CMM_ENABLE als value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x03; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->als_deb_on, 1); - atomic_set(&obj->als_deb_end, jiffies+atomic_read(&obj->als_debounce)/(1000/HZ)); - } - else { - if(test_bit(CMC_BIT_PS, &obj->enable)) - databuf[1] = databuf[0]&0xFD; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable als value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_als fail\n"); - return res; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_enable_ps(struct i2c_client *client, int enable) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - long res = 0; - - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - //APS_LOG("APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - if(enable) - { - databuf[1] = databuf[0]|0x05; - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE enable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - atomic_set(&obj->ps_deb_on, 1); - atomic_set(&obj->ps_deb_end, jiffies+atomic_read(&obj->ps_debounce)/(1000/HZ)); - } - else{ - if(test_bit(CMC_BIT_ALS, &obj->enable)) - databuf[1] = databuf[0]&0xFB; - else - databuf[1] = databuf[0]&0xF8; - - databuf[0] = APDS9930_CMM_ENABLE; - //APS_LOG("APDS9930_CMM_ENABLE disable ps value = %x\n",databuf[1]); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*fix bug*/ - } - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_enable_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -static int APDS9930_check_and_clear_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 1; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 1; - intl = 1; - } - - if(1 == res) - { - if((1 == intp) && (0 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x05); - } - else if((0 == intp) && (1 == intl)) - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x06); - } - else - { - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - } - - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} -/*----------------------------------------------------------------------------*/ - -/*yucong add for interrupt mode support MTK inc 2012.3.7*/ -static int APDS9930_check_intr(struct i2c_client *client) -{ - int res,intp,intl; - u8 buffer[2]; - - if (mt_get_gpio_in(GPIO_ALS_EINT_PIN) == 1) /*skip if no interrupt*/ - return 0; - - buffer[0] = APDS9930_CMM_STATUS; - res = APDS9930_i2c_master_operate(client, buffer, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - res = 0; - intp = 0; - intl = 0; - if(0 != (buffer[0] & 0x20)) - { - res = 0; - intp = 1; - } - if(0 != (buffer[0] & 0x10)) - { - res = 0; - intl = 1; - } - - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_intr fail\n"); - return 1; -} - -static int APDS9930_clear_intr(struct i2c_client *client) -{ - int res; - u8 buffer[2]; - - buffer[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x07); - res = APDS9930_i2c_master_operate(client, buffer, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - else - { - res = 0; - } - return res; - -EXIT_ERR: - APS_ERR("APDS9930_check_and_clear_intr fail\n"); - return 1; -} - - -/*-----------------------------------------------------------------------------*/ -void APDS9930_eint_func(void) -{ - struct APDS9930_priv *obj = g_APDS9930_ptr; - if(!obj) - { - return; - } - int_top_time = sched_clock(); - schedule_work(&obj->eint_work); -} - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -int APDS9930_setup_eint(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - - g_APDS9930_ptr = obj; - - mt_set_gpio_dir(GPIO_ALS_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_mode(GPIO_ALS_EINT_PIN, GPIO_ALS_EINT_PIN_M_EINT); - mt_set_gpio_pull_enable(GPIO_ALS_EINT_PIN, TRUE); - mt_set_gpio_pull_select(GPIO_ALS_EINT_PIN, GPIO_PULL_UP); - - mt_eint_set_hw_debounce(CUST_EINT_ALS_NUM, CUST_EINT_ALS_DEBOUNCE_CN); - mt_eint_registration(CUST_EINT_ALS_NUM, CUST_EINT_ALS_TYPE, APDS9930_eint_func, 0); - - mt_eint_unmask(CUST_EINT_ALS_NUM); - return 0; -} - -/*----------------------------------------------------------------------------*/ - -static int APDS9930_init_client(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[2]; - int res = 0; - - databuf[0] = (TAOS_TRITON_CMD_REG|TAOS_TRITON_CMD_SPL_FN|0x00); - res = APDS9930_i2c_master_operate(client, databuf, 0x1, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ENABLE; - if(obj->hw->polling_mode_ps == 1) - databuf[1] = 0x08; - if(obj->hw->polling_mode_ps == 0) - databuf[1] = 0x28; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_ATIME; - databuf[1] = 0xF6; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_PTIME; - databuf[1] = 0xFF; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_WTIME; - databuf[1] = 0xFC; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if(0 == obj->hw->polling_mode_ps) - { - if(1 == ps_cali.valid) - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(ps_cali.far_away & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((ps_cali.far_away & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(ps_cali.close & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((ps_cali.close & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - } - else - { - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_Persistence; - databuf[1] = 0x20; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - - databuf[0] = APDS9930_CMM_CONFIG; - databuf[1] = 0x00; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified pulse 2 to 4 */ - databuf[0] = APDS9930_CMM_PPCOUNT; - databuf[1] = APDS9930_CMM_PPCOUNT_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1 */ - databuf[0] = APDS9930_CMM_CONTROL; - databuf[1] = APDS9930_CMM_CONTROL_VALUE; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - if((res = APDS9930_setup_eint(client))!=0) - { - APS_ERR("setup eint: %d\n", res); - return res; - } - if((res = APDS9930_check_and_clear_intr(client))) - { - APS_ERR("check/clear intr: %d\n", res); - return res; - } - - return APDS9930_SUCCESS; - -EXIT_ERR: - APS_ERR("init dev: %d\n", res); - return res; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -int APDS9930_read_als(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value, c1_value; - u32 c0_nf, c1_nf; - u8 buffer[2]; - u16 atio; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c0_value = buffer[0] | (buffer[1]<<8); - c0_nf = obj->als_modulus*c0_value; - //APS_LOG("c0_value=%d, c0_nf=%d, als_modulus=%d\n", c0_value, c0_nf, obj->als_modulus); - - buffer[0]=APDS9930_CMM_C1DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - c1_value = buffer[0] | (buffer[1]<<8); - c1_nf = obj->als_modulus*c1_value; - //APS_LOG("c1_value=%d, c1_nf=%d, als_modulus=%d\n", c1_value, c1_nf, obj->als_modulus); - - if((c0_value > c1_value) &&(c0_value < 50000)) - { /*Lenovo-sw chenlj2 add 2011-06-03,add {*/ - atio = (c1_nf*100)/c0_nf; - - //APS_LOG("atio = %d\n", atio); - if(atio<30) - { - *data = (13*c0_nf - 24*c1_nf)/10000; - } - else if(atio>= 30 && atio<38) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (16*c0_nf - 35*c1_nf)/10000; - } - else if(atio>= 38 && atio<45) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (9*c0_nf - 17*c1_nf)/10000; - } - else if(atio>= 45 && atio<54) /*Lenovo-sw chenlj2 add 2011-06-03,modify > to >=*/ - { - *data = (6*c0_nf - 10*c1_nf)/10000; - } - else - *data = 0; - /*Lenovo-sw chenlj2 add 2011-06-03,add }*/ - } - else if (c0_value > 50000) - { - *data = 65535; - } - else if(c0_value == 0) - { - *data = 0; - } - else - { - APS_DBG("APDS9930_read_als als_value is invalid!!\n"); - return -1; - } - - //APS_LOG("APDS9930_read_als als_value_lux = %d\n", *data); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -int APDS9930_read_als_ch0(struct i2c_client *client, u16 *data) -{ - //struct APDS9930_priv *obj = i2c_get_clientdata(client); - u16 c0_value; - u8 buffer[2]; - int res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - -//get adc channel 0 value - buffer[0]=APDS9930_CMM_C0DATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - c0_value = buffer[0] | (buffer[1]<<8); - *data = c0_value; - //APS_LOG("c0_value=%d\n", c0_value); - return 0; - - - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ - -static int APDS9930_get_als_value(struct APDS9930_priv *obj, u16 als) -{ - int idx; - int invalid = 0; - for(idx = 0; idx < obj->als_level_num; idx++) - { - if(als < obj->hw->als_level[idx]) - { - break; - } - } - - if(idx >= obj->als_value_num) - { - APS_ERR("APDS9930_get_als_value exceed range\n"); - idx = obj->als_value_num - 1; - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - unsigned long endt = atomic_read(&obj->als_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->als_deb_on, 0); - } - - if(1 == atomic_read(&obj->als_deb_on)) - { - invalid = 1; - } - } - - if(!invalid) - { -#if defined(MTK_AAL_SUPPORT) - int level_high = obj->hw->als_level[idx]; - int level_low = (idx > 0) ? obj->hw->als_level[idx-1] : 0; - int level_diff = level_high - level_low; - int value_high = obj->hw->als_value[idx]; - int value_low = (idx > 0) ? obj->hw->als_value[idx-1] : 0; - int value_diff = value_high - value_low; - int value = 0; - - if ((level_low >= level_high) || (value_low >= value_high)) - value = value_low; - else - value = (level_diff * value_low + (als - level_low) * value_diff + ((level_diff + 1) >> 1)) / level_diff; - - APS_DBG("ALS: %d [%d, %d] => %d [%d, %d] \n", als, level_low, level_high, value, value_low, value_high); - return value; -#endif - //APS_ERR("ALS: %05d => %05d\n", als, obj->hw->als_value[idx]); - return obj->hw->als_value[idx]; - } - else - { - //APS_ERR("ALS: %05d => %05d (-1)\n", als, obj->hw->als_value[idx]); - return -1; - } -} -/*----------------------------------------------------------------------------*/ -long APDS9930_read_ps(struct i2c_client *client, u16 *data) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 buffer[2]; - u16 temp_data; - long res = 0; - - if(client == NULL) - { - APS_DBG("CLIENT CANN'T EQUL NULL\n"); - return -1; - } - - buffer[0]=APDS9930_CMM_PDATA_L; - res = APDS9930_i2c_master_operate(client, buffer, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - - temp_data = buffer[0] | (buffer[1]<<8); - //APS_LOG("yucong APDS9930_read_ps ps_data=%d, low:%d high:%d", *data, buffer[0], buffer[1]); - if(temp_data < obj->ps_cali) - *data = 0; - else - *data = temp_data - obj->ps_cali; - return 0; - return 0; - -EXIT_ERR: - APS_ERR("APDS9930_read_ps fail\n"); - return res; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_get_ps_value(struct APDS9930_priv *obj, u16 ps) -{ - int val;// mask = atomic_read(&obj->ps_mask); - int invalid = 0; - static int val_temp=1; - - if(ps_cali.valid == 1) - { - if((ps >ps_cali.close)) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - - else if((ps < ps_cali.far_away)) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - APS_LOG("APDS9930_get_ps_value val = %d",val); - } - else - { - if((ps > atomic_read(&obj->ps_thd_val_high))) - { - val = 0; /*close*/ - val_temp = 0; - intr_flag_value = 1; - } - else if((ps < atomic_read(&obj->ps_thd_val_low))) - { - val = 1; /*far away*/ - val_temp = 1; - intr_flag_value = 0; - } - else - val = val_temp; - - } - - if(atomic_read(&obj->ps_suspend)) - { - invalid = 1; - } - else if(1 == atomic_read(&obj->ps_deb_on)) - { - unsigned long endt = atomic_read(&obj->ps_deb_end); - if(time_after(jiffies, endt)) - { - atomic_set(&obj->ps_deb_on, 0); - } - - if (1 == atomic_read(&obj->ps_deb_on)) - { - invalid = 1; - } - } - else if (obj->als > 45000) - { - //invalid = 1; - APS_DBG("ligh too high will result to failt proximiy\n"); - return 1; /*far away*/ - } - - if(!invalid) - { - //APS_DBG("PS: %05d => %05d\n", ps, val); - return val; - } - else - { - return -1; - } -} - - -/*----------------------------------------------------------------------------*/ -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -//#define DEBUG_APDS9930 -static void APDS9930_eint_work(struct work_struct *work) -{ - struct APDS9930_priv *obj = (struct APDS9930_priv *)container_of(work, struct APDS9930_priv, eint_work); - int err; - hwm_sensor_data sensor_data; - u8 databuf[3]; - int res = 0; - - if((err = APDS9930_check_intr(obj->client))) - { - APS_ERR("APDS9930_eint_work check intrs: %d\n", err); - } - else - { - //get raw data - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_LOG("APDS9930_eint_work rawdata ps=%d als_ch0=%d!\n",obj->ps,obj->als); - APS_LOG("APDS9930 int top half time = %lld\n", int_top_time); - - if(obj->als > 40000) - { - APS_LOG("APDS9930_eint_work ALS too large may under lighting als_ch0=%d!\n",obj->als); - return; - } - sensor_data.values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - -#ifdef DEBUG_APDS9930 - databuf[0]= APDS9930_CMM_ENABLE; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x101, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_ENABLE ps value = %x\n",databuf[0]); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW before databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); -#endif -/*singal interrupt function add*/ - if(intr_flag_value){ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_low)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - } - else{ - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(0 & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((0 & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high)) & 0x00FF); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - goto EXIT_ERR; - } - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)(((atomic_read(&obj->ps_thd_val_high)) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x2, I2C_FLAG_WRITE); - res = i2c_master_send(obj->client, databuf, 0x2); - if(res <= 0) - { - goto EXIT_ERR; - } - } - - //let up layer to know - #ifdef DEBUG_APDS9930 - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_LOW_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - res = APDS9930_i2c_master_operate(obj->client, databuf, 0x201, I2C_FLAG_READ); - if(res <= 0) - { - goto EXIT_ERR; - } - APS_LOG("APDS9930_eint_work APDS9930_CMM_INT_HIGH_THD_LOW after databuf[0]=%d databuf[1]=%d!\n",databuf[0],databuf[1]); - #endif - if((err = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data))) - { - APS_ERR("call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - return; - EXIT_ERR: - APDS9930_clear_intr(obj->client); - mt_eint_unmask(CUST_EINT_ALS_NUM); - APS_ERR("i2c_transfer error = %d\n", res); - return; -} - - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int APDS9930_open(struct inode *inode, struct file *file) -{ - file->private_data = APDS9930_i2c_client; - - if (!file->private_data) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static int set_psensor_threshold(struct i2c_client *client) -{ - struct APDS9930_priv *obj = i2c_get_clientdata(client); - u8 databuf[3]; - int res = 0; - APS_ERR("set_psensor_threshold function high: 0x%x, low:0x%x\n",atomic_read(&obj->ps_thd_val_high),atomic_read(&obj->ps_thd_val_low)); - - databuf[0] = APDS9930_CMM_INT_LOW_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_low) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_LOW_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_low) & 0xFF00) >> 8); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_LOW; - databuf[1] = (u8)(atomic_read(&obj->ps_thd_val_high) & 0x00FF); - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - databuf[0] = APDS9930_CMM_INT_HIGH_THD_HIGH; - databuf[1] = (u8)((atomic_read(&obj->ps_thd_val_high) & 0xFF00) >> 8);; - res = APDS9930_i2c_master_operate(client, databuf, 0x2, I2C_FLAG_WRITE); - if(res <= 0) - { - return -1; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static long APDS9930_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - struct APDS9930_priv *obj = i2c_get_clientdata(client); - long err = 0; - void __user *ptr = (void __user*) arg; - int dat; - uint32_t enable; - int ps_result; - int ps_cali; - int threshold[2]; - - switch (cmd) - { - case ALSPS_SET_PS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %ld\n", err); - goto err_out; - } - - set_bit(CMC_BIT_PS, &obj->enable); - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %ld\n", err); - goto err_out; - } - - clear_bit(CMC_BIT_PS, &obj->enable); - } - break; - - case ALSPS_GET_PS_MODE: - enable = test_bit(CMC_BIT_PS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = APDS9930_get_ps_value(obj, obj->ps); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_RAW_DATA: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - - dat = obj->ps; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_SET_ALS_MODE: - if(copy_from_user(&enable, ptr, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - if(enable) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %ld\n", err); - goto err_out; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %ld\n", err); - goto err_out; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - break; - - case ALSPS_GET_ALS_MODE: - enable = test_bit(CMC_BIT_ALS, &obj->enable) ? (1) : (0); - if(copy_to_user(ptr, &enable, sizeof(enable))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = APDS9930_get_als_value(obj, obj->als); - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_ALS_RAW_DATA: - if((err = APDS9930_read_als(obj->client, &obj->als))) - { - goto err_out; - } - - dat = obj->als; - if(copy_to_user(ptr, &dat, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - break; - /*----------------------------------for factory mode test---------------------------------------*/ - case ALSPS_GET_PS_TEST_RESULT: - if((err = APDS9930_read_ps(obj->client, &obj->ps))) - { - goto err_out; - } - if(obj->ps > atomic_read(&obj->ps_thd_val_high)) - { - ps_result = 0; - } - else ps_result = 1; - - if(copy_to_user(ptr, &ps_result, sizeof(ps_result))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_CLR_CALI: - if(copy_from_user(&dat, ptr, sizeof(dat))) - { - err = -EFAULT; - goto err_out; - } - if(dat == 0) - obj->ps_cali = 0; - break; - - case ALSPS_IOCTL_GET_CALI: - ps_cali = obj->ps_cali ; - if(copy_to_user(ptr, &ps_cali, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_IOCTL_SET_CALI: - if(copy_from_user(&ps_cali, ptr, sizeof(ps_cali))) - { - err = -EFAULT; - goto err_out; - } - - obj->ps_cali = ps_cali; - break; - - case ALSPS_SET_PS_THRESHOLD: - if(copy_from_user(threshold, ptr, sizeof(threshold))) - { - err = -EFAULT; - goto err_out; - } - APS_ERR("%s set threshold high: 0x%x, low: 0x%x\n", __func__, threshold[0],threshold[1]); - atomic_set(&obj->ps_thd_val_high, (threshold[0]+obj->ps_cali)); - atomic_set(&obj->ps_thd_val_low, (threshold[1]+obj->ps_cali));//need to confirm - - set_psensor_threshold(obj->client); - - break; - - case ALSPS_GET_PS_THRESHOLD_HIGH: - threshold[0] = atomic_read(&obj->ps_thd_val_high) - obj->ps_cali; - APS_ERR("%s get threshold high: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - - case ALSPS_GET_PS_THRESHOLD_LOW: - threshold[0] = atomic_read(&obj->ps_thd_val_low) - obj->ps_cali; - APS_ERR("%s get threshold low: 0x%x\n", __func__, threshold[0]); - if(copy_to_user(ptr, &threshold[0], sizeof(threshold[0]))) - { - err = -EFAULT; - goto err_out; - } - break; - /*------------------------------------------------------------------------------------------*/ - default: - APS_ERR("%s not supported = 0x%04x", __FUNCTION__, cmd); - err = -ENOIOCTLCMD; - break; - } - - err_out: - return err; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations APDS9930_fops = { - .owner = THIS_MODULE, - .open = APDS9930_open, - .release = APDS9930_release, - .unlocked_ioctl = APDS9930_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice APDS9930_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "als_ps", - .fops = &APDS9930_fops, -}; -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_suspend(struct i2c_client *client, pm_message_t msg) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(msg.event == PM_EVENT_SUSPEND) - { - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - atomic_set(&obj->als_suspend, 1); - if(err = APDS9930_enable_als(client, 0)) - { - APS_ERR("disable als: %d\n", err); - return err; - } - - atomic_set(&obj->ps_suspend, 1); - if(err = APDS9930_enable_ps(client, 0)) - { - APS_ERR("disable ps: %d\n", err); - return err; - } - - APDS9930_power(obj->hw, 0); - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_resume(struct i2c_client *client) -{ -// struct APDS9930_priv *obj = i2c_get_clientdata(client); -// int err; - APS_FUN(); -#if 0 - if(!obj) - { - APS_ERR("null pointer!!\n"); - return -EINVAL; - } - - APDS9930_power(obj->hw, 1); - if(err = APDS9930_init_client(client)) - { - APS_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if(err = APDS9930_enable_als(client, 1)) - { - APS_ERR("enable als fail: %d\n", err); - } - } - atomic_set(&obj->ps_suspend, 0); - if(test_bit(CMC_BIT_PS, &obj->enable)) - { - if(err = APDS9930_enable_ps(client, 1)) - { - APS_ERR("enable ps fail: %d\n", err); - } - } -#endif - return 0; -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_early_suspend(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 1); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static void APDS9930_late_resume(struct early_suspend *h) -{ /*early_suspend is only applied for ALS*/ - struct APDS9930_priv *obj = container_of(h, struct APDS9930_priv, early_drv); - int err; - APS_FUN(); - - if(!obj) - { - APS_ERR("null pointer!!\n"); - return; - } - - #if 1 - atomic_set(&obj->als_suspend, 0); - if(test_bit(CMC_BIT_ALS, &obj->enable)) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - - } - } - #endif -} -/*----------------------------------------------------------------------------*/ -static int temp_als = 0; -static int ALS_FLAG = 0; - -int APDS9930_ps_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int value; - int err = 0; - - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - //APS_FUN(f); - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_ps(obj->client, 1))) - { - APS_ERR("enable ps fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(!test_bit(CMC_BIT_ALS, &obj->enable)) - { - ALS_FLAG = 1; - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - } - #endif - } - else - { - if((err = APDS9930_enable_ps(obj->client, 0))) - { - APS_ERR("disable ps fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_PS, &obj->enable); - #if 1 - if(ALS_FLAG == 1) - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - ALS_FLAG = 0; - } - #endif - } - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - APDS9930_read_ps(obj->client, &obj->ps); - APDS9930_read_als_ch0(obj->client, &obj->als); - APS_ERR("APDS9930_ps_operate als data=%d!\n",obj->als); - sensor_data->values[0] = APDS9930_get_ps_value(obj, obj->ps); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -int APDS9930_als_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* sensor_data; - struct APDS9930_priv *obj = (struct APDS9930_priv *)self; - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - // Do nothing - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - APS_ERR("Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value) - { - if((err = APDS9930_enable_als(obj->client, 1))) - { - APS_ERR("enable als fail: %d\n", err); - return -1; - } - set_bit(CMC_BIT_ALS, &obj->enable); - } - else - { - if((err = APDS9930_enable_als(obj->client, 0))) - { - APS_ERR("disable als fail: %d\n", err); - return -1; - } - clear_bit(CMC_BIT_ALS, &obj->enable); - } - - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - APS_ERR("get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - /*yucong MTK add for fixing known issue*/ - APDS9930_read_als(obj->client, &obj->als); - if(obj->als == 0) - { - sensor_data->values[0] = temp_als; - }else{ - u16 b[2]; - int i; - for(i = 0;i < 2;i++){ - APDS9930_read_als(obj->client, &obj->als); - b[i] = obj->als; - } - (b[1] > b[0])?(obj->als = b[0]):(obj->als = b[1]); - sensor_data->values[0] = APDS9930_get_als_value(obj, obj->als); - temp_als = sensor_data->values[0]; - } - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - break; - default: - APS_ERR("light sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, APDS9930_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct APDS9930_priv *obj; - struct hwmsen_object obj_ps, obj_als; - int err = 0; - - if(!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(obj, 0, sizeof(*obj)); - APDS9930_obj = obj; - obj->hw = get_cust_alsps_hw(); - APDS9930_get_addr(obj->hw, &obj->addr); - - /*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ - INIT_WORK(&obj->eint_work, APDS9930_eint_work); - obj->client = client; - i2c_set_clientdata(client, obj); - atomic_set(&obj->als_debounce, 50); - atomic_set(&obj->als_deb_on, 0); - atomic_set(&obj->als_deb_end, 0); - atomic_set(&obj->ps_debounce, 10); - atomic_set(&obj->ps_deb_on, 0); - atomic_set(&obj->ps_deb_end, 0); - atomic_set(&obj->ps_mask, 0); - atomic_set(&obj->als_suspend, 0); - atomic_set(&obj->als_cmd_val, 0xDF); - atomic_set(&obj->ps_cmd_val, 0xC1); - atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_high); - atomic_set(&obj->ps_thd_val_low, obj->hw->ps_threshold_low); - obj->enable = 0; - obj->pending_intr = 0; - obj->als_level_num = sizeof(obj->hw->als_level)/sizeof(obj->hw->als_level[0]); - obj->als_value_num = sizeof(obj->hw->als_value)/sizeof(obj->hw->als_value[0]); - /*Lenovo-sw chenlj2 add 2011-06-03,modified gain 16 to 1/5 accoring to actual thing */ - obj->als_modulus = (400*100*ZOOM_TIME)/(1*150);//(1/Gain)*(400/Tine), this value is fix after init ATIME and CONTROL register value - //(400)/16*2.72 here is amplify *100 //16 - BUG_ON(sizeof(obj->als_level) != sizeof(obj->hw->als_level)); - memcpy(obj->als_level, obj->hw->als_level, sizeof(obj->als_level)); - BUG_ON(sizeof(obj->als_value) != sizeof(obj->hw->als_value)); - memcpy(obj->als_value, obj->hw->als_value, sizeof(obj->als_value)); - atomic_set(&obj->i2c_retry, 3); - set_bit(CMC_BIT_ALS, &obj->enable); - set_bit(CMC_BIT_PS, &obj->enable); - - obj->ps_cali = 0; - - APDS9930_i2c_client = client; - - if(1 == obj->hw->polling_mode_ps) - //if (1) - { - obj_ps.polling = 1; - } - else - { - obj_ps.polling = 0; - } - - if((err = APDS9930_init_client(client))) - { - goto exit_init_failed; - } - APS_LOG("APDS9930_init_client() OK!\n"); - - if((err = misc_register(&APDS9930_device))) - { - APS_ERR("APDS9930_device register failed\n"); - goto exit_misc_device_register_failed; - } -/* - if(err = APDS9930_create_attr(&APDS9930_alsps_driver.driver)) - { - APS_ERR("create attribute err = %d\n", err); - goto exit_create_attr_failed; - } -*/ - obj_ps.self = APDS9930_obj; - - obj_ps.sensor_operate = APDS9930_ps_operate; - if((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - obj_als.self = APDS9930_obj; - obj_als.polling = 1; - obj_als.sensor_operate = APDS9930_als_operate; - if((err = hwmsen_attach(ID_LIGHT, &obj_als))) - { - APS_ERR("attach fail = %d\n", err); - goto exit_create_attr_failed; - } - - -#if defined(CONFIG_HAS_EARLYSUSPEND) - obj->early_drv.level = EARLY_SUSPEND_LEVEL_DISABLE_FB - 1, - obj->early_drv.suspend = APDS9930_early_suspend, - obj->early_drv.resume = APDS9930_late_resume, - register_early_suspend(&obj->early_drv); -#endif - - APS_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&APDS9930_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(client); - //exit_kfree: - kfree(obj); - exit: - APDS9930_i2c_client = NULL; -// MT6516_EINTIRQMask(CUST_EINT_ALS_NUM); /*mask interrupt if fail*/ - APS_ERR("%s: err = %d\n", __func__, err); - return err; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_i2c_remove(struct i2c_client *client) -{ - int err; -/* - if(err = APDS9930_delete_attr(&APDS9930_i2c_driver.driver)) - { - APS_ERR("APDS9930_delete_attr fail: %d\n", err); - } -*/ - if((err = misc_deregister(&APDS9930_device))) - { - APS_ERR("misc_deregister fail: %d\n", err); - } - - APDS9930_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_probe(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - - APDS9930_power(hw, 1); - //APDS9930_force[0] = hw->i2c_num; - //APDS9930_force[1] = hw->i2c_addr[0]; - //APS_DBG("I2C = %d, addr =0x%x\n",APDS9930_force[0],APDS9930_force[1]); - if(i2c_add_driver(&APDS9930_i2c_driver)) - { - APS_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int APDS9930_remove(struct platform_device *pdev) -{ - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_FUN(); - APDS9930_power(hw, 0); - i2c_del_driver(&APDS9930_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver APDS9930_alsps_driver = { - .probe = APDS9930_probe, - .remove = APDS9930_remove, - .driver = { - .name = "als_ps", -// .owner = THIS_MODULE, - } -}; -/*----------------------------------------------------------------------------*/ -static int __init APDS9930_init(void) -{ - //APS_FUN(); - struct alsps_hw *hw = get_cust_alsps_hw(); - APS_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_APDS9930, 1); - if(platform_driver_register(&APDS9930_alsps_driver)) - { - APS_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit APDS9930_exit(void) -{ - APS_FUN(); - platform_driver_unregister(&APDS9930_alsps_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(APDS9930_init); -module_exit(APDS9930_exit); -/*----------------------------------------------------------------------------*/ -MODULE_AUTHOR("Dexiang Liu"); -MODULE_DESCRIPTION("APDS9930 driver"); -MODULE_LICENSE("GPL"); - diff --git a/arch/arm/mach-mt8127/ttab/alsps/APDS9930.h b/arch/arm/mach-mt8127/ttab/alsps/APDS9930.h deleted file mode 100644 index e96d807e246..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/APDS9930.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * 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. - * - */ -/* - * Definitions for APDS9930 als/ps sensor chip. - */ -#ifndef __APDS9930_H__ -#define __APDS9930_H__ - -#include - -extern int APDS9930_CMM_PPCOUNT_VALUE; -extern int APDS9930_CMM_CONTROL_VALUE; -extern int ZOOM_TIME; - -#define APDS9930_CMM_ENABLE 0X80 -#define APDS9930_CMM_ATIME 0X81 -#define APDS9930_CMM_PTIME 0X82 -#define APDS9930_CMM_WTIME 0X83 -/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/ -#define APDS9930_CMM_INT_LOW_THD_LOW 0X88 -#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89 -#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A -#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B -#define APDS9930_CMM_Persistence 0X8C -#define APDS9930_CMM_STATUS 0X93 -#define TAOS_TRITON_CMD_REG 0X80 -#define TAOS_TRITON_CMD_SPL_FN 0x60 - -#define APDS9930_CMM_CONFIG 0X8D -#define APDS9930_CMM_PPCOUNT 0X8E -#define APDS9930_CMM_CONTROL 0X8F - -#define APDS9930_CMM_PDATA_L 0X98 -#define APDS9930_CMM_PDATA_H 0X99 -#define APDS9930_CMM_C0DATA_L 0X94 -#define APDS9930_CMM_C0DATA_H 0X95 -#define APDS9930_CMM_C1DATA_L 0X96 -#define APDS9930_CMM_C1DATA_H 0X97 - - -#define APDS9930_SUCCESS 0 -#define APDS9930_ERR_I2C -1 -#define APDS9930_ERR_STATUS -3 -#define APDS9930_ERR_SETUP_FAILURE -4 -#define APDS9930_ERR_GETGSENSORDATA -5 -#define APDS9930_ERR_IDENTIFICATION -6 - - -#endif - diff --git a/arch/arm/mach-mt8127/ttab/alsps/Makefile b/arch/arm/mach-mt8127/ttab/alsps/Makefile deleted file mode 100755 index b384f32b86e..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_alsps.o - diff --git a/arch/arm/mach-mt8127/ttab/alsps/alsps.c b/arch/arm/mach-mt8127/ttab/alsps/alsps.c deleted file mode 100644 index 2b19f2b77d4..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/alsps.c +++ /dev/null @@ -1,1094 +0,0 @@ - -#include "alsps.h" - -static struct alsps_context *alsps_context_obj = NULL; - - -static struct alsps_init_info* alsps_init_list[MAX_CHOOSE_ALSPS_NUM]= {0}; //modified -static void alsps_early_suspend(struct early_suspend *h); -static void alsps_late_resume(struct early_suspend *h); - - -int als_data_report(struct input_dev *dev, int value, int status) -{ - //ALSPS_LOG("+als_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_ALS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_ALS_STATUS, status); - input_sync(dev); - return 0; -} - -int ps_data_report(struct input_dev *dev, int value,int status) -{ - //ALSPS_LOG("+ps_data_report! %d, %d\n",value,status); - input_report_abs(dev, EVENT_TYPE_PS_VALUE, value); - input_report_abs(dev, EVENT_TYPE_PS_STATUS, status); - input_sync(dev); - return 0; -} - -static void als_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->als_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto als_loop; - } - else - { - { - cxt->drv_data.als_data.values[0] = value; - cxt->drv_data.als_data.status = status; - cxt->drv_data.als_data.time = nt; - - } - } - - if(true == cxt->is_als_first_data_after_enable) - { - cxt->is_als_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.als_data.values[0] ) - { - ALSPS_LOG(" read invalid data \n"); - goto als_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("als data[%d] \n" ,cxt->drv_data.als_data.values[0]); - - als_data_report(cxt->idev, - cxt->drv_data.als_data.values[0], - cxt->drv_data.als_data.status); - - als_loop: - if(true == cxt->is_als_polling_run) - { - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - } - - } -} - -static void ps_work_func(struct work_struct *work) -{ - - struct alsps_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int value,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = alsps_context_obj; - - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - err = cxt->ps_data.get_data(&value,&status); - - if(err) - { - ALSPS_ERR("get alsps data fails!!\n" ); - goto ps_loop; - } - else - { - { - cxt->drv_data.ps_data.values[0] = value; - cxt->drv_data.ps_data.status = status; - cxt->drv_data.ps_data.time = nt; - - } - } - - if(true == cxt->is_ps_first_data_after_enable) - { - cxt->is_ps_first_data_after_enable = false; - //filter -1 value - if(ALSPS_INVALID_VALUE == cxt->drv_data.ps_data.values[0]) - { - ALSPS_LOG(" read invalid data \n"); - goto ps_loop; - - } - } - //report data to input device - //printk("new alsps work run....\n"); - //ALSPS_LOG("alsps data[%d,%d,%d] \n" ,cxt->drv_data.alsps_data.values[0], - //cxt->drv_data.alsps_data.values[1],cxt->drv_data.alsps_data.values[2]); - - ps_data_report(cxt->idev, - cxt->drv_data.ps_data.values[0], - cxt->drv_data.ps_data.status); - - ps_loop: - if(true == cxt->is_ps_polling_run) - { - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - } - - } -} - -static void als_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report_als); - } -} - -static void ps_poll(unsigned long data) -{ - struct alsps_context *obj = (struct alsps_context *)data; - if(obj != NULL) - { - if(obj->ps_ctl.is_polling_mode) - schedule_work(&obj->report_ps); - } -} - -static struct alsps_context *alsps_context_alloc_object(void) -{ - - struct alsps_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - ALSPS_LOG("alsps_context_alloc_object++++\n"); - if(!obj) - { - ALSPS_ERR("Alloc alsps object error!\n"); - return NULL; - } - atomic_set(&obj->delay_als, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->delay_ps, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report_als, als_work_func); - INIT_WORK(&obj->report_ps, ps_work_func); - init_timer(&obj->timer_als); - init_timer(&obj->timer_ps); - obj->timer_als.expires = jiffies + atomic_read(&obj->delay_als)/(1000/HZ); - obj->timer_als.function = als_poll; - obj->timer_als.data = (unsigned long)obj; - - obj->timer_ps.expires = jiffies + atomic_read(&obj->delay_ps)/(1000/HZ); - obj->timer_ps.function = ps_poll; - obj->timer_ps.data = (unsigned long)obj; - - obj->is_als_first_data_after_enable = false; - obj->is_als_polling_run = false; - obj->is_ps_first_data_after_enable = false; - obj->is_ps_polling_run = false; - mutex_init(&obj->alsps_op_mutex); - obj->is_als_batch_enable = false;//for batch mode init - obj->is_ps_batch_enable = false;//for batch mode init - - ALSPS_LOG("alsps_context_alloc_object----\n"); - return obj; -} - -static int als_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_als_active_data || true ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - { - err = cxt->als_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("alsps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("alsps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_als_active_data && false ==cxt->is_als_active_nodata) - { - err = cxt->als_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("alsps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("alsps real disable \n" ); - } - - } - - return err; -} -static int als_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.open_report_data) - { - ALSPS_ERR("no als control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("ALSPS enable data\n"); - cxt->is_als_active_data =true; - cxt->is_als_first_data_after_enable = true; - cxt->als_ctl.open_report_data(1); - if(false == cxt->is_als_polling_run && cxt->is_als_batch_enable == false) - { - if(false == cxt->als_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_als, jiffies + atomic_read(&cxt->delay_als)/(1000/HZ)); - cxt->is_als_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("ALSPS disable \n"); - cxt->is_als_active_data =false; - cxt->als_ctl.open_report_data(0); - if(true == cxt->is_als_polling_run) - { - if(false == cxt->als_ctl.is_report_input_direct ) - { - cxt->is_als_polling_run = false; - del_timer_sync(&cxt->timer_als); - cancel_work_sync(&cxt->report_als); - cxt->drv_data.als_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - als_real_enable(enable); - return 0; -} - -static int ps_real_enable(int enable) -{ - int err =0; - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - if(1==enable) - { - - if(true==cxt->is_ps_active_data || true ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - { - err = cxt->ps_ctl.enable_nodata(1); - if(err) - ALSPS_ERR("ps enable(%d) err 3 timers = %d\n", enable, err); - } - } - ALSPS_LOG("ps real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_ps_active_data && false ==cxt->is_ps_active_nodata) - { - err = cxt->ps_ctl.enable_nodata(0); - if(err) - { - ALSPS_ERR("ps enable(%d) err = %d\n", enable, err); - } - ALSPS_LOG("ps real disable \n" ); - } - - } - - return err; -} -static int ps_enable_data(int enable) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.open_report_data) - { - ALSPS_ERR("no ps control path\n"); - return -1; - } - - if(1 == enable) - { - ALSPS_LOG("PS enable data\n"); - cxt->is_ps_active_data =true; - cxt->is_ps_first_data_after_enable = true; - cxt->ps_ctl.open_report_data(1); - if(false == cxt->is_ps_polling_run && cxt->is_ps_batch_enable == false) - { - if(false == cxt->ps_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer_ps, jiffies + atomic_read(&cxt->delay_ps)/(1000/HZ)); - cxt->is_ps_polling_run = true; - } - } - } - if(0 == enable) - { - ALSPS_LOG("PS disable \n"); - cxt->is_ps_active_data =false; - cxt->ps_ctl.open_report_data(0); - if(true == cxt->is_ps_polling_run) - { - if(false == cxt->ps_ctl.is_report_input_direct ) - { - cxt->is_ps_polling_run = false; - del_timer_sync(&cxt->timer_ps); - cancel_work_sync(&cxt->report_ps); - cxt->drv_data.ps_data.values[0] = ALSPS_INVALID_VALUE; - } - } - } - ps_real_enable(enable); - return 0; -} - -static ssize_t als_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - als_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - als_enable_data(0); - } - else - { - ALSPS_ERR(" alsps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" alsps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t als_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->als_data.vender_div; - ALSPS_LOG("als vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t als_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->als_ctl.set_delay) - { - ALSPS_LOG("als_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->als_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_als, mdelay); - } - cxt->als_ctl.set_delay(delay); - ALSPS_LOG(" als_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t als_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t als_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("als_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->als_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_als_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_als_batch_enable = false; - } - else - { - ALSPS_ERR(" als_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" als_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" als_store_batch done: %d\n", cxt->is_als_batch_enable); - return count; - -} - -static ssize_t als_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t als_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t als_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static ssize_t ps_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_active buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - - if (!strncmp(buf, "1", 1)) - { - ps_enable_data(1); - } - else if (!strncmp(buf, "0", 1)) - { - ps_enable_data(0); - } - else - { - ALSPS_ERR(" ps_store_active error !!\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t ps_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct alsps_context *cxt = NULL; - cxt = alsps_context_obj; - int div=cxt->ps_data.vender_div; - ALSPS_LOG("ps vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t ps_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) - -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(NULL == cxt->ps_ctl.set_delay) - { - ALSPS_LOG("ps_ctl set_delay NULL\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - ALSPS_ERR("invalid format!!\n"); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - } - - if(false == cxt->ps_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&alsps_context_obj->delay_ps, mdelay); - } - cxt->ps_ctl.set_delay(delay); - ALSPS_LOG(" ps_delay %d ns\n",delay); - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; - -} - -static ssize_t ps_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - ALSPS_LOG(" not support now\n"); - return len; -} - - -static ssize_t ps_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - ALSPS_LOG("ps_store_batch buf=%s\n",buf); - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - if(cxt->ps_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_ps_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_ps_batch_enable = false; - } - else - { - ALSPS_ERR(" ps_store_batch error !!\n"); - } - }else{ - ALSPS_LOG(" ps_store_batch not supported\n"); - } - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - ALSPS_LOG(" ps_store_batch done: %d\n", cxt->is_ps_batch_enable); - return count; - -} - -static ssize_t ps_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&alsps_context_obj->alsps_op_mutex); - struct alsps_context *devobj = (struct alsps_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&alsps_context_obj->alsps_op_mutex); - return count; -} - -static ssize_t ps_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t ps_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname =NULL; - devname = dev_name(&alsps_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int als_ps_remove(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_remove\n"); - return 0; -} - -static int als_ps_probe(struct platform_device *pdev) -{ - ALSPS_LOG("als_ps_probe\n"); - return 0; -} - -static struct platform_driver als_ps_driver = { - .probe = als_ps_probe, - .remove = als_ps_remove, - .driver = - { - .name = "als_ps", - } -}; - -static int alsps_real_driver_init(void) -{ - int i =0; - int err=0; - ALSPS_LOG(" alsps_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_ALSPS_NUM; i++) - { - ALSPS_LOG("alsps_real_driver_init i=%d\n",i); - if(0 != alsps_init_list[i]) - { - ALSPS_LOG(" alsps try to init driver %s\n", alsps_init_list[i]->name); - err = alsps_init_list[i]->init(); - if(0 == err) - { - ALSPS_LOG(" alsps real driver %s probe ok\n", alsps_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_ALSPS_NUM) - { - ALSPS_LOG(" alsps_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int alsps_driver_add(struct alsps_init_info* obj) -{ - int err=0; - int i =0; - - ALSPS_FUN(); - - for(i =0; i < MAX_CHOOSE_ALSPS_NUM; i++ ) - { - if(i == 0){ - ALSPS_LOG("register alsps driver for the first time\n"); - if(platform_driver_register(&als_ps_driver)) - { - ALSPS_ERR("failed to register gensor driver already exist\n"); - } - } - - if(NULL == alsps_init_list[i]) - { - obj->platform_diver_addr = &als_ps_driver; - alsps_init_list[i] = obj; - break; - } - } - if(NULL==alsps_init_list[i]) - { - ALSPS_ERR("ALSPS driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(alsps_driver_add); - -int ps_report_interrupt_data(int value) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - ps_data_report(cxt->idev,value,3); - - return 0; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(ps_report_interrupt_data); - -static int alsps_misc_init(struct alsps_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = ALSPS_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - } - return err; -} - -static void alsps_input_destroy(struct alsps_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int alsps_input_init(struct alsps_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = ALSPS_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_VALUE); - input_set_capability(dev, EV_ABS, EVENT_TYPE_ALS_STATUS); - input_set_capability(dev, EV_ABS, EVENT_TYPE_PS_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_ALS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_VALUE, ALSPS_VALUE_MIN, ALSPS_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_ALS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_PS_STATUS, ALSPS_STATUS_MIN, ALSPS_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - - -DEVICE_ATTR(alsactive, S_IWUSR | S_IRUGO, als_show_active, als_store_active); -DEVICE_ATTR(alsdelay, S_IWUSR | S_IRUGO, als_show_delay, als_store_delay); -DEVICE_ATTR(alsbatch, S_IWUSR | S_IRUGO, als_show_batch, als_store_batch); -DEVICE_ATTR(alsflush, S_IWUSR | S_IRUGO, als_show_flush, als_store_flush); -DEVICE_ATTR(alsdevnum, S_IWUSR | S_IRUGO, als_show_devnum, NULL); -DEVICE_ATTR(psactive, S_IWUSR | S_IRUGO, ps_show_active, ps_store_active); -DEVICE_ATTR(psdelay, S_IWUSR | S_IRUGO, ps_show_delay, ps_store_delay); -DEVICE_ATTR(psbatch, S_IWUSR | S_IRUGO, ps_show_batch, ps_store_batch); -DEVICE_ATTR(psflush, S_IWUSR | S_IRUGO, ps_show_flush, ps_store_flush); -DEVICE_ATTR(psdevnum, S_IWUSR | S_IRUGO, ps_show_devnum, NULL); - - -static struct attribute *alsps_attributes[] = { - &dev_attr_alsactive.attr, - &dev_attr_alsdelay.attr, - &dev_attr_alsbatch.attr, - &dev_attr_alsflush.attr, - &dev_attr_alsdevnum.attr, - &dev_attr_psactive.attr, - &dev_attr_psdelay.attr, - &dev_attr_psbatch.attr, - &dev_attr_psflush.attr, - &dev_attr_psdevnum.attr, - NULL -}; - -static struct attribute_group alsps_attribute_group = { - .attrs = alsps_attributes -}; - -int als_register_data_path(struct als_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_data.get_data = data->get_data; - cxt->als_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->als_data.vender_div); - if(NULL == cxt->als_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int ps_register_data_path(struct ps_data_path *data) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_data.get_data = data->get_data; - cxt->ps_data.vender_div = data->vender_div; - ALSPS_LOG("alsps register data path vender_div: %d\n", cxt->ps_data.vender_div); - if(NULL == cxt->ps_data.get_data) - { - ALSPS_LOG("alsps register data path fail \n"); - return -1; - } - return 0; -} - -int als_register_control_path(struct als_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->als_ctl.set_delay = ctl->set_delay; - cxt->als_ctl.open_report_data= ctl->open_report_data; - cxt->als_ctl.enable_nodata = ctl->enable_nodata; - cxt->als_ctl.is_support_batch = ctl->is_support_batch; - cxt->als_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->als_ctl.set_delay || NULL==cxt->als_ctl.open_report_data - || NULL==cxt->als_ctl.enable_nodata) - { - ALSPS_LOG("alsps register control path fail \n"); - return -1; - } - - return 0; -} - -int ps_register_control_path(struct ps_control_path *ctl) -{ - struct alsps_context *cxt = NULL; - int err =0; - cxt = alsps_context_obj; - cxt->ps_ctl.set_delay = ctl->set_delay; - cxt->ps_ctl.open_report_data= ctl->open_report_data; - cxt->ps_ctl.enable_nodata = ctl->enable_nodata; - cxt->ps_ctl.is_support_batch = ctl->is_support_batch; - cxt->ps_ctl.is_report_input_direct= ctl->is_report_input_direct; - - if(NULL==cxt->ps_ctl.set_delay || NULL==cxt->ps_ctl.open_report_data - || NULL==cxt->ps_ctl.enable_nodata) - { - ALSPS_LOG("ps register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = alsps_misc_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps misc device!!\n"); - return -2; - } - err = sysfs_create_group(&alsps_context_obj->mdev.this_device->kobj, - &alsps_attribute_group); - if (err < 0) - { - ALSPS_ERR("unable to create alsps attribute file\n"); - return -3; - } - - - kobject_uevent(&alsps_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -static int alsps_probe(struct platform_device *pdev) -{ - - int err; - ALSPS_LOG("+++++++++++++alsps_probe!!\n"); - - alsps_context_obj = alsps_context_alloc_object(); - if (!alsps_context_obj) - { - err = -ENOMEM; - ALSPS_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real alspseleration driver - err = alsps_real_driver_init(); - if(err) - { - ALSPS_ERR("alsps real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = alsps_input_init(alsps_context_obj); - if(err) - { - ALSPS_ERR("unable to register alsps input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(alsps_context_obj->early_suspend), 0); - alsps_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - alsps_context_obj->early_drv.suspend = alsps_early_suspend, - alsps_context_obj->early_drv.resume = alsps_late_resume, - register_early_suspend(&alsps_context_obj->early_drv); - - - ALSPS_LOG("----alsps_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - ALSPS_ERR("sysfs node creation error \n"); - alsps_input_destroy(alsps_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(alsps_context_obj); - - exit_alloc_data_failed: - - - ALSPS_LOG("----alsps_probe fail !!!\n"); - return err; -} - - - -static int alsps_remove(struct platform_device *pdev) -{ - ALSPS_FUN(f); - int err=0; - input_unregister_device(alsps_context_obj->idev); - sysfs_remove_group(&alsps_context_obj->idev->dev.kobj, - &alsps_attribute_group); - - if((err = misc_deregister(&alsps_context_obj->mdev))) - { - ALSPS_ERR("misc_deregister fail: %d\n", err); - } - kfree(alsps_context_obj); - - return 0; -} - -static void alsps_early_suspend(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 1); - ALSPS_LOG(" alsps_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void alsps_late_resume(struct early_suspend *h) -{ - atomic_set(&(alsps_context_obj->early_suspend), 0); - ALSPS_LOG(" alsps_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(alsps_context_obj->early_suspend))); - return ; -} - -static int alsps_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int alsps_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver alsps_driver = -{ - .probe = alsps_probe, - .remove = alsps_remove, - .suspend = alsps_suspend, - .resume = alsps_resume, - .driver = - { - .name = ALSPS_PL_DEV_NAME, - } -}; - -static int __init alsps_init(void) -{ - ALSPS_FUN(); - - if(platform_driver_register(&alsps_driver)) - { - ALSPS_ERR("failed to register alsps driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit alsps_exit(void) -{ - platform_driver_unregister(&alsps_driver); - platform_driver_unregister(&als_ps_driver); - -} - -module_init(alsps_init); -module_exit(alsps_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("ALSPS device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/ttab/alsps/alsps.h b/arch/arm/mach-mt8127/ttab/alsps/alsps.h deleted file mode 100644 index 8abb1d16e3e..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/alsps.h +++ /dev/null @@ -1,153 +0,0 @@ - -#ifndef __ALSPS_H__ -#define __ALSPS_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ALSPS_TAG " " -#define ALSPS_FUN(f) printk(ALSPS_TAG"%s\n", __func__) -#define ALSPS_ERR(fmt, args...) printk(ALSPS_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define ALSPS_LOG(fmt, args...) printk(ALSPS_TAG fmt, ##args) -#define ALSPS_VER(fmt, args...) printk(ALSPS_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_ALSPS_DELAY 0X01 -#define OP_ALSPS_ENABLE 0X02 -#define OP_ALSPS_GET_DATA 0X04 - -#define ALSPS_INVALID_VALUE -1 - -#define EVENT_TYPE_ALS_VALUE ABS_X -#define EVENT_TYPE_PS_VALUE ABS_Z -#define EVENT_TYPE_ALS_STATUS ABS_WHEEL -#define EVENT_TYPE_PS_STATUS ABS_Y - - -#define ALSPS_VALUE_MAX (32767) -#define ALSPS_VALUE_MIN (-32768) -#define ALSPS_STATUS_MIN (0) -#define ALSPS_STATUS_MAX (64) -#define ALSPS_DIV_MAX (32767) -#define ALSPS_DIV_MIN (1) - - -#define MAX_CHOOSE_ALSPS_NUM 5 - -struct als_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct ps_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - int (*access_data_fifo)();//version2.used for flush operate - bool is_report_input_direct; - bool is_support_batch;//version2.used for batch mode support flag - bool is_polling_mode; -}; - -struct als_data_path -{ - int (*get_data)(int *als_value, int *status); - int vender_div; -}; - -struct ps_data_path -{ - int (*get_data)(int *ps_value, int *status); - int vender_div; -}; - -struct alsps_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct alsps_data{ - hwm_sensor_data als_data ; - hwm_sensor_data ps_data ; - int data_updata; -}; - -struct alsps_drv_obj { - void *self; - int polling; - int (*alsps_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct alsps_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report_ps; - struct work_struct report_als; - struct mutex alsps_op_mutex; - struct timer_list timer_als; /*als polling timer */ - struct timer_list timer_ps; /* ps polling timer */ - - atomic_t trace; - atomic_t delay_als; /*als polling period for reporting input event*/ - atomic_t delay_ps;/*ps polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - - struct early_suspend early_drv; - atomic_t early_suspend; - - struct alsps_data drv_data; - struct als_control_path als_ctl; - struct als_data_path als_data; - struct ps_control_path ps_ctl; - struct ps_data_path ps_data; - - bool is_als_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_als_active_data;// Active and HAL need data . - bool is_ps_active_nodata;// Active, but HAL don't need data sensor. such as orientation need - bool is_ps_active_data;// Active and HAL need data . - - bool is_als_first_data_after_enable; - bool is_ps_first_data_after_enable; - bool is_als_polling_run; - bool is_ps_polling_run; - bool is_als_batch_enable; //version2.this is used for judging whether sensor is in batch mode - bool is_ps_batch_enable; //version2.this is used for judging whether sensor is in batch mode - -}; - -//for auto detect -extern int alsps_driver_add(struct alsps_init_info* obj) ; -extern int ps_report_interrupt_data(int value); -extern int als_data_report(struct input_dev *dev, int value,int status); -extern int als_register_control_path(struct als_control_path *ctl); -extern int als_register_data_path(struct als_data_path *data); -extern int ps_data_report(struct input_dev *dev, int value,int status); -extern int ps_register_control_path(struct ps_control_path *ctl); -extern int ps_register_data_path(struct ps_data_path *data); - - - - - -#endif diff --git a/arch/arm/mach-mt8127/ttab/alsps/cust_alsps.c b/arch/arm/mach-mt8127/ttab/alsps/cust_alsps.c deleted file mode 100644 index 6b95a7a8fd1..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/cust_alsps.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -//#include - -static struct alsps_hw cust_alsps_hw = { - .i2c_num = 2, - .polling_mode_ps =0, - .polling_mode_als =1, - .power_id = MT65XX_POWER_NONE, /*LDO is not used*/ - .power_vol = VOL_DEFAULT, /*LDO is not used*/ - .i2c_addr = {0x72, 0x48, 0x78, 0x00}, - /*Lenovo-sw chenlj2 add 2011-06-03,modify parameter below two lines*/ - //.als_level = { 4, 40, 80, 120, 160, 250, 400, 800, 1200, 1600, 2000, 3000, 5000, 10000, 65535}, - //.als_value = {10, 20,20, 120, 120, 280, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .als_level = { 5, 10, 25, 50, 100, 150, 200, 400, 1000, 1500, 2000, 3000, 5000, 8000, 10000}, - .als_value = {10, 50, 100, 150, 200, 250, 280, 280, 1600, 1600, 1600, 6000, 6000, 9000, 10240, 10240}, - .ps_threshold_high = 120, - .ps_threshold_low = 100, - .ps_threshold = 900, -}; -struct alsps_hw *get_cust_alsps_hw(void) { - return &cust_alsps_hw; -} -int APDS9930_CMM_PPCOUNT_VALUE = 0x08; -int APDS9930_CMM_CONTROL_VALUE = 0xE4; -int ZOOM_TIME = 4; diff --git a/arch/arm/mach-mt8127/ttab/alsps/inc/cust_alsps.h b/arch/arm/mach-mt8127/ttab/alsps/inc/cust_alsps.h deleted file mode 100644 index 4ed2153a815..00000000000 --- a/arch/arm/mach-mt8127/ttab/alsps/inc/cust_alsps.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CUST_ALSPS_H__ -#define __CUST_ALSPS_H__ - -#include - -#define C_CUST_ALS_LEVEL 16 -#define C_CUST_I2C_ADDR_NUM 4 - -#define MAX_THRESHOLD_HIGH 0xffff -#define MIN_THRESHOLD_LOW 0x0 - -struct alsps_hw { - int i2c_num; /*!< the i2c bus used by ALS/PS */ - int power_id; /*!< the VDD power id of the als chip */ - int power_vol; /*!< the VDD power voltage of the als chip */ - int polling_mode; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_ps; /*!< 1: polling mode ; 0:interrupt mode*/ - int polling_mode_als; /*!< 1: polling mode ; 0:interrupt mode*/ - unsigned char i2c_addr[C_CUST_I2C_ADDR_NUM]; /*!< i2c address list, some chip will have multiple address */ - unsigned int als_level[C_CUST_ALS_LEVEL-1]; /*!< (C_CUST_ALS_LEVEL-1) levels divides all range into C_CUST_ALS_LEVEL levels*/ - unsigned int als_value[C_CUST_ALS_LEVEL]; /*!< the value reported in each level */ - unsigned int ps_threshold; /*!< the threshold of proximity sensor */ - unsigned int als_window_loss; /*!< the window loss */ - unsigned int ps_threshold_high; - unsigned int ps_threshold_low; - unsigned int als_threshold_high; - unsigned int als_threshold_low; - int als_power_vio_id; /*!< the VIO power id of the als chip */ - int als_power_vio_vol; /*!< the VIO power voltage of the als chip */ - int ps_power_vdd_id; /*!< the VDD power id of the ps chip */ - int ps_power_vdd_vol; /*!< the VDD power voltage of the ps chip */ - int ps_power_vio_id; /*!< the VIO power id of the ps chip */ - int ps_power_vio_vol; /*!< the VIO power voltage of the ps chip */ - int power_lp_mode_ctrl; /*!< 1: disable ldo low power mode when p sensor enabled ; 0: no action*/ - bool is_batch_supported_ps; - bool is_batch_supported_als; -}; - -extern struct alsps_hw* get_cust_alsps_hw(void); - -__weak int pmic_ldo_suspend_enable(int enable); -#endif diff --git a/arch/arm/mach-mt8127/ttab/cam_cal/Makefile b/arch/arm/mach-mt8127/ttab/cam_cal/Makefile deleted file mode 100755 index e97b9706c07..00000000000 --- a/arch/arm/mach-mt8127/ttab/cam_cal/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_cam_cal.o diff --git a/arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.c b/arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.c deleted file mode 100644 index 32ff50ffde8..00000000000 --- a/arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Driver for CAM_CAL - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "cam_cal.h" -#include "cam_cal_define.h" - -#include "dummy_cam_cal.h" -#include // for SMP - -//#define CAM_CALGETDLT_DEBUG //test -//#define CAM_CAL_DEBUG //test -#ifdef CAM_CAL_DEBUG -#define CAM_CALDB printk -#else -#define CAM_CALDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_CAM_CALLock); // for SMP - -#define CAM_CAL_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_cam_cal_dev={ I2C_BOARD_INFO("dummy_cam_cal", 0xAB>>1)}; //make dummy_eeprom co-exist - -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define CAM_CAL_DRVNAME "dummy_cam_cal" -#define CAM_CAL_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stCAM_CAL_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_CAM_CALdevno = MKDEV(CAM_CAL_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pCAM_CAL_CharDrv = NULL; -//static spinlock_t g_CAM_CALLock; -static struct class *CAM_CAL_class = NULL; -static atomic_t g_CAM_CALatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteCAM_CAL(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - CAM_CALDB("[CAM_CAL] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //CAM_CALDB("[CAM_CAL] iWriteCAM_CAL done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadCAM_CAL(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL!! \n"); - - if(ui4_length > 8) - { - CAM_CALDB("[CAM_CAL] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - CAM_CALDB("[CAM_CAL] I2C send read address failed!! \n"); - return -1; - } - - //CAM_CALDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - CAM_CALDB("[CAM_CAL] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_CAM_CALLock); // for SMP - - //CAM_CALDB("[CAM_CAL] iReadCAM_CAL done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - CAM_CALDB("[CAM_CAL] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - CAM_CALDB("[CAM_CAL] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - CAM_CALDB("[CAM_CAL] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stCAM_CAL_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - CAM_CALDB("[CAM_CAL] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - CAM_CALDB("[CAM_CAL] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadCAM_CAL((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - CAM_CALDB("[CAM_CAL] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG CAM_CALDB("[CAM_CAL] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - CAM_CALDB("[CAM_CAL] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int CAM_CAL_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long CAM_CAL_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stCAM_CAL_INFO_STRUCT *ptempbuf; - -#ifdef CAM_CALGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stCAM_CAL_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stCAM_CAL_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stCAM_CAL_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - CAM_CALDB("[CAM_CAL] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG CAM_CALDB("[CAM_CAL] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case CAM_CALIOC_S_WRITE: - CAM_CALDB("[CAM_CAL] Write CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case CAM_CALIOC_G_READ: - CAM_CALDB("[CAM_CAL] Read CMD \n"); -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - CAM_CALDB("[CAM_CAL] offset %d \n", ptempbuf->u4Offset); - CAM_CALDB("[CAM_CAL] length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG CAM_CALDB("[CAM_CAL] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef CAM_CALGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - CAM_CALDB("[CAM_CAL] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - CAM_CALDB("[CAM_CAL] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG CAM_CALDB("[CAM_CAL] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - CAM_CALDB("[CAM_CAL] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int CAM_CAL_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - CAM_CALDB("[S24CAM_CAL] CAM_CAL_Open\n"); - spin_lock(&g_CAM_CALLock); - if(g_u4Opened) - { - spin_unlock(&g_CAM_CALLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_CAM_CALatomic,0); - } - spin_unlock(&g_CAM_CALLock); - -//#if defined(MT6572) - // do nothing -//#else - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // CAM_CALDB("[CAM_CAL] Fail to enable analog gain\n"); - // return -EIO; - //} -//#endif - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int CAM_CAL_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_CAM_CALLock); - - g_u4Opened = 0; - - atomic_set(&g_CAM_CALatomic,0); - - spin_unlock(&g_CAM_CALLock); - - return 0; -} - -static const struct file_operations g_stCAM_CAL_fops = -{ - .owner = THIS_MODULE, - .open = CAM_CAL_Open, - .release = CAM_CAL_Release, - //.ioctl = CAM_CAL_Ioctl - .unlocked_ioctl = CAM_CAL_Ioctl -}; - -#define CAM_CAL_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterCAM_CALCharDrv(void) -{ - struct device* CAM_CAL_device = NULL; - -#if CAM_CAL_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_CAM_CALdevno, 0, 1,CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_CAM_CALdevno , 1 , CAM_CAL_DRVNAME) ) - { - CAM_CALDB("[CAM_CAL] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pCAM_CAL_CharDrv = cdev_alloc(); - - if(NULL == g_pCAM_CAL_CharDrv) - { - unregister_chrdev_region(g_CAM_CALdevno, 1); - - CAM_CALDB("[CAM_CAL] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pCAM_CAL_CharDrv, &g_stCAM_CAL_fops); - - g_pCAM_CAL_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pCAM_CAL_CharDrv, g_CAM_CALdevno, 1)) - { - CAM_CALDB("[CAM_CAL] Attatch file operation failed\n"); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - return -EAGAIN; - } - - CAM_CAL_class = class_create(THIS_MODULE, "CAM_CALdrv"); - if (IS_ERR(CAM_CAL_class)) { - int ret = PTR_ERR(CAM_CAL_class); - CAM_CALDB("Unable to create class, err = %d\n", ret); - return ret; - } - CAM_CAL_device = device_create(CAM_CAL_class, NULL, g_CAM_CALdevno, NULL, CAM_CAL_DRVNAME); - - return 0; -} - -inline static void UnregisterCAM_CALCharDrv(void) -{ - //Release char driver - cdev_del(g_pCAM_CAL_CharDrv); - - unregister_chrdev_region(g_CAM_CALdevno, 1); - - device_destroy(CAM_CAL_class, g_CAM_CALdevno); - class_destroy(CAM_CAL_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int CAM_CAL_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int CAM_CAL_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id CAM_CAL_i2c_id[] = {{CAM_CAL_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {CAM_CAL_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver CAM_CAL_i2c_driver = { - .probe = CAM_CAL_i2c_probe, - .remove = CAM_CAL_i2c_remove, -// .detect = CAM_CAL_i2c_detect, - .driver.name = CAM_CAL_DRVNAME, - .id_table = CAM_CAL_i2c_id, -}; - -#ifndef CAM_CAL_ICS_REVISION -static int CAM_CAL_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, CAM_CAL_DRVNAME); - return 0; -} -#endif -static int CAM_CAL_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - CAM_CALDB("[CAM_CAL] Attach I2C \n"); -// spin_lock_init(&g_CAM_CALLock); - - //get sensor i2c client - spin_lock(&g_CAM_CALLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_CAM_CALLock); // for SMP - - CAM_CALDB("[CAM_CAL] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterCAM_CALCharDrv(); - - if(i4RetValue){ - CAM_CALDB("[CAM_CAL] register char device failed!\n"); - return i4RetValue; - } - - - CAM_CALDB("[CAM_CAL] Attached!! \n"); - return 0; -} - -static int CAM_CAL_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int CAM_CAL_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&CAM_CAL_i2c_driver); -} - -static int CAM_CAL_remove(struct platform_device *pdev) -{ - i2c_del_driver(&CAM_CAL_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stCAM_CAL_Driver = { - .probe = CAM_CAL_probe, - .remove = CAM_CAL_remove, - .driver = { - .name = CAM_CAL_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stCAM_CAL_Device = { - .name = CAM_CAL_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init CAM_CAL_i2C_init(void) -{ - i2c_register_board_info(CAM_CAL_I2C_BUSNUM, &kd_cam_cal_dev, 1); - if(platform_driver_register(&g_stCAM_CAL_Driver)){ - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stCAM_CAL_Device)) - { - CAM_CALDB("failed to register CAM_CAL driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit CAM_CAL_i2C_exit(void) -{ - platform_driver_unregister(&g_stCAM_CAL_Driver); -} - -module_init(CAM_CAL_i2C_init); -module_exit(CAM_CAL_i2C_exit); - -MODULE_DESCRIPTION("CAM_CAL driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.h b/arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.h deleted file mode 100644 index bf7e9099bb0..00000000000 --- a/arch/arm/mach-mt8127/ttab/cam_cal/dummy_cam_cal.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of CAM_CAL driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __CAM_CAL_H -#define __CAM_CAL_H - -#define CAM_CAL_DEV_MAJOR_NUMBER 226 - -/* CAM_CAL READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xAB //0xFE // - -#endif /* __CAM_CAL_H */ - diff --git a/arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal.h b/arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal.h deleted file mode 100644 index 8dd6b365e20..00000000000 --- a/arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CAM_CAL_H -#define _CAM_CAL_H - -#include - - -#define CAM_CALAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//CAM_CAL write -#define CAM_CALIOC_S_WRITE _IOW(CAM_CALAGIC,0,stCAM_CAL_INFO_STRUCT) -//CAM_CAL read -#define CAM_CALIOC_G_READ _IOWR(CAM_CALAGIC,5,stPCAM_CAL_INFO_STRUCT) - -#endif //_CAM_CAL_H - - diff --git a/arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal_define.h b/arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal_define.h deleted file mode 100644 index c5e07e4114d..00000000000 --- a/arch/arm/mach-mt8127/ttab/cam_cal/inc/cam_cal_define.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAM_CAL_DATA_H -#define _CAM_CAL_DATA_H - - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stCAM_CAL_INFO_STRUCT, *stPCAM_CAL_INFO_STRUCT; -#endif //_CAM_CAL_DATA_H diff --git a/arch/arm/mach-mt8127/ttab/camera/camera/Makefile b/arch/arm/mach-mt8127/ttab/camera/camera/Makefile deleted file mode 100755 index f9cc9d0542f..00000000000 --- a/arch/arm/mach-mt8127/ttab/camera/camera/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += dummyds.o -obj-y += kd_camera_hw.o diff --git a/arch/arm/mach-mt8127/ttab/camera/camera/dummyds.c b/arch/arm/mach-mt8127/ttab/camera/camera/dummyds.c deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.c b/arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.c deleted file mode 100644 index 5da4200c63c..00000000000 --- a/arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.c +++ /dev/null @@ -1,326 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kd_camera_hw.h" - -#include "kd_imgsensor.h" -#include "kd_imgsensor_define.h" -#include "kd_camera_feature.h" - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -#define PFX "[kd_camera_hw]" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg) - -#define DEBUG_CAMERA_HW_K -#ifdef DEBUG_CAMERA_HW_K -#define PK_DBG PK_DBG_FUNC -#define PK_ERR(fmt, arg...) xlog_printk(ANDROID_LOG_ERR, PFX , fmt, ##arg) -#define PK_XLOG_INFO(fmt, args...) \ - do { \ - xlog_printk(ANDROID_LOG_INFO, PFX , fmt, ##arg); \ - } while(0) -#else -#define PK_DBG(a,...) -#define PK_ERR(a,...) -#define PK_XLOG_INFO(fmt, args...) -#endif - - - -int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char* mode_name) -{ -#if !defined (MTK_ALPS_BOX_SUPPORT) - -u32 pinSetIdx = 0;//default main sensor - -#define IDX_PS_CMRST 0 -#define IDX_PS_CMPDN 4 - -#define IDX_PS_MODE 1 -#define IDX_PS_ON 2 -#define IDX_PS_OFF 3 - - -u32 pinSet[2][8] = { - //for main sensor - {GPIO_CAMERA_CMRST_PIN, - GPIO_CAMERA_CMRST_PIN_M_GPIO, /* mode */ - GPIO_OUT_ONE, /* ON state */ - GPIO_OUT_ZERO, /* OFF state */ - GPIO_CAMERA_CMPDN_PIN, - GPIO_CAMERA_CMPDN_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - //for sub sensor - {GPIO_CAMERA_CMRST1_PIN, - GPIO_CAMERA_CMRST1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - GPIO_CAMERA_CMPDN1_PIN, - GPIO_CAMERA_CMPDN1_PIN_M_GPIO, - GPIO_OUT_ONE, - GPIO_OUT_ZERO, - }, - }; - - if (DUAL_CAMERA_MAIN_SENSOR == SensorIdx){ - pinSetIdx = 0; - } - else if (DUAL_CAMERA_SUB_SENSOR == SensorIdx) { - pinSetIdx = 1; - } - - //power ON - if (On) { - - PK_DBG("kdCISModulePowerOn -on:currSensorName=%s;\n",currSensorName); - PK_DBG("kdCISModulePowerOn -on:pinSetIdx=%d\n",pinSetIdx); - - if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5670_MIPI_RAW,currSensorName)||0 == strcmp(SENSOR_DRVNAME_OV56702ND_MIPI_RAW,currSensorName))){ - - if (pinSetIdx == 0){ - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_OUT_ZERO)){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - } - - mdelay(10); - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_OUT_ONE)){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - } - - mdelay(10); - - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1200,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - } - mdelay(10); - - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_OUT_ONE)){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - - } - }else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2680_RAW ,currSensorName))) { - - if (pinSetIdx == 1){ - { - //PDN pin - // if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - // if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN], GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - // if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - // mdelay(10); - // if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - // mdelay(5); - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST], GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(10); - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable IO power\n"); - goto _kdCISModulePowerOn_exit_; - } - - msleep(10); - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - goto _kdCISModulePowerOn_exit_; - } - - //if(TRUE != hwPowerOn(PMIC_APP_MAIN_CAMERA_POWER_D, VOL_1500,mode_name)) - // { - // PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - // goto _kdCISModulePowerOn_exit_; - // } - - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - - // wait power to be stable - mdelay(10); - } - - }else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2355_MIPI_RAW ,currSensorName))) { - - if (pinSetIdx == 1){ - //PDN pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN], GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - - //RST pin - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST], GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - mdelay(10); - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D2, VOL_1800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable IO power\n"); - goto _kdCISModulePowerOn_exit_; - } - - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_D, VOL_1800,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable digital power\n"); - goto _kdCISModulePowerOn_exit_; - } - - if(TRUE != hwPowerOn(CAMERA_POWER_VCAM_A, VOL_2800, mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to enable analog power\n"); - goto _kdCISModulePowerOn_exit_; - } - - - mdelay(5); - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - - mdelay(5); - - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST], pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_ON])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} - - // wait power to be stable - mdelay(10); - - } - - } - - - }else {//power OFF - - if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV5670_MIPI_RAW,currSensorName)||0 == strcmp(SENSOR_DRVNAME_OV56702ND_MIPI_RAW,currSensorName))){ - - if (pinSetIdx == 0){ - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - - mdelay(5); - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D, mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF d digital power\n"); - } - mdelay(5); - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN],GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN],pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_OFF])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} //high == power down lens module - mdelay(5); - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - } - - - } else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_OV2680_RAW,currSensorName))){ - - if (pinSetIdx == 1){ - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - mdelay(5); - - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - } - } else if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_GC2355_MIPI_RAW,currSensorName))){ - - if (pinSetIdx == 1){ - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_MODE])){PK_DBG("[CAMERA LENS] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMPDN], GPIO_DIR_OUT)){PK_DBG("[CAMERA LENS] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMPDN], pinSet[pinSetIdx][IDX_PS_CMPDN+IDX_PS_ON])){PK_DBG("[CAMERA LENS] set gpio failed!! \n");} - - mdelay(5); - - if (GPIO_CAMERA_INVALID != pinSet[pinSetIdx][IDX_PS_CMRST]) { - - if(mt_set_gpio_mode(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_MODE])){PK_DBG("[CAMERA SENSOR] set gpio mode failed!! \n");} - if(mt_set_gpio_dir(pinSet[pinSetIdx][IDX_PS_CMRST],GPIO_DIR_OUT)){PK_DBG("[CAMERA SENSOR] set gpio dir failed!! \n");} - if(mt_set_gpio_out(pinSet[pinSetIdx][IDX_PS_CMRST],pinSet[pinSetIdx][IDX_PS_CMRST+IDX_PS_OFF])){PK_DBG("[CAMERA SENSOR] set gpio failed!! \n");} //low == reset sensor - - } - - mdelay(5); - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_A,mode_name)) { - PK_DBG("[CAMERA SENSOR] Fail to OFF a power\n"); - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - - if(TRUE != hwPowerDown(CAMERA_POWER_VCAM_D2,mode_name)) - { - PK_DBG("[CAMERA SENSOR] Fail to OFF d2 digital power\n"); - } - } - } - - - }// - -#endif /* end of defined MTK_ALPS_BOX_SUPPORT */ - - return 0; - -_kdCISModulePowerOn_exit_: - return -EIO; -} - -EXPORT_SYMBOL(kdCISModulePowerOn); - - -//!-- -// - - - - diff --git a/arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.h b/arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.h deleted file mode 100644 index bb1a5e59cbb..00000000000 --- a/arch/arm/mach-mt8127/ttab/camera/camera/kd_camera_hw.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _KD_CAMERA_HW_H_ -#define _KD_CAMERA_HW_H_ - - -#include -#include - - - - -// -//Power -#ifdef CONFIG_MTK_PMIC_MT6397 - #define CAMERA_POWER_VCAM_A MT65XX_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT65XX_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT65XX_POWER_LDO_VCAMAF - #define CAMERA_POWER_VCAM_D2 MT65XX_POWER_LDO_VCAMIO -#else - #define CAMERA_POWER_VCAM_A MT6323_POWER_LDO_VCAMA - #define CAMERA_POWER_VCAM_D MT6323_POWER_LDO_VCAMD - #define CAMERA_POWER_VCAM_A2 MT6323_POWER_LDO_VCAM_AF - #define CAMERA_POWER_VCAM_D2 MT6323_POWER_LDO_VCAM_IO -#endif - -//FIXME, should defined in DCT tool -// -/* -#ifndef GPIO_CAMERA_LDO_EN_PIN -#define GPIO_CAMERA_LDO_EN_PIN GPIO94 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN -#define GPIO_CAMERA_CMRST_PIN GPIO9 -#endif -// -#ifndef GPIO_CAMERA_CMRST_PIN_M_GPIO -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN -#define GPIO_CAMERA_CMPDN_PIN GPIO10 -#endif -// -#ifndef GPIO_CAMERA_LDO_EN_PIN_M_GPIO -#define GPIO_CAMERA_LDO_EN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN -#define GPIO_CAMERA_CMRST1_PIN GPIO3 -#endif -// -#ifndef GPIO_CAMERA_CMRST1_PIN_M_GPIO -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN -#define GPIO_CAMERA_CMPDN1_PIN GPIO4 -#endif -// -#ifndef GPIO_CAMERA_CMPDN1_PIN_M_GPIO -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 -#endif - - - -//i2c id for sensor device, MT8320_fpga, the I2C is attached on 1 -#define IMG_SENSOR_I2C_GROUP_ID 0 - -#define A60373_WRITE_ID (0xC0) -#define A60373_READ_ID (0xC1) -*/ - - -#endif diff --git a/arch/arm/mach-mt8127/ttab/common/partition_define.h b/arch/arm/mach-mt8127/ttab/common/partition_define.h deleted file mode 100644 index 8a2504f5206..00000000000 --- a/arch/arm/mach-mt8127/ttab/common/partition_define.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef __PARTITION_DEFINE_H__ -#define __PARTITION_DEFINE_H__ - - - - -#define KB (1024ULL) -#define MB (1024 * KB) -#define GB (1024 * MB) - -#define PART_PRELOADER "PRELOADER" -#define PART_MBR "MBR" -#define PART_EBR1 "EBR1" -#define PART_PRO_INFO "PRO_INFO" -#define PART_NVRAM "NVRAM" -#define PART_PROTECT_F "PROTECT_F" -#define PART_PROTECT_S "PROTECT_S" -#define PART_SECCFG "SECCFG" -#define PART_UBOOT "UBOOT" -#define PART_BOOTIMG "BOOTIMG" -#define PART_RECOVERY "RECOVERY" -#define PART_SEC_RO "SEC_RO" -#define PART_MISC "MISC" -#define PART_LOGO "LOGO" -#define PART_EBR2 "EBR2" -#define PART_EXPDB "EXPDB" -#define PART_TEE1 "TEE1" -#define PART_TEE2 "TEE2" -#define PART_KB "KB" -#define PART_DKB "DKB" -#define PART_ANDROID "ANDROID" -#define PART_CACHE "CACHE" -#define PART_USRDATA "USRDATA" -#define PART_FAT "FAT" -#define PART_BMTPOOL "BMTPOOL" -/*preloader re-name*/ -#define PART_SECURE "SECURE" -#define PART_SECSTATIC "SECSTATIC" -#define PART_ANDSYSIMG "ANDSYSIMG" -#define PART_USER "USER" -/*Uboot re-name*/ -#define PART_APANIC "APANIC" - -#define PART_FLAG_NONE 0 -#define PART_FLAG_LEFT 0x1 -#define PART_FLAG_END 0x2 -#define PART_MAGIC 0x58881688 - -#define PART_SIZE_PRELOADER (256*KB) -#define PART_SIZE_MBR (512*KB) -#define PART_SIZE_EBR1 (512*KB) -#define PART_SIZE_PRO_INFO (3072*KB) -#define PART_SIZE_NVRAM (5120*KB) -#define PART_SIZE_PROTECT_F (10240*KB) -#define PART_SIZE_PROTECT_S (10240*KB) -#define PART_SIZE_SECCFG (128*KB) -#define PART_OFFSET_SECCFG (0x1d00000) -#define PART_SIZE_UBOOT (384*KB) -#define PART_SIZE_BOOTIMG (16384*KB) -#define PART_SIZE_RECOVERY (16384*KB) -#define PART_SIZE_SEC_RO (6144*KB) -#define PART_OFFSET_SEC_RO (0x3d80000) -#define PART_SIZE_MISC (512*KB) -#define PART_SIZE_LOGO (3072*KB) -#define PART_SIZE_EBR2 (512*KB) -#define PART_SIZE_EXPDB (10240*KB) -#define PART_SIZE_TEE1 (5120*KB) -#define PART_SIZE_TEE2 (5120*KB) -#define PART_SIZE_KB (1024*KB) -#define PART_SIZE_DKB (1024*KB) -#define PART_SIZE_ANDROID (1048576*KB) -#define PART_SIZE_CACHE (129024*KB) -#define PART_SIZE_USRDATA (2097152*KB) -#define PART_SIZE_FAT (0*KB) -#define PART_SIZE_BMTPOOL (0xa8) - - -#define PART_NUM 25 - - - -#define PART_MAX_COUNT 40 - -#define MBR_START_ADDRESS_BYTE (20480*KB) - -#define WRITE_SIZE_Byte 512 -typedef enum { - EMMC = 1, - NAND = 2, -} dev_type; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -typedef enum { - EMMC_PART_UNKNOWN=0 - ,EMMC_PART_BOOT1 - ,EMMC_PART_BOOT2 - ,EMMC_PART_RPMB - ,EMMC_PART_GP1 - ,EMMC_PART_GP2 - ,EMMC_PART_GP3 - ,EMMC_PART_GP4 - ,EMMC_PART_USER - ,EMMC_PART_END -} Region; -#else -typedef enum { -NAND_PART_UNKNOWN=0 -,NAND_PART_USER -} Region; -#endif -struct excel_info{ - char * name; - unsigned long long size; - unsigned long long start_address; - dev_type type ; - unsigned int partition_idx; - Region region; -}; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*MBR or EBR struct*/ -#define SLOT_PER_MBR 4 -#define MBR_COUNT 8 - -struct MBR_EBR_struct{ - char part_name[8]; - int part_index[SLOT_PER_MBR]; -}; - -extern struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]; -#endif -extern struct excel_info *PartInfo; - - -#endif diff --git a/arch/arm/mach-mt8127/ttab/common/partition_define_private.h b/arch/arm/mach-mt8127/ttab/common/partition_define_private.h deleted file mode 100644 index 1e19b311893..00000000000 --- a/arch/arm/mach-mt8127/ttab/common/partition_define_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "partition_define.h" -static const struct excel_info PartInfo_Private[PART_NUM]={ {"preloader",262144,0, EMMC, 0,EMMC_PART_BOOT1}, - {"mbr",524288,0x0, EMMC, 0,EMMC_PART_USER}, - {"ebr1",524288,0x80000, EMMC, 1,EMMC_PART_USER}, - {"pro_info",3145728,0x100000, EMMC, 0,EMMC_PART_USER}, - {"nvram",5242880,0x400000, EMMC, 0,EMMC_PART_USER}, - {"protect_f",10485760,0x900000, EMMC, 2,EMMC_PART_USER}, - {"protect_s",10485760,0x1300000, EMMC, 3,EMMC_PART_USER}, - {"seccfg",131072,0x1d00000, EMMC, 0,EMMC_PART_USER}, - {"uboot",393216,0x1d20000, EMMC, 0,EMMC_PART_USER}, - {"bootimg",16777216,0x1d80000, EMMC, 0,EMMC_PART_USER}, - {"recovery",16777216,0x2d80000, EMMC, 0,EMMC_PART_USER}, - {"sec_ro",6291456,0x3d80000, EMMC, 4,EMMC_PART_USER}, - {"misc",524288,0x4380000, EMMC, 0,EMMC_PART_USER}, - {"logo",3145728,0x4400000, EMMC, 0,EMMC_PART_USER}, - {"ebr2",524288,0x4700000, EMMC, 0,EMMC_PART_USER}, - {"expdb",10485760,0x4780000, EMMC, 0,EMMC_PART_USER}, - {"tee1",5242880,0x5180000, EMMC, 0,EMMC_PART_USER}, - {"tee2",5242880,0x5680000, EMMC, 0,EMMC_PART_USER}, - {"kb",1048576,0x5b80000, EMMC, 0,EMMC_PART_USER}, - {"dkb",1048576,0x5c80000, EMMC, 0,EMMC_PART_USER}, - {"android",1073741824,0x5d80000, EMMC, 5,EMMC_PART_USER}, - {"cache",132120576,0x45d80000, EMMC, 6,EMMC_PART_USER}, - {"usrdata",2147483648,0x4db80000, EMMC, 7,EMMC_PART_USER}, - {"fat",0,0xcdb80000, EMMC, 8,EMMC_PART_USER}, - {"bmtpool",22020096,0xFFFF00a8, EMMC, 0,EMMC_PART_USER}, - }; - -#ifdef CONFIG_MTK_EMMC_SUPPORT -struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={ - {"mbr", {1, 2, 3, 4, }}, - {"ebr1", {5, 6, 7, }}, - {"ebr2", {8, }}, -}; - -EXPORT_SYMBOL(MBR_EBR_px); -#endif - diff --git a/arch/arm/mach-mt8127/ttab/common/pmt.h b/arch/arm/mach-mt8127/ttab/common/pmt.h deleted file mode 100644 index 23504536328..00000000000 --- a/arch/arm/mach-mt8127/ttab/common/pmt.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _PMT_H -#define _PMT_H - -#include "partition_define.h" - -//mt6516_partition.h has defination -//mt6516_download.h define again, both is 20 - -#define MAX_PARTITION_NAME_LEN 64 -#ifdef CONFIG_MTK_EMMC_SUPPORT -/*64bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -/*32bit*/ -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long size; /* partition size */ - unsigned long offset; /* partition start */ - unsigned long mask_flags; /* partition flags */ - -} pt_resident32; -#else - -typedef struct -{ - char name[MAX_PARTITION_NAME_LEN]; /* partition name */ - unsigned long long size; /* partition size */ - unsigned long long part_id; /* partition region */ - unsigned long long offset; /* partition start */ - unsigned long long mask_flags; /* partition flags */ - -} pt_resident; -#endif - - -#define DM_ERR_OK 0 -#define DM_ERR_NO_VALID_TABLE 9 -#define DM_ERR_NO_SPACE_FOUND 10 -#define ERR_NO_EXIST 1 - -//Sequnce number - - -//#define PT_LOCATION 4090 // (4096-80) -//#define MPT_LOCATION 4091 // (4096-81) -#define PT_SIG 0x50547633 //"PTv3" -#define MPT_SIG 0x4D505433 //"MPT3" -#define PT_SIG_SIZE 4 -//#define is_valid_mpt(buf) ((*(unsigned int *)(buf))==MPT_SIG) -//#define is_valid_pt(buf) ((*(unsigned int *)(buf))==PT_SIG) -#define is_valid_pt(buf) (!memcmp(buf, "3vTP", 4)) -#define is_valid_mpt(buf) (!memcmp(buf, "3TPM", 4)) -#define RETRY_TIMES 5 - - -typedef struct _DM_PARTITION_INFO -{ - char part_name[MAX_PARTITION_NAME_LEN]; /* the name of partition */ - unsigned long long start_addr; /* the start address of partition */ - unsigned long long part_len; /* the length of partition */ - unsigned char part_visibility; /* part_visibility is 0: this partition is hidden and CANNOT download */ - /* part_visibility is 1: this partition is visible and can download */ - unsigned char dl_selected; /* dl_selected is 0: this partition is NOT selected to download */ - /* dl_selected is 1: this partition is selected to download */ -} DM_PARTITION_INFO; - -typedef struct { - unsigned int pattern; - unsigned int part_num; /* The actual number of partitions */ - DM_PARTITION_INFO part_info[PART_MAX_COUNT]; -} DM_PARTITION_INFO_PACKET; - -typedef struct { - int sequencenumber:8; - int tool_or_sd_update:8; - int mirror_pt_dl:4; //mirror download OK - int mirror_pt_has_space:4; - int pt_changed:4; - int pt_has_space:4; -} pt_info; - -#endif - diff --git a/arch/arm/mach-mt8127/ttab/core/Makefile b/arch/arm/mach-mt8127/ttab/core/Makefile deleted file mode 100755 index 7e6aa1c853f..00000000000 --- a/arch/arm/mach-mt8127/ttab/core/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := board.o - diff --git a/arch/arm/mach-mt8127/ttab/core/board-custom.h b/arch/arm/mach-mt8127/ttab/core/board-custom.h deleted file mode 100644 index 93d88239e1e..00000000000 --- a/arch/arm/mach-mt8127/ttab/core/board-custom.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H -#define __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H - -#include - -/*=======================================================================*/ -/* MT6575 SD */ -/*=======================================================================*/ -#define CFG_DEV_MSDC0 -#define CFG_DEV_MSDC1 -//#define CFG_DEV_MSDC2 -//#define CFG_DEV_MSDC3 -//#define CFG_DEV_MSDC4 -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -/* -SDIO slot index number used by connectivity combo chip: -0: invalid (used by memory card) -1: MSDC1 -2: MSDC2 -*/ -#define CONFIG_MTK_WCN_CMB_SDIO_SLOT (3) /* MSDC3 */ -#else -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT -#endif -/*For MT6582 platform we disable COMBO SDIO SLOT defination*/ -#undef CONFIG_MTK_WCN_CMB_SDIO_SLOT - -#if 0 /* FIXME. */ -/*=======================================================================*/ -/* MT6575 UART */ -/*=======================================================================*/ -#define CFG_DEV_UART1 -#define CFG_DEV_UART2 -#define CFG_DEV_UART3 -#define CFG_DEV_UART4 - -#define CFG_UART_PORTS (4) - -/*=======================================================================*/ -/* MT6575 I2C */ -/*=======================================================================*/ -#define CFG_DEV_I2C -//#define CFG_I2C_HIGH_SPEED_MODE -//#define CFG_I2C_DMA_MODE - -/*=======================================================================*/ -/* MT6575 ADB */ -/*=======================================================================*/ -#define ADB_SERIAL "E1K" - -#endif - -/*=======================================================================*/ -/* MT6575 NAND FLASH */ -/*=======================================================================*/ -#if 0 -#define RAMDOM_READ 1<<0 -#define CACHE_READ 1<<1 -/******************************************************************************* - * NFI & ECC Configuration - *******************************************************************************/ -typedef struct -{ - u16 id; //deviceid+menuid - u8 addr_cycle; - u8 iowidth; - u16 totalsize; - u16 blocksize; - u16 pagesize; - u32 timmingsetting; - char devciename[14]; - u32 advancedmode; // -}flashdev_info,*pflashdev_info; - -static const flashdev_info g_FlashTable[]={ - //micro - {0xAA2C, 5, 8, 256, 128, 2048, 0x01113, "MT29F2G08ABD", 0}, - {0xB12C, 4, 16, 128, 128, 2048, 0x01113, "MT29F1G16ABC", 0}, - {0xBA2C, 5, 16, 256, 128, 2048, 0x01113, "MT29F2G16ABD", 0}, - {0xAC2C, 5, 8, 512, 128, 2048, 0x01113, "MT29F4G08ABC", 0}, - {0xBC2C, 5, 16, 512, 128, 2048, 0x44333, "MT29F4G16ABD", 0}, - //samsung - {0xBAEC, 5, 16, 256, 128, 2048, 0x01123, "K522H1GACE", 0}, - {0xBCEC, 5, 16, 512, 128, 2048, 0x01123, "K524G2GACB", 0}, - {0xDAEC, 5, 8, 256, 128, 2048, 0x33222, "K9F2G08U0A", RAMDOM_READ}, - {0xF1EC, 4, 8, 128, 128, 2048, 0x01123, "K9F1G08U0A", RAMDOM_READ}, - {0xAAEC, 5, 8, 256, 128, 2048, 0x01123, "K9F2G08R0A", 0}, - //hynix - {0xD3AD, 5, 8, 1024, 256, 2048, 0x44333, "HY27UT088G2A", 0}, - {0xA1AD, 4, 8, 128, 128, 2048, 0x01123, "H8BCSOPJOMCP", 0}, - {0xBCAD, 5, 16, 512, 128, 2048, 0x01123, "H8BCSOUNOMCR", 0}, - {0xBAAD, 5, 16, 256, 128, 2048, 0x01123, "H8BCSOSNOMCR", 0}, - //toshiba - {0x9598, 5, 16, 816, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0x9498, 5, 16, 375, 128, 2048, 0x00113, "TY9C000000CMG", 0}, - {0xC198, 4, 16, 128, 128, 2048, 0x44333, "TC58NWGOS8C", 0}, - {0xBA98, 5, 16, 256, 128, 2048, 0x02113, "TC58NYG1S8C", 0}, - //st-micro - {0xBA20, 5, 16, 256, 128, 2048, 0x01123, "ND02CGR4B2DI6", 0}, - - // elpida - {0xBC20, 5, 16, 512, 128, 2048, 0x01123, "04GR4B2DDI6", 0}, - {0x0000, 0, 0, 0, 0, 0, 0, "xxxxxxxxxxxxx", 0} -}; -#endif - - -#define NFI_DEFAULT_ACCESS_TIMING (0x44333) - -//uboot only support 1 cs -#define NFI_CS_NUM (2) -#define NFI_DEFAULT_CS (0) - -#define USE_AHB_MODE (1) - -#define PLATFORM_EVB (1) - -#endif /* __ARCH_ARM_MACH_MT6575_CUSTOM_BOARD_H */ - diff --git a/arch/arm/mach-mt8127/ttab/core/board.c b/arch/arm/mach-mt8127/ttab/core/board.c deleted file mode 100644 index f4e384398c6..00000000000 --- a/arch/arm/mach-mt8127/ttab/core/board.c +++ /dev/null @@ -1,845 +0,0 @@ -/* system header files */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// Fix-me: marked for early porting -#include -#include -#include -#include "board-custom.h" -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) -#include - -#endif - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - -static sdio_irq_handler_t mtk_wcn_cmb_sdio_eirq_handler = NULL; -int mtk_wcn_sdio_irq_flag_set (int falg); -static atomic_t sdio_irq_enable_flag; -static pm_callback_t mtk_wcn_cmb_sdio_pm_cb = NULL; -static void *mtk_wcn_cmb_sdio_pm_data = NULL; -static void *mtk_wcn_cmb_sdio_eirq_data = NULL; -//static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -//static int mt_wifi_pm_late_cb = 0; - -const static u32 mtk_wcn_cmb_sdio_eint_pin = GPIO_WIFI_EINT_PIN; -const static u32 mtk_wcn_cmb_sdio_eint_num = CUST_EINT_WIFI_NUM; -const static u32 mtk_wcn_cmb_sdio_eint_m_eint = GPIO_WIFI_EINT_PIN_M_EINT; -const static u32 mtk_wcn_cmb_sdio_eint_m_gpio = GPIO_WIFI_EINT_PIN_M_GPIO; - - - #if (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - static unsigned char combo_port_pwr_map[4] = {0x0, 0xFF, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0x0, 0xFF, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0x0, 0xFF}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #elif (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - static unsigned char combo_port_pwr_map[4] = {0xFF, 0xFF, 0xFF, 0x0}; - /* - index: port number of combo chip (1:SDIO1, 2:SDIO2, no SDIO0) - value: slot power status of (0:off, 1:on, 0xFF:invalid) - */ - - #else - #error "unsupported CONFIG_MTK_WCN_CMB_SDIO_SLOT" CONFIG_MTK_WCN_CMB_SDIO_SLOT - #endif - -#else -#if 0 -static sdio_irq_handler_t mt_wifi_irq_handler = NULL; -static pm_message_t mt_wifi_pm_state = { .event = PM_EVENT_HIBERNATE }; -static pm_callback_t mt_wifi_pm_cb = NULL; -static void *mt_wifi_pm_data = NULL; -static void *mt_wifi_irq_data = NULL; -static int mt_wifi_pm_late_cb = 0; -#endif -/* temp solution to avoid compile error */ - -#ifndef CUST_EINT_WIFI_NUM -#define CUST_EINT_WIFI_NUM 0 -#endif - -#ifndef CUST_EINT_WIFI_TYPE -#define CUST_EINT_WIFI_TYPE 0 -#endif - -#endif -/*=======================================================================*/ -/* Board Specific Devices Power Management */ -/*=======================================================================*/ -extern kal_bool pmic_chrdet_status(void); -extern U32 pmic_config_interface (U32 RegNum, U32 val, U32 MASK, U32 SHIFT); -extern U32 pmic_read_interface (U32 RegNum, U32 *val, U32 MASK, U32 SHIFT); - -void mt_power_off(void) -{ -#ifdef CONFIG_MTK_PMIC_MT6397 - int ret_val=0; - int reg_val=0; -#endif - - printk("mt_power_off\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - //Enable CA15 by default for different PMIC behavior - pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT); - pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT); - udelay(200); - - ret_val=pmic_read_interface(VCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val); - ret_val=pmic_read_interface(VSRMCA15_CON7, ®_val, 0xFFFF, 0); - printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val); -#endif - /* pull PWRBB low */ - rtc_bbpu_power_down(); - - while (1) { -#if defined(CONFIG_POWER_EXT) - //EVB - printk("EVB without charger\n"); -#else - //Phone - printk("Phone with charger\n"); - if (pmic_chrdet_status() == KAL_TRUE) - arch_reset(0, "power_off_with_charger"); -#endif - } -} - -/*=======================================================================*/ -/* Board Specific Devices */ -/*=======================================================================*/ -/*GPS driver*/ -/*FIXME: remove mt3326 notation */ -struct mt3326_gps_hardware mt3326_gps_hw = { - .ext_power_on = NULL, - .ext_power_off = NULL, -}; - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ -#ifdef MTK_BT_SUPPORT -void mt_bt_power_on(void) -{ - printk(KERN_INFO "+mt_bt_power_on\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_on\n"); -} -EXPORT_SYMBOL(mt_bt_power_on); - -void mt_bt_power_off(void) -{ - printk(KERN_INFO "+mt_bt_power_off\n"); - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product */ - /* - * Ignore rfkill0/state call. Controll BT power on/off through device /dev/stpbt. - */ -#else - /* standalone product */ -#endif - - printk(KERN_INFO "-mt_bt_power_off\n"); -} -EXPORT_SYMBOL(mt_bt_power_off); - -int mt_bt_suspend(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_suspend\n"); - printk(KERN_INFO "-mt_bt_suspend\n"); - return MT_BT_OK; -} - -int mt_bt_resume(pm_message_t state) -{ - printk(KERN_INFO "+mt_bt_resume\n"); - printk(KERN_INFO "-mt_bt_resume\n"); - return MT_BT_OK; -} -#endif - - - -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -static void mtk_wcn_cmb_sdio_enable_eirq(void) - { - mt_eint_unmask(mtk_wcn_cmb_sdio_eint_num);/* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_disable_eirq(void) - { - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num); /* CUST_EINT_WIFI_NUM */ - } - -static void mtk_wcn_cmb_sdio_eirq_handler_stub(void) - { - if ((NULL != mtk_wcn_cmb_sdio_eirq_handler) && (0 != atomic_read(&sdio_irq_enable_flag))) { - mtk_wcn_cmb_sdio_eirq_handler(mtk_wcn_cmb_sdio_eirq_data); - } - } - -static void mtk_wcn_cmb_sdio_request_eirq(sdio_irq_handler_t irq_handler, void *data) - { - mtk_wcn_sdio_irq_flag_set (0); - mtk_wcn_cmb_sdio_eirq_data = data; - mtk_wcn_cmb_sdio_eirq_handler = irq_handler; - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(mtk_wcn_cmb_sdio_eint_num, CUST_EINT_WIFI_DEBOUNCE_CN); /*CUST_EINT_WIFI_NUM */ - #endif - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_eint_registration(mtk_wcn_cmb_sdio_eint_num/*CUST_EINT_WIFI_NUM */, - CUST_EINT_WIFI_TYPE, - mtk_wcn_cmb_sdio_eirq_handler_stub, - 0); - mt_eint_mask(mtk_wcn_cmb_sdio_eint_num);/*CUST_EINT_WIFI_NUM */ - - } - -static void mtk_wcn_cmb_sdio_register_pm(pm_callback_t pm_cb, void *data) - { - printk( KERN_INFO "mtk_wcn_cmb_sdio_register_pm (0x%p, 0x%p)\n", pm_cb, data); - /* register pm change callback */ - mtk_wcn_cmb_sdio_pm_cb = pm_cb; - mtk_wcn_cmb_sdio_pm_data = data; - } - -static void mtk_wcn_cmb_sdio_on (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_on (%d) \n", sdio_port_num); - - /* 1. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_DISABLE); /* GPIO_WIFI_EINT_PIN */ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_eint); /* EINT mode */ - - /* 2. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_pm_cb(PM_EVENT_USER_RESUME, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_on no sd callback!!\n"); - } -} - -static void mtk_wcn_cmb_sdio_off (int sdio_port_num) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - printk(KERN_INFO "mtk_wcn_cmb_sdio_off (%d) \n", sdio_port_num); - - /* 1. call sd callback */ - if (mtk_wcn_cmb_sdio_pm_cb) { - //printk(KERN_INFO "mtk_wcn_cmb_sdio_off(PM_EVENT_USER_SUSPEND, 0x%p, 0x%p) \n", mtk_wcn_cmb_sdio_pm_cb, mtk_wcn_cmb_sdio_pm_data); - mtk_wcn_cmb_sdio_pm_cb(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "mtk_wcn_cmb_sdio_off no sd callback!!\n"); - } - - /* 2. disable sdio eirq */ - mtk_wcn_cmb_sdio_disable_eirq(); - /*printk(KERN_INFO "[mt6620] set WIFI_EINT input pull down\n");*/ - mt_set_gpio_mode(mtk_wcn_cmb_sdio_eint_pin, mtk_wcn_cmb_sdio_eint_m_gpio); /* GPIO mode */ - mt_set_gpio_dir(mtk_wcn_cmb_sdio_eint_pin, GPIO_DIR_IN); - mt_set_gpio_pull_select(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_UP); - mt_set_gpio_pull_enable(mtk_wcn_cmb_sdio_eint_pin, GPIO_PULL_ENABLE); -} - -int board_sdio_ctrl (unsigned int sdio_port_num, unsigned int on) { -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - sdio_port_num = CONFIG_MTK_WCN_CMB_SDIO_SLOT; - printk(KERN_WARNING "mt_combo_sdio_ctrl: force set sdio port to (%d)\n", sdio_port_num); -#endif - if ((sdio_port_num >= 4) || (combo_port_pwr_map[sdio_port_num] == 0xFF) ) { - /* invalid sdio port number or slot mapping */ - printk(KERN_WARNING "mt_mtk_wcn_cmb_sdio_ctrl invalid port(%d, %d)\n", sdio_port_num, combo_port_pwr_map[sdio_port_num]); - return -1; - } - /*printk(KERN_INFO "mt_mtk_wcn_cmb_sdio_ctrl (%d, %d)\n", sdio_port_num, on);*/ - - if (!combo_port_pwr_map[sdio_port_num] && on) { - printk(KERN_INFO "board_sdio_ctrl force off before on\n"); - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - /* off -> on */ - mtk_wcn_cmb_sdio_on(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 1; - } - else if (combo_port_pwr_map[sdio_port_num] && !on) { - /* on -> off */ - mtk_wcn_cmb_sdio_off(sdio_port_num); - combo_port_pwr_map[sdio_port_num] = 0; - } - else { - return -2; - } - return 0; -} -EXPORT_SYMBOL(board_sdio_ctrl); -int mtk_wcn_sdio_irq_flag_set (int flag) -{ - - if (0 != flag) - { - atomic_set(&sdio_irq_enable_flag, 1); - } - else - { - atomic_set(&sdio_irq_enable_flag, 0); - } - printk(KERN_INFO "sdio_irq_enable_flag:%d\n", atomic_read(&sdio_irq_enable_flag)); - - return atomic_read(&sdio_irq_enable_flag); -} -EXPORT_SYMBOL(mtk_wcn_sdio_irq_flag_set); - -#endif -#if defined(CONFIG_WLAN) -#if !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) -#if 0 -static void mt_wifi_enable_irq(void) -{ - mt_eint_unmask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_disable_irq(void) -{ - mt_eint_mask(CUST_EINT_WIFI_NUM); -} - -static void mt_wifi_eirq_handler(void) -{ - if (mt_wifi_irq_handler) { - mt_wifi_irq_handler(mt_wifi_irq_data); - } -} - -static void mt_wifi_request_irq(sdio_irq_handler_t irq_handler, void *data) -{ - #if CUST_EINT_WIFI_SENSITIVE - mt_eint_set_sens(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_SENSITIVE); - #endif - - #if CUST_EINT_WIFI_DEBOUNCE_EN - mt_eint_set_hw_debounce(CUST_EINT_WIFI_NUM, CUST_EINT_WIFI_DEBOUNCE_CN); - #endif - mt_eint_registration(CUST_EINT_WIFI_NUM, - CUST_EINT_WIFI_TYPE, - mt_wifi_eirq_handler, - 0); - mt_eint_mask(CUST_EINT_WIFI_NUM); - - mt_wifi_irq_handler = irq_handler; - mt_wifi_irq_data = data; -} - -static void mt_wifi_register_pm(pm_callback_t pm_cb, void *data) -{ - /* register pm change callback */ - mt_wifi_pm_cb = pm_cb; - mt_wifi_pm_data = data; -} -#endif - -#endif /* end of !defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) */ - -int mt_wifi_resume(pm_message_t state) -{ - int evt = state.event; - - if (evt != PM_EVENT_USER_RESUME && evt != PM_EVENT_RESUME) { - return -1; - } - - /*printk(KERN_INFO "[WIFI] %s Resume\n", evt == PM_EVENT_RESUME ? "PM":"USR");*/ - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - - -#endif - - return 0; -} - -int mt_wifi_suspend(pm_message_t state) -{ - int evt = state.event; -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - static int is_1st_suspend_from_boot = 1; -#endif - - if (evt != PM_EVENT_USER_SUSPEND && evt != PM_EVENT_SUSPEND) { - return -1; - } - -#if defined(CONFIG_MTK_COMBO) || defined(CONFIG_MTK_COMBO_MODULE) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) - /* combo chip product: notify combo driver to turn on Wi-Fi */ - if (is_1st_suspend_from_boot) { - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - if (mtk_wcn_cmb_sdio_pm_cb) { - is_1st_suspend_from_boot = 0; - /* *** IMPORTANT DEPENDENDY*** - RFKILL: set wifi and bt suspend by default in probe() - MT6573-SD: sd host is added to MMC stack and suspend is ZERO by default - (which means NOT suspended). - - When boot up, RFKILL will set wifi off and this function gets - called. In order to successfully resume wifi at 1st time, pm_cb here - shall be called once to let MT6573-SD do sd host suspend and remove - sd host from MMC. Then wifi can be turned on successfully. - - Boot->SD host added to MMC (suspend=0)->RFKILL set wifi off - ->SD host removed from MMC (suspend=1)->RFKILL set wifi on - */ - printk(KERN_INFO "1st mt_wifi_suspend (PM_EVENT_USER_SUSPEND) \n"); - (*mtk_wcn_cmb_sdio_pm_cb)(state, mtk_wcn_cmb_sdio_pm_data); - } - else { - printk(KERN_WARNING "1st mt_wifi_suspend but no sd callback!!\n"); - } - } - else { - /* combo chip product, notify combo driver */ - } - #endif - -#else -#endif - return 0; -} - -void mt_wifi_power_on(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_RESUME }; - - (void)mt_wifi_resume(state); -} -EXPORT_SYMBOL(mt_wifi_power_on); - -void mt_wifi_power_off(void) -{ - pm_message_t state = { .event = PM_EVENT_USER_SUSPEND }; - - (void)mt_wifi_suspend(state); -} -EXPORT_SYMBOL(mt_wifi_power_off); - -#endif /* end of defined(CONFIG_WLAN) */ - -/* Board Specific Devices */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Specific Devices Init */ -/*=======================================================================*/ - -/*=======================================================================*/ -/* Board Devices Capability */ -/*=======================================================================*/ -#define MSDC_SDCARD_FLAG (MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED) -#define MSDC_SDIO_FLAG (MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED) - -#if defined(CFG_DEV_MSDC0) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 0) - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc0_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 2, - .dat_drv = 2, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 | MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif -#if defined(CFG_DEV_MSDC1) -#if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 1) -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 3, - .dat_drv = 3, - .clk_drv_sd_18 = 4, /* sdr104 mode */ - .cmd_drv_sd_18 = 4, - .dat_drv_sd_18 = 4, - .clk_drv_sd_18_sdr50 = 4, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 4, - .dat_drv_sd_18_sdr50 = 4, - .clk_drv_sd_18_ddr50 = 4, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 4, - .dat_drv_sd_18_ddr50 = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDIO_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; - - -#else - -struct msdc_hw msdc1_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 6, - .cmd_drv = 6, - .dat_drv = 6, - .clk_drv_sd_18 = 3, /* sdr104 mode */ - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 2, - .clk_drv_sd_18_sdr50 = 3, /* sdr50 mode */ - .cmd_drv_sd_18_sdr50 = 3, - .dat_drv_sd_18_sdr50 = 2, - .clk_drv_sd_18_ddr50 = 3, /* ddr50 mode */ - .cmd_drv_sd_18_ddr50 = 3, - .dat_drv_sd_18_ddr50 = 2, - .data_pins = 4, - .data_offset = 0, -#ifdef CUST_EINT_MSDC1_INS_NUM - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, //|MSDC_SD_NEED_POWER, - //[BUGFIX]Added-by SZTCT.leo.guo 05.25.2015, Fixed TF card power control issue. -#else - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, -#endif - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif -#endif -#if defined(CFG_DEV_MSDC2) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 2) - /* MSDC2 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - -#if 0 -struct msdc_hw msdc2_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 3, - .cmd_drv = 2, - .dat_drv = 2, - .clk_drv_sd_18 = 4, - .cmd_drv_sd_18 = 3, - .dat_drv_sd_18 = 3, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SD, - .boot = 0, - .cd_level = MSDC_CD_LOW, -}; -#endif - #endif -#endif -#if defined(CFG_DEV_MSDC3) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 3) - /* MSDC3 settings for MT66xx combo connectivity chip */ - struct msdc_hw msdc3_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #if 0 - - struct msdc_hw msdc3_hw = { - .clk_src = 1, - .cmd_edge = MSDC_SMPL_FALLING, - .data_edge = MSDC_SMPL_FALLING, - .clk_drv = 4, - .cmd_drv = 4, - .dat_drv = 4, - .data_pins = 4, - .data_offset = 0, - .flags = MSDC_SDCARD_FLAG, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - }; - #endif - #endif -#endif -#if defined(CFG_DEV_MSDC4) - #if defined(CONFIG_MTK_WCN_CMB_SDIO_SLOT) && (CONFIG_MTK_WCN_CMB_SDIO_SLOT == 4) - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 0, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 4, - .data_offset = 0, - //MT6620 use External IRQ, wifi uses high speed. here wifi manage his own suspend and resume, does not support hot plug - .flags = MSDC_SDIO_FLAG,//MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,(this flag is for SD card) - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_SDIO, - .boot = 0, - .request_sdio_eirq = mtk_wcn_cmb_sdio_request_eirq, - .enable_sdio_eirq = mtk_wcn_cmb_sdio_enable_eirq, - .disable_sdio_eirq = mtk_wcn_cmb_sdio_disable_eirq, - .register_pm = mtk_wcn_cmb_sdio_register_pm, - }; - #else - struct msdc_hw msdc4_hw = { - .clk_src = MSDC_CLKSRC_200MHZ, - .cmd_edge = MSDC_SMPL_FALLING, - .rdata_edge = MSDC_SMPL_FALLING, - .wdata_edge = MSDC_SMPL_FALLING, - .clk_drv = 1, - .cmd_drv = 0, - .dat_drv = 0, - .data_pins = 8, - .data_offset = 0, - .flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED | MSDC_UHS1 |MSDC_DDR, - .dat0rddly = 0, - .dat1rddly = 0, - .dat2rddly = 0, - .dat3rddly = 0, - .dat4rddly = 0, - .dat5rddly = 0, - .dat6rddly = 0, - .dat7rddly = 0, - .datwrddly = 0, - .cmdrrddly = 0, - .cmdrddly = 0, - .host_function = MSDC_EMMC, - .boot = MSDC_BOOT_EN, - }; - #endif -#endif - -/* MT6575 NAND Driver */ -#if defined(CONFIG_MTK_MTD_NAND) -struct mt6575_nand_host_hw mt6575_nand_hw = { - .nfi_bus_width = 8, - .nfi_access_timing = NFI_DEFAULT_ACCESS_TIMING, - .nfi_cs_num = NFI_CS_NUM, - .nand_sec_size = 512, - .nand_sec_shift = 9, - .nand_ecc_size = 2048, - .nand_ecc_bytes = 32, - .nand_ecc_mode = NAND_ECC_HW, -}; -#endif diff --git a/arch/arm/mach-mt8127/ttab/core/logger_custom.h b/arch/arm/mach-mt8127/ttab/core/logger_custom.h deleted file mode 100644 index 7ffb8dfeeee..00000000000 --- a/arch/arm/mach-mt8127/ttab/core/logger_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LOGGER_CUSTOM_H -#define __LOGGER_CUSTOM_H - -#include - -#define __MAIN_BUF_SIZE 64*1024 -#define __EVENTS_BUF_SIZE 256*1024 -#define __RADIO_BUF_SIZE 64*1024 -#define __SYSTEM_BUF_SIZE 64*1024 - -#endif /* __LOGGER_CUSTOM_H */ - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/Makefile b/arch/arm/mach-mt8127/ttab/dct/dct/Makefile deleted file mode 100755 index 1ec48f355e7..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := pmic_drv.o - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/codegen.dws b/arch/arm/mach-mt8127/ttab/dct/dct/codegen.dws deleted file mode 100644 index 4fa177d5220e74f0d2cdf90c2a32d4222b9e1521..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23537 zcmeHP$#Ua15LNcQD*N&Yx!IbkWUe$x+boNuilpr1#Q(`9pPb+|^oS+|NVa8p#xp<_ z(T!eSHyYrgwJy5b4;G8Xx90fF9QE+}eEH|%U&BI-M*3f%L9fLa>n6UT&KNy4F5>E3 zLVPGD{2+(@4~AZ?t9D%1RX&zgGmPu1v8j5~P+p-(Mm@_0W8FM7H#A1f=BaQIR|2R6 zG&aSwA*CGj7jsBu@~keqY|QI*(VT~>18X1Q_-I`}1fwAm4@B0H$V1MINFihU*)TG< zY*UQ+>SnClz6wo^fiwt%kWxom1|gjVE3#p%tKRIl@GkQ~7=#p{v|(Td0^JR^XJ&8! z2*G{o>tL^&BoOEz@_jWnFvLw!$k+mqvq@_#&BOl`xce{>^G9>Yc4{v3vF*)uq=~IB z%n1h`>4TzyhYpkta&0essPpW!KX~9!#xZ1UAxOq0r7bCNp!0FHz3`#V_-Q+0f-*lJ zSKCA&qnO$kd@MF@i?Wp0*=jWgFFuLxd`nS4MOJ_^@GrE zKA&YM%;&~dm--<*!oXg_dmVH-E!aVZrg@CD9mZ_anbmJDMsp(?t0FW7m;-WOBc!&0 z451#!F+fFxT{W$g5wO{}}3CM6jHeFt@=COxbWTyc_{GmY8`FYis=4$zDp_b85 zECWk{S?QUAN7Hsz;`-@D!OglDZ@TvGEVfXrkMngkrHnSDl!NZ>ialp&2!M-5P}-1E z4mw?R+Tm(6F9UBcHhpMf@Z~{#O@T#x+G!d1c?t7&6)YjWL3IT38kM$M27V_}@TUEt zu>=AdDWiaDIrUlwe!3E&epOLaS9^D%@2ZFFieYQNUcwO1rPDetDP+?fw3b&Kr@VtsPX*bkk6yX3y>zZ29yVxNhcV^_natVi z(w?z<=2Ugyp5hwlwIMG{vRx<5W9`tU4N@)51+g!($2=WO8^8cEDS$H|crQ?XFc6$L z3sT6?7(@rKnr%=~%scuJOVgR}7N0WGIhvgtF+nvRdH9OomXe2@O=N)%A{@lh6u#oJ zrQ{)J6Iq~x2#3Za4`1rZgX$K5oaI6+P2umy)R@#;pm_x5qw&ZSgErzx;g-(PTm<^S zjCiDw5lh=a&X#a(CEipWxK^4XqsOel}dOrXcz zQ7|)R52|_022EsvPTT7Wk=Iz7x2VVA`gj}zdwRayWZf`sy1$Cx>tnd^fE&}+6mmk7 zLdNEW8jc91Q(-7lgcCl{K}0*9I{C?0*+Iq@fD{!mF(4M{%-0OGEp^`*M&86+4he8U*C1+)2-)9|5Rm3xM~HrTZG%fr`Q5ohOut4WkQ`X zf>`@%9vJ=@GPV$;$c#b4wN*-Wcv*Ew*ByJ^Np-Mw;HMHek7MUDk{s} zQD3aGzDI(8iv4gZTtC;R%J->oF>lt7yvBwM4K_SPpt|1-Z@*7rzZZGA%KGcbH@@IT z98w*RGEG$|VW;nJT&??Y)f{}Qlr`6J07N->#6yG3a$A`w<{fjRosUZ_-;VZkG#gs` zXgtls-yahb^nJnAH2{yflO9utw;h-B^z-DHdQi0c?g!WsBSfhOMN7EvR~;~0y)W$S zUH>lc2Y>E<9WZ7k?pp_q5#n`B@CjFa8_6riF|V6gdk<2Ezni)riygvEn5_E4X{er% z9YPA(;Jkug!bBxp71I7Zw4363S4GFAddBN@NaL#LxKz(WRg3Fg6&;uA8L!tNjjN*L zQaukx6sT0OHm?a>?_hW|0gN9Jg9jAjjg50S}_A?2AF;c(!?rLBi#V1{fFAc~E70EEt@ z3R_!$Z1m=f>tY2tKjZq^@I$-Fug7)Pl&c**YAC->6Ait9K+SST^QDnYzY3XhW>ii` z++6nt#F&BnZa}hNwLsrMGFXUu_~X^`mHe5;v{&Aqvavv3aULd?Qs1k>#0B+2-XDaP zppOGVc-0;Uq5!}~K)x`l{JIBp#p2A4?0+;Z&hRFc+U(|y#(g7L?@t?VLL&l>+jh07%guW6)ifyD zyJqo;88&TGK9T|Skr2D?3G{ugDfYE}tABxavi*ir0&k$=AIFN-cvJp;KHuPT<f$|7Nau z`y6tdot_GIP{~>9LCPGgTS!gURe3qMNdNHYpAM!;?fmLOG&9k;LRDtE5HKTKl}Y@-2{4g)6=WVwzOFYW*LnLNi{zDA diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_adc.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_adc.h deleted file mode 100644 index 9fafc11dbf3..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_adc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#ifndef __CUST_AUXADC_TOOL_H -#define __CUST_AUXADC_TOOL_H - - - - -#endif //_CUST_AUXADC_TOOL_H - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint.h deleted file mode 100644 index f52ee51c02f..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#ifndef __CUST_EINTH -#define __CUST_EINTH - -#ifdef __cplusplus -extern "C" { -#endif - -#define CUST_EINTF_TRIGGER_RISING 1 //High Polarity and Edge Sensitive -#define CUST_EINTF_TRIGGER_FALLING 2 //Low Polarity and Edge Sensitive -#define CUST_EINTF_TRIGGER_HIGH 4 //High Polarity and Level Sensitive -#define CUST_EINTF_TRIGGER_LOW 8 //Low Polarity and Level Sensitive - -#define CUST_EINT_DEBOUNCE_DISABLE 0 -#define CUST_EINT_DEBOUNCE_ENABLE 1 - -////////////////////////////////////////////////////////////////////////////// - - -#define CUST_EINT_ACCDET_NUM 1 -#define CUST_EINT_ACCDET_DEBOUNCE_CN 256 -#define CUST_EINT_ACCDET_TYPE CUST_EINTF_TRIGGER_LOW -#define CUST_EINT_ACCDET_DEBOUNCE_EN CUST_EINT_DEBOUNCE_ENABLE - -#define CUST_EINT_ALS_NUM 7 -#define CUST_EINT_ALS_DEBOUNCE_CN 0 -#define CUST_EINT_ALS_TYPE CUST_EINTF_TRIGGER_FALLING -#define CUST_EINT_ALS_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE - -#define CUST_EINT_TOUCH_PANEL_NUM 8 -#define CUST_EINT_TOUCH_PANEL_DEBOUNCE_CN 0 -#define CUST_EINT_TOUCH_PANEL_TYPE CUST_EINTF_TRIGGER_FALLING -#define CUST_EINT_TOUCH_PANEL_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE - -#define CUST_EINT_GSE_1_NUM 9 -#define CUST_EINT_GSE_1_DEBOUNCE_CN 0 -#define CUST_EINT_GSE_1_TYPE CUST_EINTF_TRIGGER_HIGH -#define CUST_EINT_GSE_1_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE - -#define CUST_EINT_GSE_2_NUM 10 -#define CUST_EINT_GSE_2_DEBOUNCE_CN 0 -#define CUST_EINT_GSE_2_TYPE CUST_EINTF_TRIGGER_HIGH -#define CUST_EINT_GSE_2_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE - -#define CUST_EINT_MSDC1_INS_NUM 11 -#define CUST_EINT_MSDC1_INS_DEBOUNCE_CN 1 -#define CUST_EINT_MSDC1_INS_TYPE CUST_EINTF_TRIGGER_LOW -#define CUST_EINT_MSDC1_INS_DEBOUNCE_EN CUST_EINT_DEBOUNCE_ENABLE - -#define CUST_EINT_MHALL_NUM 18 -#define CUST_EINT_MHALL_DEBOUNCE_CN 0 -#define CUST_EINT_MHALL_TYPE CUST_EINTF_TRIGGER_LOW -#define CUST_EINT_MHALL_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE - -#define CUST_EINT_MT6323_PMIC_NUM 24 -#define CUST_EINT_MT6323_PMIC_DEBOUNCE_CN 1 -#define CUST_EINT_MT6323_PMIC_TYPE CUST_EINTF_TRIGGER_HIGH -#define CUST_EINT_MT6323_PMIC_DEBOUNCE_EN CUST_EINT_DEBOUNCE_ENABLE - -#define CUST_EINT_CHR_STAT_NUM 46 -#define CUST_EINT_CHR_STAT_DEBOUNCE_CN 0 -#define CUST_EINT_CHR_STAT_TYPE CUST_EINTF_TRIGGER_LOW -#define CUST_EINT_CHR_STAT_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE - - - -////////////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -} - -#endif -#endif //_CUST_EINT_H - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint_ext.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint_ext.h deleted file mode 100644 index ca1628f2e7a..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_eint_ext.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Generated by MTK SP DrvGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#ifndef __CUST_EINTH -#define __CUST_EINTH - -#ifdef __cplusplus -extern "C" { -#endif - -#define CUST_EINTF_TRIGGER_RISING 1 //High Polarity and Edge Sensitive -#define CUST_EINTF_TRIGGER_FALLING 2 //Low Polarity and Edge Sensitive -#define CUST_EINTF_TRIGGER_HIGH 4 //High Polarity and Level Sensitive -#define CUST_EINTF_TRIGGER_LOW 8 //Low Polarity and Level Sensitive - -#define CUST_EINT_DEBOUNCE_DISABLE 0 -#define CUST_EINT_DEBOUNCE_ENABLE 1 - -////////////////////////////////////////////////////////////////////////////// - - - - -////////////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -} - -#endif -#endif //_CUST_EINT__EXT_H - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_boot.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_boot.h deleted file mode 100644 index badc64696f0..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_boot.h +++ /dev/null @@ -1,1348 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#ifndef __CUST_GPIO_BOOT_H__ -#define __CUST_GPIO_BOOT_H__ - - -//Configuration for GPIO SMT(Schmidt Trigger) Group output start -//Configuration for GPIO SMT(Schmidt Trigger) Group output end -//Configureation for Pin 0 -#define GPIO0_MODE GPIO_MODE_01 -#define GPIO0_DIR GPIO_DIR_IN -#define GPIO0_PULLEN GPIO_PULL_DISABLE -#define GPIO0_PULL GPIO_PULL_DOWN -#define GPIO0_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 1 -#define GPIO1_MODE GPIO_MODE_01 -#define GPIO1_DIR GPIO_DIR_IN -#define GPIO1_PULLEN GPIO_PULL_DISABLE -#define GPIO1_PULL GPIO_PULL_DOWN -#define GPIO1_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 2 -#define GPIO2_MODE GPIO_MODE_00 -#define GPIO2_DIR GPIO_DIR_IN -#define GPIO2_PULLEN GPIO_PULL_ENABLE -#define GPIO2_PULL GPIO_PULL_DOWN -#define GPIO2_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 3 -#define GPIO3_MODE GPIO_MODE_01 -#define GPIO3_DIR GPIO_DIR_IN -#define GPIO3_PULLEN GPIO_PULL_DISABLE -#define GPIO3_PULL GPIO_PULL_DOWN -#define GPIO3_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 4 -#define GPIO4_MODE GPIO_MODE_01 -#define GPIO4_DIR GPIO_DIR_IN -#define GPIO4_PULLEN GPIO_PULL_DISABLE -#define GPIO4_PULL GPIO_PULL_DOWN -#define GPIO4_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 5 -#define GPIO5_MODE GPIO_MODE_00 -#define GPIO5_DIR GPIO_DIR_OUT -#define GPIO5_PULLEN GPIO_PULL_DISABLE -#define GPIO5_PULL GPIO_PULL_DOWN -#define GPIO5_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 6 -#define GPIO6_MODE GPIO_MODE_00 -#define GPIO6_DIR GPIO_DIR_OUT -#define GPIO6_PULLEN GPIO_PULL_DISABLE -#define GPIO6_PULL GPIO_PULL_DOWN -#define GPIO6_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 7 -#define GPIO7_MODE GPIO_MODE_01 -#define GPIO7_DIR GPIO_DIR_OUT -#define GPIO7_PULLEN GPIO_PULL_DISABLE -#define GPIO7_PULL GPIO_PULL_DOWN -#define GPIO7_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 8 -#define GPIO8_MODE GPIO_MODE_01 -#define GPIO8_DIR GPIO_DIR_IN -#define GPIO8_PULLEN GPIO_PULL_ENABLE -#define GPIO8_PULL GPIO_PULL_DOWN -#define GPIO8_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 9 -#define GPIO9_MODE GPIO_MODE_01 -#define GPIO9_DIR GPIO_DIR_OUT -#define GPIO9_PULLEN GPIO_PULL_DISABLE -#define GPIO9_PULL GPIO_PULL_DOWN -#define GPIO9_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 10 -#define GPIO10_MODE GPIO_MODE_01 -#define GPIO10_DIR GPIO_DIR_IN -#define GPIO10_PULLEN GPIO_PULL_ENABLE -#define GPIO10_PULL GPIO_PULL_DOWN -#define GPIO10_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 11 -#define GPIO11_MODE GPIO_MODE_01 -#define GPIO11_DIR GPIO_DIR_OUT -#define GPIO11_PULLEN GPIO_PULL_DISABLE -#define GPIO11_PULL GPIO_PULL_DOWN -#define GPIO11_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 12 -#define GPIO12_MODE GPIO_MODE_01 -#define GPIO12_DIR GPIO_DIR_OUT -#define GPIO12_PULLEN GPIO_PULL_DISABLE -#define GPIO12_PULL GPIO_PULL_DOWN -#define GPIO12_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 13 -#define GPIO13_MODE GPIO_MODE_01 -#define GPIO13_DIR GPIO_DIR_IN -#define GPIO13_PULLEN GPIO_PULL_ENABLE -#define GPIO13_PULL GPIO_PULL_DOWN -#define GPIO13_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 14 -#define GPIO14_MODE GPIO_MODE_01 -#define GPIO14_DIR GPIO_DIR_IN -#define GPIO14_PULLEN GPIO_PULL_ENABLE -#define GPIO14_PULL GPIO_PULL_UP -#define GPIO14_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 15 -#define GPIO15_MODE GPIO_MODE_01 -#define GPIO15_DIR GPIO_DIR_IN -#define GPIO15_PULLEN GPIO_PULL_DISABLE -#define GPIO15_PULL GPIO_PULL_DOWN -#define GPIO15_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 16 -#define GPIO16_MODE GPIO_MODE_01 -#define GPIO16_DIR GPIO_DIR_IN -#define GPIO16_PULLEN GPIO_PULL_ENABLE -#define GPIO16_PULL GPIO_PULL_UP -#define GPIO16_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 17 -#define GPIO17_MODE GPIO_MODE_01 -#define GPIO17_DIR GPIO_DIR_IN -#define GPIO17_PULLEN GPIO_PULL_DISABLE -#define GPIO17_PULL GPIO_PULL_DOWN -#define GPIO17_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 18 -#define GPIO18_MODE GPIO_MODE_00 -#define GPIO18_DIR GPIO_DIR_IN -#define GPIO18_PULLEN GPIO_PULL_DISABLE -#define GPIO18_PULL GPIO_PULL_DOWN -#define GPIO18_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 19 -#define GPIO19_MODE GPIO_MODE_00 -#define GPIO19_DIR GPIO_DIR_OUT -#define GPIO19_PULLEN GPIO_PULL_DISABLE -#define GPIO19_PULL GPIO_PULL_DOWN -#define GPIO19_DATAOUT GPIO_OUT_ONE - -//Configureation for Pin 20 -#define GPIO20_MODE GPIO_MODE_00 -#define GPIO20_DIR GPIO_DIR_IN -#define GPIO20_PULLEN GPIO_PULL_DISABLE -#define GPIO20_PULL GPIO_PULL_DOWN -#define GPIO20_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 21 -#define GPIO21_MODE GPIO_MODE_00 -#define GPIO21_DIR GPIO_DIR_IN -#define GPIO21_PULLEN GPIO_PULL_ENABLE -#define GPIO21_PULL GPIO_PULL_DOWN -#define GPIO21_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 22 -#define GPIO22_MODE GPIO_MODE_00 -#define GPIO22_DIR GPIO_DIR_IN -#define GPIO22_PULLEN GPIO_PULL_DISABLE -#define GPIO22_PULL GPIO_PULL_DOWN -#define GPIO22_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 23 -#define GPIO23_MODE GPIO_MODE_00 -#define GPIO23_DIR GPIO_DIR_IN -#define GPIO23_PULLEN GPIO_PULL_DISABLE -#define GPIO23_PULL GPIO_PULL_DOWN -#define GPIO23_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 24 -#define GPIO24_MODE GPIO_MODE_00 -#define GPIO24_DIR GPIO_DIR_IN -#define GPIO24_PULLEN GPIO_PULL_DISABLE -#define GPIO24_PULL GPIO_PULL_DOWN -#define GPIO24_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 25 -#define GPIO25_MODE GPIO_MODE_00 -#define GPIO25_DIR GPIO_DIR_OUT -#define GPIO25_PULLEN GPIO_PULL_DISABLE -#define GPIO25_PULL GPIO_PULL_UP -#define GPIO25_DATAOUT GPIO_OUT_ONE - -//Configureation for Pin 26 -#define GPIO26_MODE GPIO_MODE_00 -#define GPIO26_DIR GPIO_DIR_IN -#define GPIO26_PULLEN GPIO_PULL_DISABLE -#define GPIO26_PULL GPIO_PULL_DOWN -#define GPIO26_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 27 -#define GPIO27_MODE GPIO_MODE_00 -#define GPIO27_DIR GPIO_DIR_OUT -#define GPIO27_PULLEN GPIO_PULL_DISABLE -#define GPIO27_PULL GPIO_PULL_DOWN -#define GPIO27_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 28 -#define GPIO28_MODE GPIO_MODE_00 -#define GPIO28_DIR GPIO_DIR_IN -#define GPIO28_PULLEN GPIO_PULL_DISABLE -#define GPIO28_PULL GPIO_PULL_DOWN -#define GPIO28_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 29 -#define GPIO29_MODE GPIO_MODE_00 -#define GPIO29_DIR GPIO_DIR_OUT -#define GPIO29_PULLEN GPIO_PULL_DISABLE -#define GPIO29_PULL GPIO_PULL_DOWN -#define GPIO29_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 30 -#define GPIO30_MODE GPIO_MODE_00 -#define GPIO30_DIR GPIO_DIR_IN -#define GPIO30_PULLEN GPIO_PULL_ENABLE -#define GPIO30_PULL GPIO_PULL_UP -#define GPIO30_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 31 -#define GPIO31_MODE GPIO_MODE_00 -#define GPIO31_DIR GPIO_DIR_IN -#define GPIO31_PULLEN GPIO_PULL_ENABLE -#define GPIO31_PULL GPIO_PULL_UP -#define GPIO31_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 32 -#define GPIO32_MODE GPIO_MODE_00 -#define GPIO32_DIR GPIO_DIR_IN -#define GPIO32_PULLEN GPIO_PULL_ENABLE -#define GPIO32_PULL GPIO_PULL_UP -#define GPIO32_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 33 -#define GPIO33_MODE GPIO_MODE_01 -#define GPIO33_DIR GPIO_DIR_OUT -#define GPIO33_PULLEN GPIO_PULL_DISABLE -#define GPIO33_PULL GPIO_PULL_DOWN -#define GPIO33_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 34 -#define GPIO34_MODE GPIO_MODE_00 -#define GPIO34_DIR GPIO_DIR_OUT -#define GPIO34_PULLEN GPIO_PULL_DISABLE -#define GPIO34_PULL GPIO_PULL_DOWN -#define GPIO34_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 35 -#define GPIO35_MODE GPIO_MODE_00 -#define GPIO35_DIR GPIO_DIR_OUT -#define GPIO35_PULLEN GPIO_PULL_DISABLE -#define GPIO35_PULL GPIO_PULL_DOWN -#define GPIO35_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 36 -#define GPIO36_MODE GPIO_MODE_01 -#define GPIO36_DIR GPIO_DIR_IN -#define GPIO36_PULLEN GPIO_PULL_ENABLE -#define GPIO36_PULL GPIO_PULL_UP -#define GPIO36_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 37 -#define GPIO37_MODE GPIO_MODE_01 -#define GPIO37_DIR GPIO_DIR_IN -#define GPIO37_PULLEN GPIO_PULL_ENABLE -#define GPIO37_PULL GPIO_PULL_UP -#define GPIO37_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 38 -#define GPIO38_MODE GPIO_MODE_02 -#define GPIO38_DIR GPIO_DIR_IN -#define GPIO38_PULLEN GPIO_PULL_ENABLE -#define GPIO38_PULL GPIO_PULL_UP -#define GPIO38_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 39 -#define GPIO39_MODE GPIO_MODE_01 -#define GPIO39_DIR GPIO_DIR_IN -#define GPIO39_PULLEN GPIO_PULL_DISABLE -#define GPIO39_PULL GPIO_PULL_DOWN -#define GPIO39_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 40 -#define GPIO40_MODE GPIO_MODE_01 -#define GPIO40_DIR GPIO_DIR_IN -#define GPIO40_PULLEN GPIO_PULL_DISABLE -#define GPIO40_PULL GPIO_PULL_DOWN -#define GPIO40_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 41 -#define GPIO41_MODE GPIO_MODE_01 -#define GPIO41_DIR GPIO_DIR_IN -#define GPIO41_PULLEN GPIO_PULL_DISABLE -#define GPIO41_PULL GPIO_PULL_DOWN -#define GPIO41_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 42 -#define GPIO42_MODE GPIO_MODE_01 -#define GPIO42_DIR GPIO_DIR_IN -#define GPIO42_PULLEN GPIO_PULL_DISABLE -#define GPIO42_PULL GPIO_PULL_DOWN -#define GPIO42_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 43 -#define GPIO43_MODE GPIO_MODE_00 -#define GPIO43_DIR GPIO_DIR_IN -#define GPIO43_PULLEN GPIO_PULL_ENABLE -#define GPIO43_PULL GPIO_PULL_UP -#define GPIO43_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 44 -#define GPIO44_MODE GPIO_MODE_00 -#define GPIO44_DIR GPIO_DIR_IN -#define GPIO44_PULLEN GPIO_PULL_ENABLE -#define GPIO44_PULL GPIO_PULL_UP -#define GPIO44_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 45 -#define GPIO45_MODE GPIO_MODE_00 -#define GPIO45_DIR GPIO_DIR_OUT -#define GPIO45_PULLEN GPIO_PULL_DISABLE -#define GPIO45_PULL GPIO_PULL_DOWN -#define GPIO45_DATAOUT GPIO_OUT_ONE - -//Configureation for Pin 46 -#define GPIO46_MODE GPIO_MODE_00 -#define GPIO46_DIR GPIO_DIR_IN -#define GPIO46_PULLEN GPIO_PULL_ENABLE -#define GPIO46_PULL GPIO_PULL_DOWN -#define GPIO46_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 47 -#define GPIO47_MODE GPIO_MODE_00 -#define GPIO47_DIR GPIO_DIR_IN -#define GPIO47_PULLEN GPIO_PULL_ENABLE -#define GPIO47_PULL GPIO_PULL_DOWN -#define GPIO47_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 48 -#define GPIO48_MODE GPIO_MODE_00 -#define GPIO48_DIR GPIO_DIR_IN -#define GPIO48_PULLEN GPIO_PULL_ENABLE -#define GPIO48_PULL GPIO_PULL_DOWN -#define GPIO48_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 49 -#define GPIO49_MODE GPIO_MODE_00 -#define GPIO49_DIR GPIO_DIR_IN -#define GPIO49_PULLEN GPIO_PULL_ENABLE -#define GPIO49_PULL GPIO_PULL_DOWN -#define GPIO49_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 50 -#define GPIO50_MODE GPIO_MODE_00 -#define GPIO50_DIR GPIO_DIR_IN -#define GPIO50_PULLEN GPIO_PULL_ENABLE -#define GPIO50_PULL GPIO_PULL_UP -#define GPIO50_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 51 -#define GPIO51_MODE GPIO_MODE_00 -#define GPIO51_DIR GPIO_DIR_IN -#define GPIO51_PULLEN GPIO_PULL_ENABLE -#define GPIO51_PULL GPIO_PULL_UP -#define GPIO51_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 52 -#define GPIO52_MODE GPIO_MODE_00 -#define GPIO52_DIR GPIO_DIR_IN -#define GPIO52_PULLEN GPIO_PULL_DISABLE -#define GPIO52_PULL GPIO_PULL_DOWN -#define GPIO52_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 53 -#define GPIO53_MODE GPIO_MODE_00 -#define GPIO53_DIR GPIO_DIR_IN -#define GPIO53_PULLEN GPIO_PULL_ENABLE -#define GPIO53_PULL GPIO_PULL_DOWN -#define GPIO53_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 54 -#define GPIO54_MODE GPIO_MODE_00 -#define GPIO54_DIR GPIO_DIR_IN -#define GPIO54_PULLEN GPIO_PULL_ENABLE -#define GPIO54_PULL GPIO_PULL_DOWN -#define GPIO54_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 55 -#define GPIO55_MODE GPIO_MODE_00 -#define GPIO55_DIR GPIO_DIR_IN -#define GPIO55_PULLEN GPIO_PULL_ENABLE -#define GPIO55_PULL GPIO_PULL_DOWN -#define GPIO55_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 56 -#define GPIO56_MODE GPIO_MODE_00 -#define GPIO56_DIR GPIO_DIR_IN -#define GPIO56_PULLEN GPIO_PULL_ENABLE -#define GPIO56_PULL GPIO_PULL_DOWN -#define GPIO56_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 57 -#define GPIO57_MODE GPIO_MODE_01 -#define GPIO57_DIR GPIO_DIR_IN -#define GPIO57_PULLEN GPIO_PULL_ENABLE -#define GPIO57_PULL GPIO_PULL_UP -#define GPIO57_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 58 -#define GPIO58_MODE GPIO_MODE_01 -#define GPIO58_DIR GPIO_DIR_IN -#define GPIO58_PULLEN GPIO_PULL_ENABLE -#define GPIO58_PULL GPIO_PULL_UP -#define GPIO58_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 59 -#define GPIO59_MODE GPIO_MODE_01 -#define GPIO59_DIR GPIO_DIR_OUT -#define GPIO59_PULLEN GPIO_PULL_DISABLE -#define GPIO59_PULL GPIO_PULL_DOWN -#define GPIO59_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 60 -#define GPIO60_MODE GPIO_MODE_01 -#define GPIO60_DIR GPIO_DIR_OUT -#define GPIO60_PULLEN GPIO_PULL_DISABLE -#define GPIO60_PULL GPIO_PULL_DOWN -#define GPIO60_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 61 -#define GPIO61_MODE GPIO_MODE_01 -#define GPIO61_DIR GPIO_DIR_IN -#define GPIO61_PULLEN GPIO_PULL_ENABLE -#define GPIO61_PULL GPIO_PULL_DOWN -#define GPIO61_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 62 -#define GPIO62_MODE GPIO_MODE_01 -#define GPIO62_DIR GPIO_DIR_IN -#define GPIO62_PULLEN GPIO_PULL_ENABLE -#define GPIO62_PULL GPIO_PULL_DOWN -#define GPIO62_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 63 -#define GPIO63_MODE GPIO_MODE_01 -#define GPIO63_DIR GPIO_DIR_OUT -#define GPIO63_PULLEN GPIO_PULL_ENABLE -#define GPIO63_PULL GPIO_PULL_DOWN -#define GPIO63_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 64 -#define GPIO64_MODE GPIO_MODE_01 -#define GPIO64_DIR GPIO_DIR_IN -#define GPIO64_PULLEN GPIO_PULL_ENABLE -#define GPIO64_PULL GPIO_PULL_DOWN -#define GPIO64_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 65 -#define GPIO65_MODE GPIO_MODE_01 -#define GPIO65_DIR GPIO_DIR_OUT -#define GPIO65_PULLEN GPIO_PULL_DISABLE -#define GPIO65_PULL GPIO_PULL_DOWN -#define GPIO65_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 66 -#define GPIO66_MODE GPIO_MODE_01 -#define GPIO66_DIR GPIO_DIR_IN -#define GPIO66_PULLEN GPIO_PULL_ENABLE -#define GPIO66_PULL GPIO_PULL_DOWN -#define GPIO66_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 67 -#define GPIO67_MODE GPIO_MODE_01 -#define GPIO67_DIR GPIO_DIR_IN -#define GPIO67_PULLEN GPIO_PULL_ENABLE -#define GPIO67_PULL GPIO_PULL_DOWN -#define GPIO67_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 68 -#define GPIO68_MODE GPIO_MODE_01 -#define GPIO68_DIR GPIO_DIR_IN -#define GPIO68_PULLEN GPIO_PULL_ENABLE -#define GPIO68_PULL GPIO_PULL_DOWN -#define GPIO68_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 69 -#define GPIO69_MODE GPIO_MODE_01 -#define GPIO69_DIR GPIO_DIR_IN -#define GPIO69_PULLEN GPIO_PULL_ENABLE -#define GPIO69_PULL GPIO_PULL_DOWN -#define GPIO69_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 70 -#define GPIO70_MODE GPIO_MODE_01 -#define GPIO70_DIR GPIO_DIR_IN -#define GPIO70_PULLEN GPIO_PULL_ENABLE -#define GPIO70_PULL GPIO_PULL_DOWN -#define GPIO70_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 71 -#define GPIO71_MODE GPIO_MODE_01 -#define GPIO71_DIR GPIO_DIR_IN -#define GPIO71_PULLEN GPIO_PULL_ENABLE -#define GPIO71_PULL GPIO_PULL_DOWN -#define GPIO71_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 72 -#define GPIO72_MODE GPIO_MODE_00 -#define GPIO72_DIR GPIO_DIR_IN -#define GPIO72_PULLEN GPIO_PULL_ENABLE -#define GPIO72_PULL GPIO_PULL_DOWN -#define GPIO72_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 73 -#define GPIO73_MODE GPIO_MODE_00 -#define GPIO73_DIR GPIO_DIR_IN -#define GPIO73_PULLEN GPIO_PULL_ENABLE -#define GPIO73_PULL GPIO_PULL_DOWN -#define GPIO73_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 74 -#define GPIO74_MODE GPIO_MODE_00 -#define GPIO74_DIR GPIO_DIR_IN -#define GPIO74_PULLEN GPIO_PULL_ENABLE -#define GPIO74_PULL GPIO_PULL_DOWN -#define GPIO74_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 75 -#define GPIO75_MODE GPIO_MODE_01 -#define GPIO75_DIR GPIO_DIR_IN -#define GPIO75_PULLEN GPIO_PULL_ENABLE -#define GPIO75_PULL GPIO_PULL_UP -#define GPIO75_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 76 -#define GPIO76_MODE GPIO_MODE_01 -#define GPIO76_DIR GPIO_DIR_IN -#define GPIO76_PULLEN GPIO_PULL_ENABLE -#define GPIO76_PULL GPIO_PULL_UP -#define GPIO76_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 77 -#define GPIO77_MODE GPIO_MODE_01 -#define GPIO77_DIR GPIO_DIR_IN -#define GPIO77_PULLEN GPIO_PULL_ENABLE -#define GPIO77_PULL GPIO_PULL_UP -#define GPIO77_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 78 -#define GPIO78_MODE GPIO_MODE_01 -#define GPIO78_DIR GPIO_DIR_IN -#define GPIO78_PULLEN GPIO_PULL_ENABLE -#define GPIO78_PULL GPIO_PULL_UP -#define GPIO78_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 79 -#define GPIO79_MODE GPIO_MODE_01 -#define GPIO79_DIR GPIO_DIR_OUT -#define GPIO79_PULLEN GPIO_PULL_ENABLE -#define GPIO79_PULL GPIO_PULL_UP -#define GPIO79_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 80 -#define GPIO80_MODE GPIO_MODE_01 -#define GPIO80_DIR GPIO_DIR_OUT -#define GPIO80_PULLEN GPIO_PULL_DISABLE -#define GPIO80_PULL GPIO_PULL_DOWN -#define GPIO80_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 81 -#define GPIO81_MODE GPIO_MODE_01 -#define GPIO81_DIR GPIO_DIR_OUT -#define GPIO81_PULLEN GPIO_PULL_ENABLE -#define GPIO81_PULL GPIO_PULL_UP -#define GPIO81_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 82 -#define GPIO82_MODE GPIO_MODE_01 -#define GPIO82_DIR GPIO_DIR_OUT -#define GPIO82_PULLEN GPIO_PULL_DISABLE -#define GPIO82_PULL GPIO_PULL_DOWN -#define GPIO82_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 83 -#define GPIO83_MODE GPIO_MODE_00 -#define GPIO83_DIR GPIO_DIR_OUT -#define GPIO83_PULLEN GPIO_PULL_DISABLE -#define GPIO83_PULL GPIO_PULL_DOWN -#define GPIO83_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 84 -#define GPIO84_MODE GPIO_MODE_00 -#define GPIO84_DIR GPIO_DIR_IN -#define GPIO84_PULLEN GPIO_PULL_ENABLE -#define GPIO84_PULL GPIO_PULL_DOWN -#define GPIO84_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 85 -#define GPIO85_MODE GPIO_MODE_00 -#define GPIO85_DIR GPIO_DIR_OUT -#define GPIO85_PULLEN GPIO_PULL_DISABLE -#define GPIO85_PULL GPIO_PULL_DOWN -#define GPIO85_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 86 -#define GPIO86_MODE GPIO_MODE_00 -#define GPIO86_DIR GPIO_DIR_IN -#define GPIO86_PULLEN GPIO_PULL_ENABLE -#define GPIO86_PULL GPIO_PULL_DOWN -#define GPIO86_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 87 -#define GPIO87_MODE GPIO_MODE_00 -#define GPIO87_DIR GPIO_DIR_IN -#define GPIO87_PULLEN GPIO_PULL_ENABLE -#define GPIO87_PULL GPIO_PULL_DOWN -#define GPIO87_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 88 -#define GPIO88_MODE GPIO_MODE_00 -#define GPIO88_DIR GPIO_DIR_IN -#define GPIO88_PULLEN GPIO_PULL_ENABLE -#define GPIO88_PULL GPIO_PULL_DOWN -#define GPIO88_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 89 -#define GPIO89_MODE GPIO_MODE_00 -#define GPIO89_DIR GPIO_DIR_IN -#define GPIO89_PULLEN GPIO_PULL_ENABLE -#define GPIO89_PULL GPIO_PULL_DOWN -#define GPIO89_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 90 -#define GPIO90_MODE GPIO_MODE_00 -#define GPIO90_DIR GPIO_DIR_IN -#define GPIO90_PULLEN GPIO_PULL_ENABLE -#define GPIO90_PULL GPIO_PULL_DOWN -#define GPIO90_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 91 -#define GPIO91_MODE GPIO_MODE_01 -#define GPIO91_DIR GPIO_DIR_IN -#define GPIO91_PULLEN GPIO_PULL_DISABLE -#define GPIO91_PULL GPIO_PULL_DOWN -#define GPIO91_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 92 -#define GPIO92_MODE GPIO_MODE_01 -#define GPIO92_DIR GPIO_DIR_IN -#define GPIO92_PULLEN GPIO_PULL_DISABLE -#define GPIO92_PULL GPIO_PULL_DOWN -#define GPIO92_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 93 -#define GPIO93_MODE GPIO_MODE_01 -#define GPIO93_DIR GPIO_DIR_IN -#define GPIO93_PULLEN GPIO_PULL_DISABLE -#define GPIO93_PULL GPIO_PULL_DOWN -#define GPIO93_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 94 -#define GPIO94_MODE GPIO_MODE_01 -#define GPIO94_DIR GPIO_DIR_IN -#define GPIO94_PULLEN GPIO_PULL_DISABLE -#define GPIO94_PULL GPIO_PULL_DOWN -#define GPIO94_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 95 -#define GPIO95_MODE GPIO_MODE_01 -#define GPIO95_DIR GPIO_DIR_IN -#define GPIO95_PULLEN GPIO_PULL_DISABLE -#define GPIO95_PULL GPIO_PULL_DOWN -#define GPIO95_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 96 -#define GPIO96_MODE GPIO_MODE_01 -#define GPIO96_DIR GPIO_DIR_IN -#define GPIO96_PULLEN GPIO_PULL_DISABLE -#define GPIO96_PULL GPIO_PULL_DOWN -#define GPIO96_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 97 -#define GPIO97_MODE GPIO_MODE_01 -#define GPIO97_DIR GPIO_DIR_IN -#define GPIO97_PULLEN GPIO_PULL_DISABLE -#define GPIO97_PULL GPIO_PULL_DOWN -#define GPIO97_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 98 -#define GPIO98_MODE GPIO_MODE_01 -#define GPIO98_DIR GPIO_DIR_IN -#define GPIO98_PULLEN GPIO_PULL_DISABLE -#define GPIO98_PULL GPIO_PULL_DOWN -#define GPIO98_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 99 -#define GPIO99_MODE GPIO_MODE_01 -#define GPIO99_DIR GPIO_DIR_IN -#define GPIO99_PULLEN GPIO_PULL_DISABLE -#define GPIO99_PULL GPIO_PULL_DOWN -#define GPIO99_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 100 -#define GPIO100_MODE GPIO_MODE_01 -#define GPIO100_DIR GPIO_DIR_IN -#define GPIO100_PULLEN GPIO_PULL_DISABLE -#define GPIO100_PULL GPIO_PULL_DOWN -#define GPIO100_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 101 -#define GPIO101_MODE GPIO_MODE_00 -#define GPIO101_DIR GPIO_DIR_IN -#define GPIO101_PULLEN GPIO_PULL_ENABLE -#define GPIO101_PULL GPIO_PULL_DOWN -#define GPIO101_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 102 -#define GPIO102_MODE GPIO_MODE_00 -#define GPIO102_DIR GPIO_DIR_IN -#define GPIO102_PULLEN GPIO_PULL_ENABLE -#define GPIO102_PULL GPIO_PULL_DOWN -#define GPIO102_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 103 -#define GPIO103_MODE GPIO_MODE_00 -#define GPIO103_DIR GPIO_DIR_IN -#define GPIO103_PULLEN GPIO_PULL_ENABLE -#define GPIO103_PULL GPIO_PULL_DOWN -#define GPIO103_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 104 -#define GPIO104_MODE GPIO_MODE_00 -#define GPIO104_DIR GPIO_DIR_IN -#define GPIO104_PULLEN GPIO_PULL_ENABLE -#define GPIO104_PULL GPIO_PULL_DOWN -#define GPIO104_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 105 -#define GPIO105_MODE GPIO_MODE_00 -#define GPIO105_DIR GPIO_DIR_IN -#define GPIO105_PULLEN GPIO_PULL_ENABLE -#define GPIO105_PULL GPIO_PULL_DOWN -#define GPIO105_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 106 -#define GPIO106_MODE GPIO_MODE_00 -#define GPIO106_DIR GPIO_DIR_IN -#define GPIO106_PULLEN GPIO_PULL_ENABLE -#define GPIO106_PULL GPIO_PULL_DOWN -#define GPIO106_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 107 -#define GPIO107_MODE GPIO_MODE_02 -#define GPIO107_DIR GPIO_DIR_IN -#define GPIO107_PULLEN GPIO_PULL_ENABLE -#define GPIO107_PULL GPIO_PULL_DOWN -#define GPIO107_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 108 -#define GPIO108_MODE GPIO_MODE_02 -#define GPIO108_DIR GPIO_DIR_IN -#define GPIO108_PULLEN GPIO_PULL_ENABLE -#define GPIO108_PULL GPIO_PULL_DOWN -#define GPIO108_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 109 -#define GPIO109_MODE GPIO_MODE_02 -#define GPIO109_DIR GPIO_DIR_IN -#define GPIO109_PULLEN GPIO_PULL_ENABLE -#define GPIO109_PULL GPIO_PULL_DOWN -#define GPIO109_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 110 -#define GPIO110_MODE GPIO_MODE_02 -#define GPIO110_DIR GPIO_DIR_IN -#define GPIO110_PULLEN GPIO_PULL_ENABLE -#define GPIO110_PULL GPIO_PULL_DOWN -#define GPIO110_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 111 -#define GPIO111_MODE GPIO_MODE_02 -#define GPIO111_DIR GPIO_DIR_IN -#define GPIO111_PULLEN GPIO_PULL_ENABLE -#define GPIO111_PULL GPIO_PULL_DOWN -#define GPIO111_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 112 -#define GPIO112_MODE GPIO_MODE_02 -#define GPIO112_DIR GPIO_DIR_IN -#define GPIO112_PULLEN GPIO_PULL_ENABLE -#define GPIO112_PULL GPIO_PULL_DOWN -#define GPIO112_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 113 -#define GPIO113_MODE GPIO_MODE_02 -#define GPIO113_DIR GPIO_DIR_IN -#define GPIO113_PULLEN GPIO_PULL_ENABLE -#define GPIO113_PULL GPIO_PULL_DOWN -#define GPIO113_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 114 -#define GPIO114_MODE GPIO_MODE_02 -#define GPIO114_DIR GPIO_DIR_IN -#define GPIO114_PULLEN GPIO_PULL_ENABLE -#define GPIO114_PULL GPIO_PULL_DOWN -#define GPIO114_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 115 -#define GPIO115_MODE GPIO_MODE_02 -#define GPIO115_DIR GPIO_DIR_IN -#define GPIO115_PULLEN GPIO_PULL_ENABLE -#define GPIO115_PULL GPIO_PULL_DOWN -#define GPIO115_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 116 -#define GPIO116_MODE GPIO_MODE_02 -#define GPIO116_DIR GPIO_DIR_IN -#define GPIO116_PULLEN GPIO_PULL_ENABLE -#define GPIO116_PULL GPIO_PULL_DOWN -#define GPIO116_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 117 -#define GPIO117_MODE GPIO_MODE_00 -#define GPIO117_DIR GPIO_DIR_OUT -#define GPIO117_PULLEN GPIO_PULL_DISABLE -#define GPIO117_PULL GPIO_PULL_DOWN -#define GPIO117_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 118 -#define GPIO118_MODE GPIO_MODE_00 -#define GPIO118_DIR GPIO_DIR_OUT -#define GPIO118_PULLEN GPIO_PULL_ENABLE -#define GPIO118_PULL GPIO_PULL_DOWN -#define GPIO118_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 119 -#define GPIO119_MODE GPIO_MODE_01 -#define GPIO119_DIR GPIO_DIR_OUT -#define GPIO119_PULLEN GPIO_PULL_DISABLE -#define GPIO119_PULL GPIO_PULL_DOWN -#define GPIO119_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 120 -#define GPIO120_MODE GPIO_MODE_01 -#define GPIO120_DIR GPIO_DIR_IN -#define GPIO120_PULLEN GPIO_PULL_ENABLE -#define GPIO120_PULL GPIO_PULL_DOWN -#define GPIO120_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 121 -#define GPIO121_MODE GPIO_MODE_01 -#define GPIO121_DIR GPIO_DIR_IN -#define GPIO121_PULLEN GPIO_PULL_DISABLE -#define GPIO121_PULL GPIO_PULL_DOWN -#define GPIO121_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 122 -#define GPIO122_MODE GPIO_MODE_01 -#define GPIO122_DIR GPIO_DIR_IN -#define GPIO122_PULLEN GPIO_PULL_DISABLE -#define GPIO122_PULL GPIO_PULL_DOWN -#define GPIO122_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 123 -#define GPIO123_MODE GPIO_MODE_01 -#define GPIO123_DIR GPIO_DIR_IN -#define GPIO123_PULLEN GPIO_PULL_DISABLE -#define GPIO123_PULL GPIO_PULL_DOWN -#define GPIO123_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 124 -#define GPIO124_MODE GPIO_MODE_01 -#define GPIO124_DIR GPIO_DIR_IN -#define GPIO124_PULLEN GPIO_PULL_DISABLE -#define GPIO124_PULL GPIO_PULL_DOWN -#define GPIO124_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 125 -#define GPIO125_MODE GPIO_MODE_01 -#define GPIO125_DIR GPIO_DIR_IN -#define GPIO125_PULLEN GPIO_PULL_DISABLE -#define GPIO125_PULL GPIO_PULL_DOWN -#define GPIO125_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 126 -#define GPIO126_MODE GPIO_MODE_01 -#define GPIO126_DIR GPIO_DIR_IN -#define GPIO126_PULLEN GPIO_PULL_DISABLE -#define GPIO126_PULL GPIO_PULL_DOWN -#define GPIO126_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 127 -#define GPIO127_MODE GPIO_MODE_01 -#define GPIO127_DIR GPIO_DIR_IN -#define GPIO127_PULLEN GPIO_PULL_DISABLE -#define GPIO127_PULL GPIO_PULL_DOWN -#define GPIO127_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 128 -#define GPIO128_MODE GPIO_MODE_01 -#define GPIO128_DIR GPIO_DIR_IN -#define GPIO128_PULLEN GPIO_PULL_DISABLE -#define GPIO128_PULL GPIO_PULL_DOWN -#define GPIO128_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 129 -#define GPIO129_MODE GPIO_MODE_01 -#define GPIO129_DIR GPIO_DIR_IN -#define GPIO129_PULLEN GPIO_PULL_DISABLE -#define GPIO129_PULL GPIO_PULL_DOWN -#define GPIO129_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 130 -#define GPIO130_MODE GPIO_MODE_01 -#define GPIO130_DIR GPIO_DIR_IN -#define GPIO130_PULLEN GPIO_PULL_DISABLE -#define GPIO130_PULL GPIO_PULL_DOWN -#define GPIO130_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 131 -#define GPIO131_MODE GPIO_MODE_01 -#define GPIO131_DIR GPIO_DIR_IN -#define GPIO131_PULLEN GPIO_PULL_DISABLE -#define GPIO131_PULL GPIO_PULL_DOWN -#define GPIO131_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 132 -#define GPIO132_MODE GPIO_MODE_01 -#define GPIO132_DIR GPIO_DIR_IN -#define GPIO132_PULLEN GPIO_PULL_DISABLE -#define GPIO132_PULL GPIO_PULL_DOWN -#define GPIO132_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 133 -#define GPIO133_MODE GPIO_MODE_01 -#define GPIO133_DIR GPIO_DIR_IN -#define GPIO133_PULLEN GPIO_PULL_DISABLE -#define GPIO133_PULL GPIO_PULL_DOWN -#define GPIO133_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 134 -#define GPIO134_MODE GPIO_MODE_01 -#define GPIO134_DIR GPIO_DIR_IN -#define GPIO134_PULLEN GPIO_PULL_DISABLE -#define GPIO134_PULL GPIO_PULL_DOWN -#define GPIO134_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 135 -#define GPIO135_MODE GPIO_MODE_01 -#define GPIO135_DIR GPIO_DIR_IN -#define GPIO135_PULLEN GPIO_PULL_DISABLE -#define GPIO135_PULL GPIO_PULL_DOWN -#define GPIO135_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 136 -#define GPIO136_MODE GPIO_MODE_01 -#define GPIO136_DIR GPIO_DIR_IN -#define GPIO136_PULLEN GPIO_PULL_DISABLE -#define GPIO136_PULL GPIO_PULL_DOWN -#define GPIO136_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 137 -#define GPIO137_MODE GPIO_MODE_01 -#define GPIO137_DIR GPIO_DIR_IN -#define GPIO137_PULLEN GPIO_PULL_DISABLE -#define GPIO137_PULL GPIO_PULL_DOWN -#define GPIO137_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 138 -#define GPIO138_MODE GPIO_MODE_01 -#define GPIO138_DIR GPIO_DIR_IN -#define GPIO138_PULLEN GPIO_PULL_DISABLE -#define GPIO138_PULL GPIO_PULL_DOWN -#define GPIO138_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 139 -#define GPIO139_MODE GPIO_MODE_01 -#define GPIO139_DIR GPIO_DIR_IN -#define GPIO139_PULLEN GPIO_PULL_DISABLE -#define GPIO139_PULL GPIO_PULL_DOWN -#define GPIO139_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 140 -#define GPIO140_MODE GPIO_MODE_01 -#define GPIO140_DIR GPIO_DIR_IN -#define GPIO140_PULLEN GPIO_PULL_DISABLE -#define GPIO140_PULL GPIO_PULL_DOWN -#define GPIO140_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 141 -#define GPIO141_MODE GPIO_MODE_01 -#define GPIO141_DIR GPIO_DIR_IN -#define GPIO141_PULLEN GPIO_PULL_DISABLE -#define GPIO141_PULL GPIO_PULL_DOWN -#define GPIO141_DATAOUT GPIO_OUT_ZERO - -//Configureation for Pin 142 -#define GPIO142_MODE GPIO_MODE_00 -#define GPIO142_DIR GPIO_DIR_IN -#define GPIO142_PULLEN GPIO_PULL_ENABLE -#define GPIO142_PULL GPIO_PULL_DOWN -#define GPIO142_DATAOUT GPIO_OUT_ZERO - -//Configureation for pmic gpio - -//Configureation for Pin 0 -#define GPIOEXT0_MODE GPIO_MODE_00 -#define GPIOEXT0_DIR GPIO_DIR_IN -#define GPIOEXT0_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT0_PULL GPIO_PULL_DOWN -#define GPIOEXT0_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT0_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 1 -#define GPIOEXT1_MODE GPIO_MODE_00 -#define GPIOEXT1_DIR GPIO_DIR_IN -#define GPIOEXT1_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT1_PULL GPIO_PULL_DOWN -#define GPIOEXT1_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT1_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 2 -#define GPIOEXT2_MODE GPIO_MODE_00 -#define GPIOEXT2_DIR GPIO_DIR_IN -#define GPIOEXT2_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT2_PULL GPIO_PULL_DOWN -#define GPIOEXT2_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT2_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 3 -#define GPIOEXT3_MODE GPIO_MODE_00 -#define GPIOEXT3_DIR GPIO_DIR_IN -#define GPIOEXT3_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT3_PULL GPIO_PULL_DOWN -#define GPIOEXT3_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT3_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 4 -#define GPIOEXT4_MODE GPIO_MODE_00 -#define GPIOEXT4_DIR GPIO_DIR_IN -#define GPIOEXT4_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT4_PULL GPIO_PULL_DOWN -#define GPIOEXT4_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT4_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 5 -#define GPIOEXT5_MODE GPIO_MODE_01 -#define GPIOEXT5_DIR GPIO_DIR_IN -#define GPIOEXT5_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT5_PULL GPIO_PULL_DOWN -#define GPIOEXT5_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT5_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 6 -#define GPIOEXT6_MODE GPIO_MODE_01 -#define GPIOEXT6_DIR GPIO_DIR_IN -#define GPIOEXT6_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT6_PULL GPIO_PULL_DOWN -#define GPIOEXT6_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT6_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 7 -#define GPIOEXT7_MODE GPIO_MODE_01 -#define GPIOEXT7_DIR GPIO_DIR_IN -#define GPIOEXT7_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT7_PULL GPIO_PULL_DOWN -#define GPIOEXT7_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT7_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 8 -#define GPIOEXT8_MODE GPIO_MODE_01 -#define GPIOEXT8_DIR GPIO_DIR_IN -#define GPIOEXT8_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT8_PULL GPIO_PULL_DOWN -#define GPIOEXT8_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT8_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 9 -#define GPIOEXT9_MODE GPIO_MODE_00 -#define GPIOEXT9_DIR GPIO_DIR_IN -#define GPIOEXT9_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT9_PULL GPIO_PULL_DOWN -#define GPIOEXT9_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT9_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 10 -#define GPIOEXT10_MODE GPIO_MODE_00 -#define GPIOEXT10_DIR GPIO_DIR_IN -#define GPIOEXT10_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT10_PULL GPIO_PULL_DOWN -#define GPIOEXT10_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT10_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 11 -#define GPIOEXT11_MODE GPIO_MODE_00 -#define GPIOEXT11_DIR GPIO_DIR_IN -#define GPIOEXT11_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT11_PULL GPIO_PULL_DOWN -#define GPIOEXT11_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT11_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 12 -#define GPIOEXT12_MODE GPIO_MODE_00 -#define GPIOEXT12_DIR GPIO_DIR_IN -#define GPIOEXT12_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT12_PULL GPIO_PULL_DOWN -#define GPIOEXT12_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT12_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 13 -#define GPIOEXT13_MODE GPIO_MODE_00 -#define GPIOEXT13_DIR GPIO_DIR_IN -#define GPIOEXT13_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT13_PULL GPIO_PULL_DOWN -#define GPIOEXT13_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT13_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 14 -#define GPIOEXT14_MODE GPIO_MODE_00 -#define GPIOEXT14_DIR GPIO_DIR_IN -#define GPIOEXT14_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT14_PULL GPIO_PULL_DOWN -#define GPIOEXT14_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT14_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 15 -#define GPIOEXT15_MODE GPIO_MODE_00 -#define GPIOEXT15_DIR GPIO_DIR_IN -#define GPIOEXT15_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT15_PULL GPIO_PULL_DOWN -#define GPIOEXT15_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT15_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 16 -#define GPIOEXT16_MODE GPIO_MODE_00 -#define GPIOEXT16_DIR GPIO_DIR_IN -#define GPIOEXT16_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT16_PULL GPIO_PULL_DOWN -#define GPIOEXT16_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT16_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 17 -#define GPIOEXT17_MODE GPIO_MODE_00 -#define GPIOEXT17_DIR GPIO_DIR_IN -#define GPIOEXT17_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT17_PULL GPIO_PULL_DOWN -#define GPIOEXT17_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT17_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 18 -#define GPIOEXT18_MODE GPIO_MODE_00 -#define GPIOEXT18_DIR GPIO_DIR_IN -#define GPIOEXT18_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT18_PULL GPIO_PULL_DOWN -#define GPIOEXT18_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT18_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 19 -#define GPIOEXT19_MODE GPIO_MODE_00 -#define GPIOEXT19_DIR GPIO_DIR_IN -#define GPIOEXT19_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT19_PULL GPIO_PULL_DOWN -#define GPIOEXT19_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT19_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 20 -#define GPIOEXT20_MODE GPIO_MODE_00 -#define GPIOEXT20_DIR GPIO_DIR_IN -#define GPIOEXT20_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT20_PULL GPIO_PULL_DOWN -#define GPIOEXT20_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT20_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 21 -#define GPIOEXT21_MODE GPIO_MODE_00 -#define GPIOEXT21_DIR GPIO_DIR_IN -#define GPIOEXT21_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT21_PULL GPIO_PULL_DOWN -#define GPIOEXT21_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT21_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 22 -#define GPIOEXT22_MODE GPIO_MODE_00 -#define GPIOEXT22_DIR GPIO_DIR_IN -#define GPIOEXT22_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT22_PULL GPIO_PULL_DOWN -#define GPIOEXT22_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT22_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 23 -#define GPIOEXT23_MODE GPIO_MODE_00 -#define GPIOEXT23_DIR GPIO_DIR_IN -#define GPIOEXT23_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT23_PULL GPIO_PULL_DOWN -#define GPIOEXT23_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT23_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 24 -#define GPIOEXT24_MODE GPIO_MODE_00 -#define GPIOEXT24_DIR GPIO_DIR_IN -#define GPIOEXT24_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT24_PULL GPIO_PULL_DOWN -#define GPIOEXT24_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT24_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 25 -#define GPIOEXT25_MODE GPIO_MODE_00 -#define GPIOEXT25_DIR GPIO_DIR_IN -#define GPIOEXT25_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT25_PULL GPIO_PULL_DOWN -#define GPIOEXT25_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT25_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 26 -#define GPIOEXT26_MODE GPIO_MODE_00 -#define GPIOEXT26_DIR GPIO_DIR_IN -#define GPIOEXT26_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT26_PULL GPIO_PULL_DOWN -#define GPIOEXT26_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT26_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 27 -#define GPIOEXT27_MODE GPIO_MODE_00 -#define GPIOEXT27_DIR GPIO_DIR_IN -#define GPIOEXT27_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT27_PULL GPIO_PULL_DOWN -#define GPIOEXT27_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT27_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 28 -#define GPIOEXT28_MODE GPIO_MODE_00 -#define GPIOEXT28_DIR GPIO_DIR_IN -#define GPIOEXT28_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT28_PULL GPIO_PULL_DOWN -#define GPIOEXT28_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT28_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 29 -#define GPIOEXT29_MODE GPIO_MODE_00 -#define GPIOEXT29_DIR GPIO_DIR_IN -#define GPIOEXT29_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT29_PULL GPIO_PULL_DOWN -#define GPIOEXT29_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT29_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 30 -#define GPIOEXT30_MODE GPIO_MODE_00 -#define GPIOEXT30_DIR GPIO_DIR_IN -#define GPIOEXT30_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT30_PULL GPIO_PULL_DOWN -#define GPIOEXT30_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT30_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 31 -#define GPIOEXT31_MODE GPIO_MODE_00 -#define GPIOEXT31_DIR GPIO_DIR_IN -#define GPIOEXT31_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT31_PULL GPIO_PULL_DOWN -#define GPIOEXT31_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT31_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 32 -#define GPIOEXT32_MODE GPIO_MODE_00 -#define GPIOEXT32_DIR GPIO_DIR_IN -#define GPIOEXT32_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT32_PULL GPIO_PULL_DOWN -#define GPIOEXT32_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT32_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 33 -#define GPIOEXT33_MODE GPIO_MODE_00 -#define GPIOEXT33_DIR GPIO_DIR_IN -#define GPIOEXT33_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT33_PULL GPIO_PULL_DOWN -#define GPIOEXT33_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT33_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 34 -#define GPIOEXT34_MODE GPIO_MODE_00 -#define GPIOEXT34_DIR GPIO_DIR_IN -#define GPIOEXT34_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT34_PULL GPIO_PULL_DOWN -#define GPIOEXT34_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT34_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 35 -#define GPIOEXT35_MODE GPIO_MODE_00 -#define GPIOEXT35_DIR GPIO_DIR_IN -#define GPIOEXT35_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT35_PULL GPIO_PULL_DOWN -#define GPIOEXT35_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT35_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 36 -#define GPIOEXT36_MODE GPIO_MODE_00 -#define GPIOEXT36_DIR GPIO_DIR_IN -#define GPIOEXT36_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT36_PULL GPIO_PULL_DOWN -#define GPIOEXT36_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT36_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 37 -#define GPIOEXT37_MODE GPIO_MODE_00 -#define GPIOEXT37_DIR GPIO_DIR_IN -#define GPIOEXT37_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT37_PULL GPIO_PULL_DOWN -#define GPIOEXT37_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT37_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 38 -#define GPIOEXT38_MODE GPIO_MODE_00 -#define GPIOEXT38_DIR GPIO_DIR_IN -#define GPIOEXT38_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT38_PULL GPIO_PULL_DOWN -#define GPIOEXT38_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT38_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 39 -#define GPIOEXT39_MODE GPIO_MODE_00 -#define GPIOEXT39_DIR GPIO_DIR_IN -#define GPIOEXT39_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT39_PULL GPIO_PULL_DOWN -#define GPIOEXT39_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT39_DATAINV GPIO_DATA_UNINV - -//Configureation for Pin 40 -#define GPIOEXT40_MODE GPIO_MODE_00 -#define GPIOEXT40_DIR GPIO_DIR_IN -#define GPIOEXT40_PULLEN GPIO_PULL_ENABLE -#define GPIOEXT40_PULL GPIO_PULL_DOWN -#define GPIOEXT40_DATAOUT GPIO_OUT_ZERO -#define GPIOEXT40_DATAINV GPIO_DATA_UNINV - - - -#endif /* __CUST_GPIO_BOOT_H__ */ - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_usage.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_usage.h deleted file mode 100644 index 4210153e2e2..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_gpio_usage.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#ifndef __CUST_GPIO_USAGE_H__ -#define __CUST_GPIO_USAGE_H__ - - -#define GPIO_PMIC_EINT_PIN (GPIO2 | 0x80000000) -#define GPIO_PMIC_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_PMIC_EINT_PIN_M_EINT GPIO_PMIC_EINT_PIN_M_GPIO - -#define GPIO_CAMERA_CMPDN1_PIN (GPIO5 | 0x80000000) -#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00 - -#define GPIO_CAMERA_CMRST1_PIN (GPIO6 | 0x80000000) -#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00 - -#define GPIO_AUD_CLK_MOSI_PIN (GPIO7 | 0x80000000) -#define GPIO_AUD_CLK_MOSI_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_AUD_CLK_MOSI_PIN_M_CLK GPIO_MODE_01 - -#define GPIO_AUD_DAT_MISO_PIN (GPIO8 | 0x80000000) -#define GPIO_AUD_DAT_MISO_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_AUD_DAT_MISO_PIN_M_AUD_MISO GPIO_MODE_01 - -#define GPIO_AUD_DAT_MOSI_PIN (GPIO9 | 0x80000000) -#define GPIO_AUD_DAT_MOSI_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_AUD_DAT_MOSI_PIN_M_AUD_MOSI GPIO_MODE_01 - -#define GPIO_NFC_OSC_EN_PIN (GPIO13 | 0x80000000) -#define GPIO_NFC_OSC_EN_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_NFC_OSC_EN_PIN_M_CLK GPIO_MODE_01 - -#define GPIO_HALL_1_PIN (GPIO18 | 0x80000000) -#define GPIO_HALL_1_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_HALL_1_PIN_M_CLK GPIO_MODE_01 - -#define GPIO_NFC_VENB_PIN (GPIO19 | 0x80000000) -#define GPIO_NFC_VENB_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_NFC_VENB_PIN_M_PCM_SYNC GPIO_MODE_01 - -#define GPIO_HALL_2_PIN (GPIO20 | 0x80000000) -#define GPIO_HALL_2_PIN_M_GPIO GPIO_MODE_00 - -#define GPIO_SUB_CAM_ID_PIN (GPIO22 | 0x80000000) -#define GPIO_SUB_CAM_ID_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_SUB_CAM_ID_PIN_M_PWM GPIO_MODE_01 - -#define GPIO_ACCDET_EINT_PIN (GPIO23 | 0x80000000) -#define GPIO_ACCDET_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_ACCDET_EINT_PIN_M_PWM GPIO_MODE_01 -#define GPIO_ACCDET_EINT_PIN_M_EINT GPIO_ACCDET_EINT_PIN_M_GPIO - -#define GPIO_MAIN_CAM_ID_PIN (GPIO24 | 0x80000000) -#define GPIO_MAIN_CAM_ID_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_MAIN_CAM_ID_PIN_M_CLK GPIO_MODE_01 -#define GPIO_MAIN_CAM_ID_PIN_M_KCOL GPIO_MODE_06 -#define GPIO_MAIN_CAM_ID_PIN_CLK CLK_OUT0 -#define GPIO_MAIN_CAM_ID_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_CTP_RST_PIN (GPIO25 | 0x80000000) -#define GPIO_CTP_RST_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_CTP_RST_PIN_M_CLK GPIO_MODE_01 -#define GPIO_CTP_RST_PIN_M_KCOL GPIO_MODE_06 -#define GPIO_CTP_RST_PIN_CLK CLK_OUT1 -#define GPIO_CTP_RST_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_HDMI_POWER_CONTROL (GPIO27 | 0x80000000) -#define GPIO_HDMI_POWER_CONTROL_M_GPIO GPIO_MODE_00 -#define GPIO_HDMI_POWER_CONTROL_M_KCOL GPIO_MODE_06 - -#define GPIO_CAMERA_CMPDN_PIN (GPIO29 | 0x80000000) -#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00 - -#define GPIO_CTP_EINT_PIN (GPIO30 | 0x80000000) -#define GPIO_CTP_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_CTP_EINT_PIN_M_CLK GPIO_MODE_02 -#define GPIO_CTP_EINT_PIN_M_EINT GPIO_CTP_EINT_PIN_M_GPIO -#define GPIO_CTP_EINT_PIN_CLK CLK_OUT3 -#define GPIO_CTP_EINT_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_GSE_1_EINT_PIN (GPIO31 | 0x80000000) -#define GPIO_GSE_1_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_GSE_1_EINT_PIN_M_CLK GPIO_MODE_01 -#define GPIO_GSE_1_EINT_PIN_M_EINT GPIO_GSE_1_EINT_PIN_M_GPIO -#define GPIO_GSE_1_EINT_PIN_CLK CLK_OUT4 -#define GPIO_GSE_1_EINT_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_GSE_2_EINT_PIN (GPIO32 | 0x80000000) -#define GPIO_GSE_2_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_GSE_2_EINT_PIN_M_CLK GPIO_MODE_01 -#define GPIO_GSE_2_EINT_PIN_M_EINT GPIO_GSE_2_EINT_PIN_M_GPIO -#define GPIO_GSE_2_EINT_PIN_CLK CLK_OUT5 -#define GPIO_GSE_2_EINT_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_KPD_KROW0_PIN (GPIO33 | 0x80000000) -#define GPIO_KPD_KROW0_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_KPD_KROW0_PIN_M_KROW GPIO_MODE_01 - -#define GPIO_CAMERA_CMRST_PIN (GPIO34 | 0x80000000) -#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_CAMERA_CMRST_PIN_M_KROW GPIO_MODE_01 - -#define GPIO_OTG_DRVVBUS_PIN (GPIO35 | 0x80000000) -#define GPIO_OTG_DRVVBUS_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_OTG_DRVVBUS_PIN_M_KROW GPIO_MODE_01 - -#define GPIO_KPD_KCOL0_PIN (GPIO36 | 0x80000000) -#define GPIO_KPD_KCOL0_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_KPD_KCOL0_PIN_M_KCOL GPIO_MODE_01 - -#define GPIO_KPD_KCOL1_PIN (GPIO37 | 0x80000000) -#define GPIO_KPD_KCOL1_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_KPD_KCOL1_PIN_M_KCOL GPIO_MODE_01 - -#define GPIO_OTG_IDDIG_EINT_PIN (GPIO38 | 0x80000000) -#define GPIO_OTG_IDDIG_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_OTG_IDDIG_EINT_PIN_M_KCOL GPIO_MODE_01 -#define GPIO_OTG_IDDIG_EINT_PIN_M_IDDIG GPIO_MODE_02 - -#define GPIO_MSDC1_INSI (GPIO43 | 0x80000000) -#define GPIO_MSDC1_INSI_M_GPIO GPIO_MODE_00 -#define GPIO_MSDC1_INSI_M_CLK GPIO_MODE_01 -#define GPIO_MSDC1_INSI_M_KROW GPIO_MODE_03 -#define GPIO_MSDC1_INSI_M_PWM GPIO_MODE_02 -#define GPIO_MSDC1_INSI_M_EINT GPIO_MSDC1_INSI_M_GPIO -#define GPIO_MSDC1_INSI_CLK CLK_OUT4 -#define GPIO_MSDC1_INSI_FREQ GPIO_CLKSRC_NONE - -#define GPIO_CTP_EN_PIN (GPIO45 | 0x80000000) -#define GPIO_CTP_EN_PIN_M_GPIO GPIO_MODE_00 - -#define GPIO_MHALL_EINT_PIN (GPIO50 | 0x80000000) -#define GPIO_MHALL_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_MHALL_EINT_PIN_M_CLK GPIO_MODE_02 -#define GPIO_MHALL_EINT_PIN_M_EINT GPIO_MHALL_EINT_PIN_M_GPIO -#define GPIO_MHALL_EINT_PIN_CLK CLK_OUT3 -#define GPIO_MHALL_EINT_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_ALS_EINT_PIN (GPIO51 | 0x80000000) -#define GPIO_ALS_EINT_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_ALS_EINT_PIN_M_CLK GPIO_MODE_04 -#define GPIO_ALS_EINT_PIN_M_EINT GPIO_ALS_EINT_PIN_M_GPIO -#define GPIO_ALS_EINT_PIN_CLK CLK_OUT1 -#define GPIO_ALS_EINT_PIN_FREQ GPIO_CLKSRC_NONE - -#define GPIO_I2C1_SDA_PIN (GPIO57 | 0x80000000) -#define GPIO_I2C1_SDA_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_I2C1_SDA_PIN_M_SDA GPIO_MODE_01 - -#define GPIO_I2C1_SCA_PIN (GPIO58 | 0x80000000) -#define GPIO_I2C1_SCA_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_I2C1_SCA_PIN_M_SCL GPIO_MODE_01 - -#define GPIO_I2C0_SDA_PIN (GPIO75 | 0x80000000) -#define GPIO_I2C0_SDA_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_I2C0_SDA_PIN_M_SDA GPIO_MODE_01 - -#define GPIO_I2C0_SCA_PIN (GPIO76 | 0x80000000) -#define GPIO_I2C0_SCA_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_I2C0_SCA_PIN_M_SCL GPIO_MODE_01 - -#define GPIO_UART_URXD1_PIN (GPIO79 | 0x80000000) -#define GPIO_UART_URXD1_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_UART_URXD1_PIN_M_URXD GPIO_MODE_01 - -#define GPIO_UART_UTXD1_PIN (GPIO80 | 0x80000000) -#define GPIO_UART_UTXD1_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_UART_UTXD1_PIN_M_UTXD GPIO_MODE_01 - -#define GPIO_LCM_RST (GPIO83 | 0x80000000) -#define GPIO_LCM_RST_M_GPIO GPIO_MODE_00 - -#define GPIO_LCM_PWR_EN (GPIO85 | 0x80000000) -#define GPIO_LCM_PWR_EN_M_GPIO GPIO_MODE_00 - -#define GPIO_CAMERA_FLASH_EN_PIN (GPIO117 | 0x80000000) -#define GPIO_CAMERA_FLASH_EN_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_CAMERA_FLASH_EN_PIN_M_ANT_SEL GPIO_MODE_03 - -#define GPIO_GPS_LNA_PIN (GPIO118 | 0x80000000) -#define GPIO_GPS_LNA_PIN_M_GPIO GPIO_MODE_00 -#define GPIO_GPS_LNA_PIN_M_CMDAT GPIO_MODE_01 -#define GPIO_GPS_LNA_PIN_M_CMCSD GPIO_MODE_02 -#define GPIO_GPS_LNA_PIN_M_ANT_SEL GPIO_MODE_03 -#define GPIO_GPS_LNA_PIN_M_DBG_MON_B GPIO_MODE_07 - - -/*Output for default variable names*/ -/*@XXX_XX_PIN in gpio.cmp */ - - - - -/*Output for default variable names*/ -/*@XXX_XX_PIN in gpio.cmp */ - - - -#endif /* __CUST_GPIO_USAGE_H__ */ - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_kpd.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_kpd.h deleted file mode 100644 index e2ad23a7180..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_kpd.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#ifndef _CUST_KPD_H_ -#define _CUST_KPD_H_ -#include -#include - -#define KPD_YES 1 -#define KPD_NO 0 - -/* available keys (Linux keycodes) */ -#define KEY_CALL KEY_SEND -#define KEY_ENDCALL KEY_END -#undef KEY_OK -#define KEY_OK KEY_REPLY /* DPAD_CENTER */ -#define KEY_FOCUS KEY_HP -#define KEY_AT KEY_EMAIL -#define KEY_POUND 228 //KEY_KBDILLUMTOGGLE -#define KEY_STAR 227 //KEY_SWITCHVIDEOMODE -#define KEY_DEL KEY_BACKSPACE -#define KEY_SYM KEY_COMPOSE -/* KEY_HOME */ -/* KEY_BACK */ -/* KEY_VOLUMEDOWN */ -/* KEY_VOLUMEUP */ -/* KEY_MUTE */ -/* KEY_MENU */ -/* KEY_UP */ -/* KEY_DOWN */ -/* KEY_LEFT */ -/* KEY_RIGHT */ -/* KEY_CAMERA */ -/* KEY_POWER */ -/* KEY_TAB */ -/* KEY_ENTER */ -/* KEY_LEFTSHIFT */ -/* KEY_COMMA */ -/* KEY_DOT */ /* PERIOD */ -/* KEY_SLASH */ -/* KEY_LEFTALT */ -/* KEY_RIGHTALT */ -/* KEY_SPACE */ -/* KEY_SEARCH */ -/* KEY_0 ~ KEY_9 */ -/* KEY_A ~ KEY_Z */ - -/* - * Power key's HW keycodes are 8, 17, 26, 35, 44, 53, 62, 71. Only [8] works - * for Power key in Keypad driver, so we set KEY_ENDCALL in [8] because - * EndCall key is Power key in Android. If KPD_PWRKEY_USE_EINT is YES, these - * eight keycodes will not work for Power key. - */ - - -#define KPD_KEY_DEBOUNCE 1024 /* (val / 32) ms */ -#define KPD_PWRKEY_MAP KEY_POWER -#define MTK_PMIC_PWR_KEY 8 - -/* HW keycode [0 ~ 71] -> Linux keycode */ -#define KPD_INIT_KEYMAP() \ -{ \ - [0] = KEY_VOLUMEUP, \ - [1] = KEY_VOLUMEDOWN, \ -} -/*****************************************************************/ -/*******************Preload Customation***************************/ -/*****************************************************************/ -#define KPD_PWRKEY_EINT_GPIO GPIO0 - -#define KPD_PWRKEY_GPIO_DIN 0 - -#define KPD_DL_KEY1 0 /* KEY_VOLUMEUP */ -#define KPD_DL_KEY2 1 /* KEY_VOLUMEDOWN */ -#define KPD_DL_KEY3 8 /* KEY_POWER */ -/*****************************************************************/ -/*******************Uboot Customation***************************/ -/*****************************************************************/ -#define MT65XX_RECOVERY_KEY 0 /* KEY_VOLUMEUP */ -#define MT65XX_FACTORY_KEY 1 /* KEY_VOLUMEDOWN */ -/*****************************************************************/ -/*******************factory Customation***************************/ -/*****************************************************************/ -#define KEYS_PWRKEY_MAP { KEY_POWER, "Power" } -#define DEFINE_KEYS_KEYMAP(x) \ - struct key x[] = { \ - KEYS_PWRKEY_MAP, \ - { KEY_VOLUMEUP, "VLUp" }, \ - { KEY_VOLUMEDOWN, "VLDown" }, \ -} -#define CUST_KEY_UP KEY_VOLUMEUP -#define CUST_KEY_VOLUP KEY_VOLUMEUP -#define CUST_KEY_DOWN KEY_VOLUMEDOWN -#define CUST_KEY_VOLDOWN KEY_VOLUMEDOWN -#define CUST_KEY_CONFIRM KEY_POWER -#define CUST_KEY_BACK KEY_VOLUMEUP -/*****************************************************************/ -/*******************recovery Customation****************************/ -/*****************************************************************/ -#endif - - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_power.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_power.h deleted file mode 100644 index 60b74682319..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/cust_power.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Generated by MTK SP DrvGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - -#define GPIO_DVDD28_DPI GPIO_VIO28 - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/inc/pmic_drv.h b/arch/arm/mach-mt8127/ttab/dct/dct/inc/pmic_drv.h deleted file mode 100644 index ff98cbf812b..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/inc/pmic_drv.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - - - -#include - - -//****for customer use*******// - - -//PMIC default enable/disable result - -//PMIC mode select -typedef enum -{ - BY_ENABLE = 0, - BY_SRCLKEN = 1 -}MODE_sel_enum; - -////For Common use - -//For PMIC driver use - - - - diff --git a/arch/arm/mach-mt8127/ttab/dct/dct/pmic_drv.c b/arch/arm/mach-mt8127/ttab/dct/dct/pmic_drv.c deleted file mode 100644 index f8c0faf0349..00000000000 --- a/arch/arm/mach-mt8127/ttab/dct/dct/pmic_drv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013. - * Mon Mar 19 18:10:35 2018 - * Do Not Modify the File. - */ - - - -#include "pmic_drv.h" - - - - -//For PMIC driver use - - diff --git a/arch/arm/mach-mt8127/ttab/eeprom/Makefile b/arch/arm/mach-mt8127/ttab/eeprom/Makefile deleted file mode 100755 index 6ec6676af91..00000000000 --- a/arch/arm/mach-mt8127/ttab/eeprom/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_eeprom.o - diff --git a/arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.c b/arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.c deleted file mode 100644 index faafd31f13b..00000000000 --- a/arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Driver for EEPROM - * - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "kd_camera_hw.h" -#include "eeprom.h" -#include "eeprom_define.h" - -#include "dummy_eeprom.h" -#include // for SMP - -//#define EEPROMGETDLT_DEBUG //test -//#define EEPROM_DEBUG //test -#ifdef EEPROM_DEBUG -#define EEPROMDB printk -#else -#define EEPROMDB(x,...) -#endif - - -static DEFINE_SPINLOCK(g_EEPROMLock); // for SMP - -#define EEPROM_I2C_BUSNUM 1 -static struct i2c_board_info __initdata kd_eeprom_dev={ I2C_BOARD_INFO("dummy_eeprom", 0xA0>>1)}; - -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_ICS_REVISION 1 //seanlin111208 -/******************************************************************************* -* -********************************************************************************/ -#define EEPROM_DRVNAME "dummy_eeprom" -#define EEPROM_I2C_GROUP_ID 0 -/******************************************************************************* -* -********************************************************************************/ -/* fix warning MSG -static unsigned short g_pu2Normal_i2c[] = {S24CS64A_DEVICE_ID , I2C_CLIENT_END}; -static unsigned short g_u2Ignore = I2C_CLIENT_END; -static struct i2c_client_address_data g_stEEPROM_Addr_data = { - .normal_i2c = g_pu2Normal_i2c, - .probe = &g_u2Ignore, - .ignore = &g_u2Ignore -}; */ -static struct i2c_client * g_pstI2Cclient = NULL; - -//81 is used for V4L driver -static dev_t g_EEPROMdevno = MKDEV(EEPROM_DEV_MAJOR_NUMBER,0); -static struct cdev * g_pEEPROM_CharDrv = NULL; -//static spinlock_t g_EEPROMLock; -static struct class *EEPROM_class = NULL; -static atomic_t g_EEPROMatomic; -/******************************************************************************* -* -********************************************************************************/ -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iWriteEEPROM(u16 a_u2Addr , u32 a_u4Bytes, u8 * puDataInBytes) -{ - int i4RetValue = 0; - u32 u4Index = 0; - char puSendCmd[8] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF) , - 0, 0, 0, 0, 0, 0}; - if(a_u4Bytes + 2 > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation (include address 2 Byte)\n"); - return -1; - } - - for(u4Index = 0 ; u4Index < a_u4Bytes ; u4Index += 1 ) - { - puSendCmd[(u4Index + 2)] = puDataInBytes[u4Index]; - } - - i4RetValue = i2c_master_send(g_pstI2Cclient, puSendCmd, (a_u4Bytes + 2)); - if (i4RetValue != (a_u4Bytes + 2)) - { - EEPROMDB("[EEPROM] I2C write failed!! \n"); - return -1; - } - mdelay(10); //for tWR singnal --> write data form buffer to memory. - - //EEPROMDB("[EEPROM] iWriteEEPROM done!! \n"); - return 0; -} - - -// maximun read length is limited at "I2C_FIFO_SIZE" in I2c-mt65xx.c which is 8 bytes -int iReadEEPROM(u16 a_u2Addr, u32 ui4_length, u8 * a_puBuff) -{ - int i4RetValue = 0; - char puReadCmd[2] = {(char)(a_u2Addr >> 8) , (char)(a_u2Addr & 0xFF)}; - - //EEPROMDB("[EEPROM] iReadEEPROM!! \n"); - - if(ui4_length > 8) - { - EEPROMDB("[EEPROM] exceed I2c-mt65xx.c 8 bytes limitation\n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & (I2C_MASK_FLAG | I2C_WR_FLAG); - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EERPOM] i2c_master_send \n"); - i4RetValue = i2c_master_send(g_pstI2Cclient, puReadCmd, 2); - if (i4RetValue != 2) - { - EEPROMDB("[EEPROM] I2C send read address failed!! \n"); - return -1; - } - - //EEPROMDB("[EERPOM] i2c_master_recv \n"); - i4RetValue = i2c_master_recv(g_pstI2Cclient, (char *)a_puBuff, ui4_length); - if (i4RetValue != ui4_length) - { - EEPROMDB("[EEPROM] I2C read data failed!! \n"); - return -1; - } - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient->addr = g_pstI2Cclient->addr & I2C_MASK_FLAG; - spin_unlock(&g_EEPROMLock); // for SMP - - //EEPROMDB("[EEPROM] iReadEEPROM done!! \n"); - return 0; -} - - -static int iWriteData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - - EEPROMDB("[EEPROM] iWriteData\n" ); - - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Write Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - EEPROMDB("[EEPROM] iWriteData u4CurrentOffset is %d \n",u4CurrentOffset); - do - { - if(i4ResidueDataLength >= 6) - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, 6, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iWriteEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iWriteData failed!! \n"); - return -1; - } - u4IncOffset += 6; - i4ResidueDataLength -= 6; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); - EEPROMDB("[EEPROM] iWriteData done\n" ); - - return 0; -} - -//int iReadData(stEEPROM_INFO_STRUCT * st_pOutputBuffer) -static int iReadData(unsigned int ui4_offset, unsigned int ui4_length, unsigned char * pinputdata) -{ - int i4RetValue = 0; - int i4ResidueDataLength; - u32 u4IncOffset = 0; - u32 u4CurrentOffset; - u8 * pBuff; - EEPROMDB("[EEPROM] iReadData \n" ); - - if (ui4_offset + ui4_length >= 0x2000) - { - EEPROMDB("[EEPROM] Read Error!! S-24CS64A not supprt address >= 0x2000!! \n" ); - return -1; - } - - i4ResidueDataLength = (int)ui4_length; - u4CurrentOffset = ui4_offset; - pBuff = pinputdata; - do - { - if(i4ResidueDataLength >= 8) - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, 8, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - } - else - { - i4RetValue = iReadEEPROM((u16)u4CurrentOffset, i4ResidueDataLength, pBuff); - if (i4RetValue != 0) - { - EEPROMDB("[EEPROM] I2C iReadData failed!! \n"); - return -1; - } - u4IncOffset += 8; - i4ResidueDataLength -= 8; - u4CurrentOffset = ui4_offset + u4IncOffset; - pBuff = pinputdata + u4IncOffset; - //break; - } - }while (i4ResidueDataLength > 0); -//fix warning MSG EEPROMDB("[EEPROM] iReadData finial address is %d length is %d buffer address is 0x%x\n",u4CurrentOffset, i4ResidueDataLength, pBuff); - EEPROMDB("[EEPROM] iReadData done\n" ); - return 0; -} - - -/******************************************************************************* -* -********************************************************************************/ -#define NEW_UNLOCK_IOCTL -#ifndef NEW_UNLOCK_IOCTL -static int EEPROM_Ioctl(struct inode * a_pstInode, -struct file * a_pstFile, -unsigned int a_u4Command, -unsigned long a_u4Param) -#else -static long EEPROM_Ioctl( - struct file *file, - unsigned int a_u4Command, - unsigned long a_u4Param -) -#endif -{ - int i4RetValue = 0; - u8 * pBuff = NULL; - u8 * pWorkingBuff = NULL; - stEEPROM_INFO_STRUCT *ptempbuf; - -#ifdef EEPROMGETDLT_DEBUG - struct timeval ktv1, ktv2; - unsigned long TimeIntervalUS; -#endif - - if(_IOC_NONE == _IOC_DIR(a_u4Command)) - { - } - else - { - pBuff = (u8 *)kmalloc(sizeof(stEEPROM_INFO_STRUCT),GFP_KERNEL); - - if(NULL == pBuff) - { - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } - - if(_IOC_WRITE & _IOC_DIR(a_u4Command)) - { - if(copy_from_user((u8 *) pBuff , (u8 *) a_u4Param, sizeof(stEEPROM_INFO_STRUCT))) - { //get input structure address - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - } - } - - ptempbuf = (stEEPROM_INFO_STRUCT *)pBuff; - pWorkingBuff = (u8*)kmalloc(ptempbuf->u4Length,GFP_KERNEL); - if(NULL == pWorkingBuff) - { - kfree(pBuff); - EEPROMDB("[EEPROM] ioctl allocate mem failed\n"); - return -ENOMEM; - } -//fix warning MSG EEPROMDB("[EEPROM] init Working buffer address 0x%x command is 0x%08x\n", pWorkingBuff, a_u4Command); - - - if(copy_from_user((u8*)pWorkingBuff , (u8*)ptempbuf->pu1Params, ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy from user failed\n"); - return -EFAULT; - } - - switch(a_u4Command) - { - case EEPROMIOC_S_WRITE: - EEPROMDB("[EEPROM] Write CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - i4RetValue = iWriteData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Write data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - break; - case EEPROMIOC_G_READ: - EEPROMDB("[EEPROM] Read CMD \n"); -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv1); -#endif - EEPROMDB("[EEPROM] offset %d \n", ptempbuf->u4Offset); - EEPROMDB("[EEPROM] length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] Before read Working buffer address 0x%x \n", pWorkingBuff); - - i4RetValue = iReadData((u16)ptempbuf->u4Offset, ptempbuf->u4Length, pWorkingBuff); -//fix warning MSG EEPROMDB("[EEPROM] After read Working buffer address 0x%x \n", pWorkingBuff); - - -#ifdef EEPROMGETDLT_DEBUG - do_gettimeofday(&ktv2); - if(ktv2.tv_sec > ktv1.tv_sec) - { - TimeIntervalUS = ktv1.tv_usec + 1000000 - ktv2.tv_usec; - } - else - { - TimeIntervalUS = ktv2.tv_usec - ktv1.tv_usec; - } - printk("Read data %d bytes take %lu us\n",ptempbuf->u4Length, TimeIntervalUS); -#endif - - break; - default : - EEPROMDB("[EEPROM] No CMD \n"); - i4RetValue = -EPERM; - break; - } - - if(_IOC_READ & _IOC_DIR(a_u4Command)) - { - //copy data to user space buffer, keep other input paremeter unchange. - EEPROMDB("[EEPROM] to user length %d \n", ptempbuf->u4Length); -//fix warning MSG EEPROMDB("[EEPROM] to user Working buffer address 0x%x \n", pWorkingBuff); - if(copy_to_user((u8 __user *) ptempbuf->pu1Params , (u8 *)pWorkingBuff , ptempbuf->u4Length)) - { - kfree(pBuff); - kfree(pWorkingBuff); - EEPROMDB("[EEPROM] ioctl copy to user failed\n"); - return -EFAULT; - } - } - - kfree(pBuff); - kfree(pWorkingBuff); - return i4RetValue; -} - - -static u32 g_u4Opened = 0; -//#define -//Main jobs: -// 1.check for device-specified errors, device not ready. -// 2.Initialize the device if it is opened for the first time. -static int EEPROM_Open(struct inode * a_pstInode, struct file * a_pstFile) -{ - EEPROMDB("[S24EEPROM] EEPROM_Open\n"); - spin_lock(&g_EEPROMLock); - if(g_u4Opened) - { - spin_unlock(&g_EEPROMLock); - return -EBUSY; - } - else - { - g_u4Opened = 1; - atomic_set(&g_EEPROMatomic,0); - } - spin_unlock(&g_EEPROMLock); - - //if(TRUE != hwPowerOn(MT65XX_POWER_LDO_VCAMA, VOL_2800, "S24CS64A")) - //{ - // EEPROMDB("[EEPROM] Fail to enable analog gain\n"); - // return -EIO; - //} - - return 0; -} - -//Main jobs: -// 1.Deallocate anything that "open" allocated in private_data. -// 2.Shut down the device on last close. -// 3.Only called once on last time. -// Q1 : Try release multiple times. -static int EEPROM_Release(struct inode * a_pstInode, struct file * a_pstFile) -{ - spin_lock(&g_EEPROMLock); - - g_u4Opened = 0; - - atomic_set(&g_EEPROMatomic,0); - - spin_unlock(&g_EEPROMLock); - - return 0; -} - -static const struct file_operations g_stEEPROM_fops = -{ - .owner = THIS_MODULE, - .open = EEPROM_Open, - .release = EEPROM_Release, - //.ioctl = EEPROM_Ioctl - .unlocked_ioctl = EEPROM_Ioctl -}; - -#define EEPROM_DYNAMIC_ALLOCATE_DEVNO 1 -inline static int RegisterEEPROMCharDrv(void) -{ - struct device* EEPROM_device = NULL; - -#if EEPROM_DYNAMIC_ALLOCATE_DEVNO - if( alloc_chrdev_region(&g_EEPROMdevno, 0, 1,EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Allocate device no failed\n"); - - return -EAGAIN; - } -#else - if( register_chrdev_region( g_EEPROMdevno , 1 , EEPROM_DRVNAME) ) - { - EEPROMDB("[EEPROM] Register device no failed\n"); - - return -EAGAIN; - } -#endif - - //Allocate driver - g_pEEPROM_CharDrv = cdev_alloc(); - - if(NULL == g_pEEPROM_CharDrv) - { - unregister_chrdev_region(g_EEPROMdevno, 1); - - EEPROMDB("[EEPROM] Allocate mem for kobject failed\n"); - - return -ENOMEM; - } - - //Attatch file operation. - cdev_init(g_pEEPROM_CharDrv, &g_stEEPROM_fops); - - g_pEEPROM_CharDrv->owner = THIS_MODULE; - - //Add to system - if(cdev_add(g_pEEPROM_CharDrv, g_EEPROMdevno, 1)) - { - EEPROMDB("[EEPROM] Attatch file operation failed\n"); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - return -EAGAIN; - } - - EEPROM_class = class_create(THIS_MODULE, "EEPROMdrv"); - if (IS_ERR(EEPROM_class)) { - int ret = PTR_ERR(EEPROM_class); - EEPROMDB("Unable to create class, err = %d\n", ret); - return ret; - } - EEPROM_device = device_create(EEPROM_class, NULL, g_EEPROMdevno, NULL, EEPROM_DRVNAME); - - return 0; -} - -inline static void UnregisterEEPROMCharDrv(void) -{ - //Release char driver - cdev_del(g_pEEPROM_CharDrv); - - unregister_chrdev_region(g_EEPROMdevno, 1); - - device_destroy(EEPROM_class, g_EEPROMdevno); - class_destroy(EEPROM_class); -} - - -////////////////////////////////////////////////////////////////////// -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info); -#elif 0 -static int EEPROM_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -#else -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int EEPROM_i2c_remove(struct i2c_client *); - -static const struct i2c_device_id EEPROM_i2c_id[] = {{EEPROM_DRVNAME,0},{}}; -#if 0 //test110314 Please use the same I2C Group ID as Sensor -static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#else -//static unsigned short force[] = {EEPROM_I2C_GROUP_ID, S24CS64A_DEVICE_ID, I2C_CLIENT_END, I2C_CLIENT_END}; -#endif -//static const unsigned short * const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; - - -static struct i2c_driver EEPROM_i2c_driver = { - .probe = EEPROM_i2c_probe, - .remove = EEPROM_i2c_remove, -// .detect = EEPROM_i2c_detect, - .driver.name = EEPROM_DRVNAME, - .id_table = EEPROM_i2c_id, -}; - -#ifndef EEPROM_ICS_REVISION -static int EEPROM_i2c_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { - strcpy(info->type, EEPROM_DRVNAME); - return 0; -} -#endif -static int EEPROM_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { -int i4RetValue = 0; - EEPROMDB("[EEPROM] Attach I2C \n"); -// spin_lock_init(&g_EEPROMLock); - - //get sensor i2c client - spin_lock(&g_EEPROMLock); //for SMP - g_pstI2Cclient = client; - g_pstI2Cclient->addr = S24CS64A_DEVICE_ID>>1; - spin_unlock(&g_EEPROMLock); // for SMP - - EEPROMDB("[EEPROM] g_pstI2Cclient->addr = 0x%8x \n",g_pstI2Cclient->addr); - //Register char driver - i4RetValue = RegisterEEPROMCharDrv(); - - if(i4RetValue){ - EEPROMDB("[EEPROM] register char device failed!\n"); - return i4RetValue; - } - - - EEPROMDB("[EEPROM] Attached!! \n"); - return 0; -} - -static int EEPROM_i2c_remove(struct i2c_client *client) -{ - return 0; -} - -static int EEPROM_probe(struct platform_device *pdev) -{ - return i2c_add_driver(&EEPROM_i2c_driver); -} - -static int EEPROM_remove(struct platform_device *pdev) -{ - i2c_del_driver(&EEPROM_i2c_driver); - return 0; -} - -// platform structure -static struct platform_driver g_stEEPROM_Driver = { - .probe = EEPROM_probe, - .remove = EEPROM_remove, - .driver = { - .name = EEPROM_DRVNAME, - .owner = THIS_MODULE, - } -}; - - -static struct platform_device g_stEEPROM_Device = { - .name = EEPROM_DRVNAME, - .id = 0, - .dev = { - } -}; - -static int __init EEPROM_i2C_init(void) -{ - i2c_register_board_info(EEPROM_I2C_BUSNUM, &kd_eeprom_dev, 1); - if(platform_driver_register(&g_stEEPROM_Driver)){ - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - if (platform_device_register(&g_stEEPROM_Device)) - { - EEPROMDB("failed to register EEPROM driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit EEPROM_i2C_exit(void) -{ - platform_driver_unregister(&g_stEEPROM_Driver); -} - -module_init(EEPROM_i2C_init); -module_exit(EEPROM_i2C_exit); - -MODULE_DESCRIPTION("EEPROM driver"); -MODULE_AUTHOR("Sean Lin "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.h b/arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.h deleted file mode 100644 index 4f703c97058..00000000000 --- a/arch/arm/mach-mt8127/ttab/eeprom/dummy_eeprom.h +++ /dev/null @@ -1,30 +0,0 @@ -/***************************************************************************** - * - * Filename: - * --------- - * S-24CS64A.h - * - * Project: - * -------- - * ALPS - * - * Description: - * ------------ - * Header file of EEPROM driver - * - * - * Author: - * ------- - * Ronnie Lai (MTK01420) - * - *============================================================================*/ -#ifndef __EEPROM_H -#define __EEPROM_H - -#define EEPROM_DEV_MAJOR_NUMBER 226 - -/* EEPROM READ/WRITE ID */ -#define S24CS64A_DEVICE_ID 0xA0 //0xFE // - -#endif /* __EEPROM_H */ - diff --git a/arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom.h b/arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom.h deleted file mode 100644 index 1c68295fddf..00000000000 --- a/arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _EEPROM_H -#define _EEPROM_H - -#include - - -#define EEPROMAGIC 'i' -//IOCTRL(inode * ,file * ,cmd ,arg ) -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" - -/******************************************************************************* -* -********************************************************************************/ - -//EEPROM write -#define EEPROMIOC_S_WRITE _IOW(EEPROMAGIC,0,stEEPROM_INFO_STRUCT) -//EEPROM read -#define EEPROMIOC_G_READ _IOWR(EEPROMAGIC,5,stPEEPROM_INFO_STRUCT) - -#endif //_EEPROM_H - - diff --git a/arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom_define.h b/arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom_define.h deleted file mode 100644 index 4424df379c8..00000000000 --- a/arch/arm/mach-mt8127/ttab/eeprom/inc/eeprom_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EEPROM_DATA_H -#define _EEPROM_DATA_H - -//#define MT6516ISP_MaxTableSize_CNT 4096 -//#define EEPROM_DBG_MESSAGE - -typedef struct{ - u32 u4Offset; - u32 u4Length; - u8 * pu1Params; -}stEEPROM_INFO_STRUCT, *stPEEPROM_INFO_STRUCT; -#endif //_EEPROM_DATA_H diff --git a/arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/Makefile b/arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/Makefile deleted file mode 100644 index 8f07c9426b7..00000000000 --- a/arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += leds_strobe.o diff --git a/arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/leds_strobe.c b/arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/leds_strobe.c deleted file mode 100644 index e9ce35096d7..00000000000 --- a/arch/arm/mach-mt8127/ttab/flashlight/constant_flashlight/leds_strobe.c +++ /dev/null @@ -1,401 +0,0 @@ -#include //constant xx -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "kd_flashlight.h" -#include -#include -#include "kd_camera_hw.h" -#include -#include -#include -#include -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -#include -#else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -#include -#else -#include -#endif -#endif - - - -/****************************************************************************** - * Debug configuration -******************************************************************************/ -// availible parameter -// ANDROID_LOG_ASSERT -// ANDROID_LOG_ERROR -// ANDROID_LOG_WARNING -// ANDROID_LOG_INFO -// ANDROID_LOG_DEBUG -// ANDROID_LOG_VERBOSE -#define TAG_NAME "leds_strobe.c" -#define PK_DBG_NONE(fmt, arg...) do {} while (0) -#define PK_DBG_FUNC(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_WARN(fmt, arg...) xlog_printk(ANDROID_LOG_WARNING, TAG_NAME, KERN_WARNING "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_NOTICE(fmt, arg...) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, KERN_NOTICE "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_INFO(fmt, arg...) xlog_printk(ANDROID_LOG_INFO , TAG_NAME, KERN_INFO "%s: " fmt, __FUNCTION__ ,##arg) -#define PK_TRC_FUNC(f) xlog_printk(ANDROID_LOG_DEBUG , TAG_NAME, "<%s>\n", __FUNCTION__); -#define PK_TRC_VERBOSE(fmt, arg...) xlog_printk(ANDROID_LOG_VERBOSE, TAG_NAME, fmt, ##arg) -#define PK_ERROR(fmt, arg...) xlog_printk(ANDROID_LOG_ERROR , TAG_NAME, KERN_ERR "%s: " fmt, __FUNCTION__ ,##arg) - - -#define DEBUG_LEDS_STROBE -#ifdef DEBUG_LEDS_STROBE -#define PK_DBG PK_DBG_FUNC -#define PK_VER PK_TRC_VERBOSE -#define PK_ERR PK_ERROR -#else -#define PK_DBG(a,...) -#define PK_VER(a,...) -#define PK_ERR(a,...) -#endif - -/****************************************************************************** - * local variables -******************************************************************************/ - -static DEFINE_SPINLOCK(g_strobeSMPLock); /* cotta-- SMP proection */ - - -static u32 strobe_Res = 0; -static u32 strobe_Timeus = 0; -static BOOL g_strobe_On = 0; - -static int g_duty=-1; -static int g_timeOutTimeMs=0; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -static DEFINE_MUTEX(g_strobeSem); -#else -static DECLARE_MUTEX(g_strobeSem); -#endif - - -#define STROBE_DEVICE_ID 0x60 - - -static struct work_struct workTimeOut; - -/***************************************************************************** -Functions -*****************************************************************************/ -#ifdef GPIO_CAMERA_FLASH_EN_PIN -#define GPIO_ENF GPIO_CAMERA_FLASH_EN_PIN -#else -#define GPIO_ENF 0xFF -#endif - -#ifdef GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT GPIO_CAMERA_FLASH_MODE_PIN -#define GPIO_ENT_IS_AVALIABLE 1 -#else -#define GPIO_ENT 0xFF -#define GPIO_ENT_IS_AVALIABLE 0 -#endif - -/*CAMERA-FLASH-EN */ - - -extern int iWriteRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u16 i2cId); -extern int iReadRegI2C(u8 *a_pSendData , u16 a_sizeSendData, u8 * a_pRecvData, u16 a_sizeRecvData, u16 i2cId); -static void work_timeOutFunc(struct work_struct *data); - - - - - - - - - - - - - - -int FL_Enable(void) -{ - if (g_duty==0) - { -#if 0 - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ONE); - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); -#else - #if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); - #endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); -#endif - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - else - { -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ONE); - PK_DBG(" FL_Enable line=%d\n",__LINE__); - } - - return 0; -} - -int FL_Disable(void) -{ -#if GPIO_ENT_IS_AVALIABLE - mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO); -#endif - mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO); - PK_DBG(" FL_Disable line=%d\n",__LINE__); - return 0; -} - -int FL_dim_duty(kal_uint32 duty) -{ - g_duty=duty; - PK_DBG(" FL_dim_duty line=%d\n",__LINE__); - return 0; -} - - -int FL_Init(void) -{ - - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - PK_DBG(" GPIO_ENF=0x%x, GPIO_MODE_00=0x%x \n",GPIO_ENF,GPIO_MODE_00); - - if (mt_set_gpio_mode(GPIO_ENF,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENF,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENF,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } - - /*Init. to disable*/ -#if GPIO_ENT_IS_AVALIABLE - PK_DBG(" FL_Init - start line=%d\n",__LINE__); - if (mt_set_gpio_mode(GPIO_ENT,GPIO_MODE_00)) - { - PK_DBG("[constant_flashlight] set gpio mode failed!! \n"); - } - if (mt_set_gpio_dir(GPIO_ENT,GPIO_DIR_OUT)) - { - PK_DBG("[constant_flashlight] set gpio dir failed!! \n"); - } - if (mt_set_gpio_out(GPIO_ENT,GPIO_OUT_ZERO)) - { - PK_DBG("[constant_flashlight] set gpio failed!! \n"); - } -#endif - INIT_WORK(&workTimeOut, work_timeOutFunc); - PK_DBG(" FL_Init - end line=%d\n",__LINE__); - return 0; -} - - -int FL_Uninit(void) -{ - FL_Disable(); - return 0; -} - -/***************************************************************************** -User interface -*****************************************************************************/ - -static void work_timeOutFunc(struct work_struct *data) -{ - FL_Disable(); - PK_DBG("ledTimeOut_callback\n"); - //printk(KERN_ALERT "work handler function./n"); -} - - - -enum hrtimer_restart ledTimeOutCallback(struct hrtimer *timer) -{ - schedule_work(&workTimeOut); - return HRTIMER_NORESTART; -} -static struct hrtimer g_timeOutTimer; -void timerInit(void) -{ - g_timeOutTimeMs=1000; //1s - hrtimer_init( &g_timeOutTimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL ); - g_timeOutTimer.function=ledTimeOutCallback; - -} - - - -static int constant_flashlight_ioctl(MUINT32 cmd, MUINT32 arg) -{ - int i4RetValue = 0; - int ior_shift; - int iow_shift; - int iowr_shift; - ior_shift = cmd - (_IOR(FLASHLIGHT_MAGIC,0, int)); - iow_shift = cmd - (_IOW(FLASHLIGHT_MAGIC,0, int)); - iowr_shift = cmd - (_IOWR(FLASHLIGHT_MAGIC,0, int)); - PK_DBG("constant_flashlight_ioctl() line=%d ior_shift=%d, iow_shift=%d iowr_shift=%d arg=%d\n",__LINE__, ior_shift, iow_shift, iowr_shift, arg); - switch (cmd) - { - - case FLASH_IOC_SET_TIME_OUT_TIME_MS: - PK_DBG("FLASH_IOC_SET_TIME_OUT_TIME_MS: %d\n",arg); - g_timeOutTimeMs=arg; - break; - - - case FLASH_IOC_SET_DUTY : - PK_DBG("FLASHLIGHT_DUTY: %d\n",arg); - FL_dim_duty(arg); - break; - - - case FLASH_IOC_SET_STEP: - PK_DBG("FLASH_IOC_SET_STEP: %d\n",arg); - - break; - - case FLASH_IOC_SET_ONOFF : - PK_DBG("FLASHLIGHT_ONOFF: %d\n",arg); - if (arg==1) - { - if (g_timeOutTimeMs!=0) - { - ktime_t ktime; - ktime = ktime_set( 0, g_timeOutTimeMs*1000000 ); - hrtimer_start( &g_timeOutTimer, ktime, HRTIMER_MODE_REL ); - } - FL_Enable(); - } - else - { - FL_Disable(); - hrtimer_cancel( &g_timeOutTimer ); - } - break; - default : - PK_DBG(" No such command \n"); - i4RetValue = -EPERM; - break; - } - return i4RetValue; -} - - - - -static int constant_flashlight_open(void *pArg) -{ - int i4RetValue = 0; - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - if (0 == strobe_Res) - { - FL_Init(); - timerInit(); - } - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - spin_lock_irq(&g_strobeSMPLock); - - - if (strobe_Res) - { - PK_ERR(" busy!\n"); - i4RetValue = -EBUSY; - } - else - { - strobe_Res += 1; - } - - - spin_unlock_irq(&g_strobeSMPLock); - PK_DBG("constant_flashlight_open line=%d\n", __LINE__); - - return i4RetValue; - -} - - -static int constant_flashlight_release(void *pArg) -{ - PK_DBG(" constant_flashlight_release\n"); - - if (strobe_Res) - { - spin_lock_irq(&g_strobeSMPLock); - - strobe_Res = 0; - strobe_Timeus = 0; - - /* LED On Status */ - g_strobe_On = FALSE; - - spin_unlock_irq(&g_strobeSMPLock); - - FL_Uninit(); - } - - PK_DBG(" Done\n"); - - return 0; - -} - - -FLASHLIGHT_FUNCTION_STRUCT constantFlashlightFunc= -{ - constant_flashlight_open, - constant_flashlight_release, - constant_flashlight_ioctl -}; - - -MUINT32 constantFlashlightInit(PFLASHLIGHT_FUNCTION_STRUCT *pfFunc) -{ - if (pfFunc != NULL) - { - *pfFunc = &constantFlashlightFunc; - } - return 0; -} - - - -/* LED flash control for high current capture mode*/ -ssize_t strobe_VDIrq(void) -{ - - return 0; -} - -EXPORT_SYMBOL(strobe_VDIrq); - - diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/Makefile b/arch/arm/mach-mt8127/ttab/gyroscope/Makefile deleted file mode 100755 index 1bd38649586..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_gyro.o - diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/cust_gyro.c b/arch/arm/mach-mt8127/ttab/gyroscope/cust_gyro.c deleted file mode 100644 index ba96afa264b..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/cust_gyro.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/*---------------------------------------------------------------------------*/ -/* -int cust_gyro_power(struct gyro_hw *hw, unsigned int on, char* devname) -{ - if (hw->power_id == MT65XX_POWER_NONE) - return 0; - if (on) - return hwPowerOn(hw->power_id, hw->power_vol, devname); - else - return hwPowerDown(hw->power_id, devname); -} -*/ -/*---------------------------------------------------------------------------*/ -static struct gyro_hw cust_gyro_hw = { - .addr = 0xd0, - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ - .firlen = 16, /*!< don't enable low pass fileter */ - // .power = cust_gyro_power, -}; -/*---------------------------------------------------------------------------*/ -struct gyro_hw* get_cust_gyro_hw(void) -{ - return &cust_gyro_hw; -} diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.c b/arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.c deleted file mode 100644 index 126340985f1..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.c +++ /dev/null @@ -1,799 +0,0 @@ - -#include "gyroscope.h" - -static struct gyro_context *gyro_context_obj = NULL; - - -static struct gyro_init_info* gyroscope_init_list[MAX_CHOOSE_GYRO_NUM]= {0}; //modified -static void gyro_early_suspend(struct early_suspend *h); -static void gyro_late_resume(struct early_suspend *h); - -static void gyro_work_func(struct work_struct *work) -{ - - struct gyro_context *cxt = NULL; - int out_size; - //hwm_sensor_data sensor_data; - int x,y,z,status,div; - int64_t nt; - struct timespec time; - int err, idx; - - cxt = gyro_context_obj; - - if(NULL == cxt->gyro_data.get_data) - { - GYRO_ERR("gyro driver not register data path\n"); - } - - - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - //add wake lock to make sure data can be read before system suspend - cxt->gyro_data.get_data(&x,&y,&z,&status); - - if(err) - { - GYRO_ERR("get gyro data fails!!\n" ); - goto gyro_loop; - } - else - { - if((x != cxt->drv_data.gyro_data.values[0]) - || (y != cxt->drv_data.gyro_data.values[1]) - || (z != cxt->drv_data.gyro_data.values[2])) - { - if( 0 == x && 0==y - && 0 == z) - { - goto gyro_loop; - } - - cxt->drv_data.gyro_data.values[0] = x; - cxt->drv_data.gyro_data.values[1] = y; - cxt->drv_data.gyro_data.values[2] = z; - cxt->drv_data.gyro_data.status = status; - cxt->drv_data.gyro_data.time = nt; - - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[0] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[1] || - GYRO_INVALID_VALUE == cxt->drv_data.gyro_data.values[2]) - { - GYRO_LOG(" read invalid data \n"); - goto gyro_loop; - - } - } - //report data to input device - //printk("new gyro work run....\n"); - //GYRO_LOG("gyro data[%d,%d,%d] \n" ,cxt->drv_data.gyro_data.values[0], - //cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2]); - - gyro_data_report(cxt->drv_data.gyro_data.values[0], - cxt->drv_data.gyro_data.values[1],cxt->drv_data.gyro_data.values[2], - cxt->drv_data.gyro_data.status); - - gyro_loop: - if(true == cxt->is_polling_run) - { - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } - - } -} - -static void gyro_poll(unsigned long data) -{ - struct gyro_context *obj = (struct gyro_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct gyro_context *gyro_context_alloc_object(void) -{ - - struct gyro_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - GYRO_LOG("gyro_context_alloc_object++++\n"); - if(!obj) - { - GYRO_ERR("Alloc gyro object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, gyro_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = gyro_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->is_batch_enable = false; - mutex_init(&obj->gyro_op_mutex); - GYRO_LOG("gyro_context_alloc_object----\n"); - return obj; -} - -static int gyro_real_enable(int enable) -{ - int err =0; - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - if(1==enable) - { - - if(true==cxt->is_active_data || true ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - { - err = cxt->gyro_ctl.enable_nodata(1); - if(err) - GYRO_ERR("gyro enable(%d) err 3 timers = %d\n", enable, err); - } - } - GYRO_LOG("gyro real enable \n" ); - } - - } - if(0==enable) - { - if(false==cxt->is_active_data && false ==cxt->is_active_nodata) - { - err = cxt->gyro_ctl.enable_nodata(0); - if(err) - { - GYRO_ERR("gyro enable(%d) err = %d\n", enable, err); - } - GYRO_LOG("gyro real disable \n" ); - } - - } - - return err; -} -static int gyro_enable_data(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_ERR("no gyro control path\n"); - return -1; - } - - if(1 == enable) - { - GYRO_LOG("gyro enable data\n"); - cxt->is_active_data =true; - cxt->is_first_data_after_enable = true; - cxt->gyro_ctl.open_report_data(1); - if(false == cxt->is_polling_run && cxt->is_batch_enable == false) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - } - if(0 == enable) - { - GYRO_LOG("gyro disable \n"); - - cxt->is_active_data =false; - cxt->gyro_ctl.open_report_data(0); - if(true == cxt->is_polling_run) - { - if(false == cxt->gyro_ctl.is_report_input_direct) - { - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data.gyro_data.values[0] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[1] = GYRO_INVALID_VALUE; - cxt->drv_data.gyro_data.values[2] = GYRO_INVALID_VALUE; - } - } - - } - gyro_real_enable(enable); - return 0; -} - - - -int gyro_enable_nodata(int enable) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_ERR("gyro_enable_nodata:gyro ctl path is NULL\n"); - return -1; - } - - if(1 == enable) - { - cxt->is_active_nodata = true; - } - - if(0 == enable) - { - cxt->is_active_nodata = false; - } - gyro_real_enable(enable); - return 0; -} - - -static ssize_t gyro_show_enable_nodata(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_enable_nodata(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_enable nodata buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro_ctl enable nodata NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - gyro_enable_nodata(1); - } - else if (!strncmp(buf, "0", 1)) - { - gyro_enable_nodata(0); - } - else - { - GYRO_ERR(" gyro_store enable nodata cmd error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); -} - -static ssize_t gyro_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_active buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.open_report_data) - { - GYRO_LOG("gyro_ctl enable NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - if (!strncmp(buf, "1", 1)) - { - // cxt->gyro_ctl.enable(1); - gyro_enable_data(1); - - } - else if (!strncmp(buf, "0", 1)) - { - - //cxt->gyro_ctl.enable(0); - gyro_enable_data(0); - } - else - { - GYRO_ERR(" gyro_store_active error !!\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t gyro_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct gyro_context *cxt = NULL; - cxt = gyro_context_obj; - - int len = 0; - GYRO_LOG("gyro show active not support now\n"); - int div=cxt->gyro_data.vender_div; - GYRO_LOG("gyro vender_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - - //return len; -} - -static ssize_t gyro_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - int delay; - int mdelay=0; - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(NULL == cxt->gyro_ctl.set_delay) - { - GYRO_LOG("gyro_ctl set_delay NULL\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if (1 != sscanf(buf, "%d", &delay)) { - GYRO_ERR("invalid format!!\n"); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; - } - - if(false == cxt->gyro_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&gyro_context_obj->delay, mdelay); - } - cxt->gyro_ctl.set_delay(delay); - GYRO_LOG(" gyro_delay %d ns\n",delay); - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - GYRO_LOG(" not support now\n"); - return len; -} - -static ssize_t gyro_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - GYRO_LOG("gyro_store_batch buf=%s\n",buf); - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - if(cxt->gyro_ctl.is_support_batch){ - - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - GYRO_ERR(" gyro_store_batch error !!\n"); - } - }else{ - GYRO_LOG(" gyro_store_batch not support\n"); - } - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - GYRO_LOG(" gyro_store_batch done: %d\n", cxt->is_batch_enable); - return count; - -} - -static ssize_t gyro_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&gyro_context_obj->gyro_op_mutex); - struct gyro_context *devobj = (struct gyro_context*)dev_get_drvdata(dev); - //do read FIFO data function and report data immediately - mutex_unlock(&gyro_context_obj->gyro_op_mutex); - return count; -} - -static ssize_t gyro_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%d\n", 0); -} - -static ssize_t gyro_show_devnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - char *devname = NULL; - devname = dev_name(&gyro_context_obj->idev->dev); - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} -static int gyroscope_remove(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_remove\n"); - return 0; -} - -static int gyroscope_probe(struct platform_device *pdev) -{ - GYRO_LOG("gyroscope_probe\n"); - return 0; -} - -static struct platform_driver gyroscope_driver = { - .probe = gyroscope_probe, - .remove = gyroscope_remove, - .driver = - { - .name = "gyroscope", - } -}; - -static int gyro_real_driver_init(void) -{ - int i =0; - int err=0; - GYRO_LOG(" gyro_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_GYRO_NUM; i++) - { - GYRO_LOG(" i=%d\n",i); - if(0 != gyroscope_init_list[i]) - { - GYRO_LOG(" gyro try to init driver %s\n", gyroscope_init_list[i]->name); - err = gyroscope_init_list[i]->init(); - if(0 == err) - { - GYRO_LOG(" gyro real driver %s probe ok\n", gyroscope_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_GYRO_NUM) - { - GYRO_LOG(" gyro_real_driver_init fail\n"); - err=-1; - } - return err; -} - - int gyro_driver_add(struct gyro_init_info* obj) -{ - int err=0; - int i =0; - - GYRO_FUN(f); - - for(i =0; i < MAX_CHOOSE_GYRO_NUM; i++ ) - { - if(i == 0){ - GYRO_LOG("register gyro driver for the first time\n"); - if(platform_driver_register(&gyroscope_driver)) - { - GYRO_ERR("failed to register gyro driver already exist\n"); - } - } - - if(NULL == gyroscope_init_list[i]) - { - obj->platform_diver_addr = &gyroscope_driver; - gyroscope_init_list[i] = obj; - break; - } - } - if(NULL==gyroscope_init_list[i]) - { - GYRO_ERR("gyro driver add err \n"); - err=-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(gyro_driver_add); - -static int gyro_misc_init(struct gyro_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = GYRO_MISC_DEV_NAME; - if((err = misc_register(&cxt->mdev))) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - } - return err; -} - -static void gyro_input_destroy(struct gyro_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int gyro_input_init(struct gyro_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = GYRO_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_GYRO_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_GYRO_X, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Y, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_Z, GYRO_VALUE_MIN, GYRO_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_GYRO_STATUS, GYRO_STATUS_MIN, GYRO_STATUS_MAX, 0, 0); - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(gyroenablenodata, S_IWUSR | S_IRUGO, gyro_show_enable_nodata, gyro_store_enable_nodata); -DEVICE_ATTR(gyroactive, S_IWUSR | S_IRUGO, gyro_show_active, gyro_store_active); -DEVICE_ATTR(gyrodelay, S_IWUSR | S_IRUGO, gyro_show_delay, gyro_store_delay); -DEVICE_ATTR(gyrobatch, S_IWUSR | S_IRUGO, gyro_show_batch, gyro_store_batch); -DEVICE_ATTR(gyroflush, S_IWUSR | S_IRUGO, gyro_show_flush, gyro_store_flush); -DEVICE_ATTR(gyrodevnum, S_IWUSR | S_IRUGO, gyro_show_devnum, NULL); - -static struct attribute *gyro_attributes[] = { - &dev_attr_gyroenablenodata.attr, - &dev_attr_gyroactive.attr, - &dev_attr_gyrodelay.attr, - &dev_attr_gyrobatch.attr, - &dev_attr_gyroflush.attr, - &dev_attr_gyrodevnum.attr, - NULL -}; - -static struct attribute_group gyro_attribute_group = { - .attrs = gyro_attributes -}; - -int gyro_register_data_path(struct gyro_data_path *data) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_data.get_data = data->get_data; - cxt->gyro_data.vender_div = data->vender_div; - GYRO_LOG("gyro register data path vender_div: %d\n", cxt->gyro_data.vender_div); - if(NULL == cxt->gyro_data.get_data) - { - GYRO_LOG("gyro register data path fail \n"); - return -1; - } - return 0; -} - -int gyro_register_control_path(struct gyro_control_path *ctl) -{ - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - cxt->gyro_ctl.set_delay = ctl->set_delay; - cxt->gyro_ctl.open_report_data= ctl->open_report_data; - cxt->gyro_ctl.enable_nodata = ctl->enable_nodata; - cxt->gyro_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->gyro_ctl.set_delay || NULL==cxt->gyro_ctl.open_report_data - || NULL==cxt->gyro_ctl.enable_nodata) - { - GYRO_LOG("gyro register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = gyro_misc_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro misc device!!\n"); - return -2; - } - err = sysfs_create_group(&gyro_context_obj->mdev.this_device->kobj, - &gyro_attribute_group); - if (err < 0) - { - GYRO_ERR("unable to create gyro attribute file\n"); - return -3; - } - - kobject_uevent(&gyro_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int gyro_data_report(int x, int y, int z,int status) -{ - //GYRO_LOG("+gyro_data_report! %d, %d, %d, %d\n",x,y,z,status); - struct gyro_context *cxt = NULL; - int err =0; - cxt = gyro_context_obj; - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_Z, z); - input_report_abs(cxt->idev, EVENT_TYPE_GYRO_STATUS, status); - input_sync(cxt->idev); -} - -static int gyro_probe(struct platform_device *pdev) -{ - - int err; - GYRO_LOG("+++++++++++++gyro_probe!!\n"); - - gyro_context_obj = gyro_context_alloc_object(); - if (!gyro_context_obj) - { - err = -ENOMEM; - GYRO_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real gyroeleration driver - err = gyro_real_driver_init(); - if(err) - { - GYRO_ERR("gyro real driver init fail\n"); - goto real_driver_init_fail; - } - - //init input dev - err = gyro_input_init(gyro_context_obj); - if(err) - { - GYRO_ERR("unable to register gyro input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(gyro_context_obj->early_suspend), 0); - gyro_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - gyro_context_obj->early_drv.suspend = gyro_early_suspend, - gyro_context_obj->early_drv.resume = gyro_late_resume, - register_early_suspend(&gyro_context_obj->early_drv); - - GYRO_LOG("----gyro_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - GYRO_ERR("sysfs node creation error \n"); - gyro_input_destroy(gyro_context_obj); - } - - real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(gyro_context_obj); - - exit_alloc_data_failed: - - - GYRO_LOG("----gyro_probe fail !!!\n"); - return err; -} - - - -static int gyro_remove(struct platform_device *pdev) -{ - GYRO_FUN(f); - int err=0; - input_unregister_device(gyro_context_obj->idev); - sysfs_remove_group(&gyro_context_obj->idev->dev.kobj, - &gyro_attribute_group); - - if((err = misc_deregister(&gyro_context_obj->mdev))) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - kfree(gyro_context_obj); - - return 0; -} - -static void gyro_early_suspend(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 1); - GYRO_LOG(" gyro_early_suspend ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void gyro_late_resume(struct early_suspend *h) -{ - atomic_set(&(gyro_context_obj->early_suspend), 0); - GYRO_LOG(" gyro_late_resume ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(gyro_context_obj->early_suspend))); - return ; -} - -static int gyro_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int gyro_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver gyro_driver = -{ - .probe = gyro_probe, - .remove = gyro_remove, - .suspend = gyro_suspend, - .resume = gyro_resume, - .driver = - { - .name = GYRO_PL_DEV_NAME,//mt_gyro_pl - } -}; - -static int __init gyro_init(void) -{ - GYRO_FUN(f); - - if(platform_driver_register(&gyro_driver)) - { - GYRO_ERR("failed to register gyro driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit gyro_exit(void) -{ - platform_driver_unregister(&gyro_driver); - platform_driver_unregister(&gyroscope_driver); -} - -module_init(gyro_init); -module_exit(gyro_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("GYROSCOPE device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.h b/arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.h deleted file mode 100644 index 20550defd12..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/gyroscope.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef __GYROSCOPE_H__ -#define __GYROSCOPE_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define GYRO_TAG " " -#define GYRO_FUN(f) printk(GYRO_TAG"%s\n", __func__) -#define GYRO_ERR(fmt, args...) printk(GYRO_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(GYRO_TAG fmt, ##args) -#define GYRO_VER(fmt, args...) printk(GYRO_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_GYRO_DELAY 0X01 -#define OP_GYRO_ENABLE 0X02 -#define OP_GYRO_GET_DATA 0X04 - -#define GYRO_INVALID_VALUE -1 - -#define EVENT_TYPE_GYRO_X ABS_X -#define EVENT_TYPE_GYRO_Y ABS_Y -#define EVENT_TYPE_GYRO_Z ABS_Z -#define EVENT_TYPE_GYRO_STATUS ABS_WHEEL - - -#define GYRO_VALUE_MAX (32767) -#define GYRO_VALUE_MIN (-32768) -#define GYRO_STATUS_MIN (0) -#define GYRO_STATUS_MAX (64) -#define GYRO_DIV_MAX (32767) -#define GYRO_DIV_MIN (1) - - -#define MAX_CHOOSE_GYRO_NUM 5 - -struct gyro_control_path -{ - int (*open_report_data)(int open);//open data rerport to HAL - int (*enable_nodata)(int en);//only enable not report event to HAL - int (*set_delay)(u64 delay); - bool is_report_input_direct; - bool is_support_batch; -}; - -struct gyro_data_path -{ - int (*get_data)(int *x,int *y, int *z,int *status); - int vender_div; -}; - -struct gyro_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct gyro_data{ - hwm_sensor_data gyro_data ; - int data_updata; - //struct mutex lock; -}; - -struct gyro_drv_obj { - void *self; - int polling; - int (*gyro_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct gyro_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex gyro_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - atomic_t early_suspend; - //struct gyro_drv_obj drv_obj; - struct gyro_data drv_data; - struct gyro_control_path gyro_ctl; - struct gyro_data_path gyro_data; - bool is_active_nodata; // Active, but HAL don't need data sensor. such as orientation need - bool is_active_data; // Active and HAL need data . - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; -}; - -//driver API for internal -//extern int gyro_enable_nodata(int enable); -//extern int gyro_attach(struct gyro_drv_obj *obj); -//driver API for third party vendor - -//for auto detect -extern int gyro_driver_add(struct gyro_init_info* obj) ; -extern int gyro_data_report(int x, int y, int z,int status); -extern int gyro_register_control_path(struct gyro_control_path *ctl); -extern int gyro_register_data_path(struct gyro_data_path *data); -#endif diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/inc/cust_gyro.h b/arch/arm/mach-mt8127/ttab/gyroscope/inc/cust_gyro.h deleted file mode 100644 index 9e415257c71..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/inc/cust_gyro.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CUST_GYRO_H__ -#define __CUST_GYRO_H__ - -#include - -#define GYRO_CUST_I2C_ADDR_NUM 2 - -struct gyro_hw { - unsigned short addr; - int i2c_num; /*!< the i2c bus used by the chip */ - int direction; /*!< the direction of the chip */ - int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vol; /*!< the Power Voltage used by the chip */ - int firlen; /*!< the length of low pass filter */ - int (*power)(struct gyro_hw *hw, unsigned int on, char *devname); - unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/ - int power_vio_vol; /*!< the Power Voltage used by the chip */ - bool is_batch_supported; -}; - -extern struct gyro_hw* get_cust_gyro_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.c b/arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.c deleted file mode 100644 index 2a382c333ad..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.c +++ /dev/null @@ -1,1869 +0,0 @@ -/* MPU6050 motion sensor driver - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "mpu6050.h" -#include -#include - -#include -#include -#include -#include - -#define INV_GYRO_AUTO_CALI 1 - -#define POWER_NONE_MACRO MT65XX_POWER_NONE -/*----------------------------------------------------------------------------*/ -#define MPU6050_DEFAULT_FS MPU6050_FS_1000 -#define MPU6050_DEFAULT_LSB MPU6050_FS_1000_LSB -/*---------------------------------------------------------------------------*/ -#define DEBUG 1 -/*----------------------------------------------------------------------------*/ -#define CONFIG_MPU6050_LOWPASS /*apply low pass filter on output*/ -/*----------------------------------------------------------------------------*/ -#define MPU6050_AXIS_X 0 -#define MPU6050_AXIS_Y 1 -#define MPU6050_AXIS_Z 2 -#define MPU6050_AXES_NUM 3 -#define MPU6050_DATA_LEN 6 -#define MPU6050_DEV_NAME "MPU6050GY" /* name must different with gsensor mpu6050 */ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id mpu6050_i2c_id[] = {{MPU6050_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_mpu6050={ I2C_BOARD_INFO(MPU6050_DEV_NAME, (MPU6050_I2C_SLAVE_ADDR>>1))}; - -int packet_thresh = 75; // 600 ms / 8ms/sample - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int mpu6050_i2c_remove(struct i2c_client *client); -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); - -/*----------------------------------------------------------------------------*/ -typedef enum -{ - GYRO_TRC_FILTER = 0x01, - GYRO_TRC_RAWDATA = 0x02, - GYRO_TRC_IOCTL = 0x04, - GYRO_TRC_CALI = 0X08, - GYRO_TRC_INFO = 0X10, - GYRO_TRC_DATA = 0X20, -} GYRO_TRC; -/*----------------------------------------------------------------------------*/ -struct scale_factor -{ - u8 whole; - u8 fraction; -}; -/*----------------------------------------------------------------------------*/ -struct data_resolution -{ - struct scale_factor scalefactor; - int sensitivity; -}; -/*----------------------------------------------------------------------------*/ -#define C_MAX_FIR_LENGTH (32) -/*----------------------------------------------------------------------------*/ -struct data_filter -{ - s16 raw[C_MAX_FIR_LENGTH][MPU6050_AXES_NUM]; - int sum[MPU6050_AXES_NUM]; - int num; - int idx; -}; -/*----------------------------------------------------------------------------*/ -struct mpu6050_i2c_data -{ - struct i2c_client *client; - struct gyro_hw *hw; - struct hwmsen_convert cvt; - - /*misc*/ - struct data_resolution *reso; - atomic_t trace; - atomic_t suspend; - atomic_t selftest; - atomic_t filter; - s16 cali_sw[MPU6050_AXES_NUM+1]; - - /*data*/ - s8 offset[MPU6050_AXES_NUM+1]; /*+1: for 4-byte alignment*/ - s16 data[MPU6050_AXES_NUM+1]; - -#if defined(CONFIG_MPU6050_LOWPASS) - atomic_t firlen; - atomic_t fir_en; - struct data_filter fir; -#endif - /*early suspend*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -#if INV_GYRO_AUTO_CALI==1 - s16 inv_cali_raw[MPU6050_AXES_NUM+1]; - s16 temperature; - struct mutex temperature_mutex;//for temperature protection - struct mutex raw_data_mutex;//for inv_cali_raw[] protection -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver mpu6050_i2c_driver = { - .driver = { - .name = MPU6050_DEV_NAME, - }, - .probe = mpu6050_i2c_probe, - .remove = mpu6050_i2c_remove, - .detect = mpu6050_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = mpu6050_suspend, - .resume = mpu6050_resume, -#endif - .id_table = mpu6050_i2c_id, -}; - -/*----------------------------------------------------------------------------*/ -static struct i2c_client *mpu6050_i2c_client = NULL; -static struct platform_driver mpu6050_gyro_driver; -static struct mpu6050_i2c_data *obj_i2c_data = NULL; -static bool sensor_power = false; - - - -/*----------------------------------------------------------------------------*/ -#define GYRO_TAG "[Gyroscope] " -#define GYRO_FUN(f) printk(KERN_INFO GYRO_TAG"%s\n", __FUNCTION__) -#define GYRO_ERR(fmt, args...) printk(KERN_ERR GYRO_TAG"%s %d : "fmt, __FUNCTION__, __LINE__, ##args) -#define GYRO_LOG(fmt, args...) printk(KERN_INFO GYRO_TAG fmt, ##args) -/*----------------------------------------------------------------------------*/ - -extern int MPU6050_gse_power(void); -extern int MPU6050_gse_mode(void); - -#ifdef MPU6050_ACCESS_BY_GSE_I2C -extern int MPU6050_i2c_master_send(u8 *buf, u8 len); -extern int MPU6050_i2c_master_recv(u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_block(u8 addr, u8 *buf, u8 len); -extern int MPU6050_hwmsen_read_byte(u8 addr, u8 *buf); -#endif - -static unsigned int power_on = 0; - -int MPU6050_gyro_power(void) -{ - return(power_on); -} -EXPORT_SYMBOL(MPU6050_gyro_power); - -int MPU6050_gyro_mode(void) -{ - return sensor_power; -} -EXPORT_SYMBOL(MPU6050_gyro_mode); - -/*--------------------gyroscopy power control function----------------------------------*/ -static void MPU6050_power(struct gyro_hw *hw, unsigned int on) -{ - - if (hw->power_id != POWER_NONE_MACRO) // have externel LDO - { - GYRO_LOG("power %s\n", on ? "on" : "off"); - if (power_on == on) // power status not change - { - GYRO_LOG("ignore power control: %d\n", on); - } - else if (on) // power on - { - if (!hwPowerOn(hw->power_id, hw->power_vol, "MPU6050GY")) - { - GYRO_ERR("power on fails!!\n"); - } - } - else // power off - { - if (MPU6050_gse_power() == false) - { - if (!hwPowerDown(hw->power_id, "MPU6050GY")) - { - GYRO_ERR("power off fail!!\n"); - } - } - } - } - power_on = on; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_write_rel_calibration(struct mpu6050_i2c_data *obj, int dat[MPU6050_AXES_NUM]) -{ - obj->cali_sw[MPU6050_AXIS_X] = obj->cvt.sign[MPU6050_AXIS_X]*dat[obj->cvt.map[MPU6050_AXIS_X]]; - obj->cali_sw[MPU6050_AXIS_Y] = obj->cvt.sign[MPU6050_AXIS_Y]*dat[obj->cvt.map[MPU6050_AXIS_Y]]; - obj->cali_sw[MPU6050_AXIS_Z] = obj->cvt.sign[MPU6050_AXIS_Z]*dat[obj->cvt.map[MPU6050_AXIS_Z]]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("test (%5d, %5d, %5d) ->(%5d, %5d, %5d)->(%5d, %5d, %5d))\n", - obj->cvt.sign[MPU6050_AXIS_X],obj->cvt.sign[MPU6050_AXIS_Y],obj->cvt.sign[MPU6050_AXIS_Z], - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - obj->cvt.map[MPU6050_AXIS_X],obj->cvt.map[MPU6050_AXIS_Y],obj->cvt.map[MPU6050_AXIS_Z]); - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)\n", - obj->cali_sw[MPU6050_AXIS_X],obj->cali_sw[MPU6050_AXIS_Y],obj->cali_sw[MPU6050_AXIS_Z]); - } -#endif - return 0; -} - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ResetCalibration(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - memset(obj->cali_sw, 0x00, sizeof(obj->cali_sw)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - dat[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - dat[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - dat[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("Read gyro calibration data (%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X],dat[MPU6050_AXIS_Y],dat[MPU6050_AXIS_Z]); - } -#endif - - return 0; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_WriteCalibration(struct i2c_client *client, int dat[MPU6050_AXES_NUM]) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err = 0; - int cali[MPU6050_AXES_NUM]; - - - GYRO_FUN(); - if (!obj || ! dat) - { - GYRO_ERR("null ptr!!\n"); - return -EINVAL; - } - else - { - cali[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->cali_sw[MPU6050_AXIS_X]; - cali[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->cali_sw[MPU6050_AXIS_Y]; - cali[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->cali_sw[MPU6050_AXIS_Z]; - cali[MPU6050_AXIS_X] += dat[MPU6050_AXIS_X]; - cali[MPU6050_AXIS_Y] += dat[MPU6050_AXIS_Y]; - cali[MPU6050_AXIS_Z] += dat[MPU6050_AXIS_Z]; -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_CALI) - { - GYRO_LOG("write gyro calibration data (%5d, %5d, %5d)-->(%5d, %5d, %5d)\n", - dat[MPU6050_AXIS_X], dat[MPU6050_AXIS_Y], dat[MPU6050_AXIS_Z], - cali[MPU6050_AXIS_X],cali[MPU6050_AXIS_Y],cali[MPU6050_AXIS_Z]); - } -#endif - return MPU6050_write_rel_calibration(obj, cali); - } - - return err; -} -/*----------------------------------------------------------------------------*/ - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadStart(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_FIFO_EN; - - if (enable) - { - //enable xyz gyro in FIFO - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); - } - else - { - //disable xyz gyro in FIFO - databuf[1] = 0; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR(" enable xyz gyro in FIFO error,enable: 0x%x!\n", databuf[1]); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050_ReadStart: enable xyz gyro in FIFO: 0x%x\n", databuf[1]); - return MPU6050_SUCCESS; -} - - - -//----------------------------------------------------------------------------// -static int MPU6050_SetPowerMode(struct i2c_client *client, bool enable) -{ - u8 databuf[2] = {0}; - int res = 0; - - if (enable == sensor_power) - { - GYRO_LOG("Sensor power status is newest!\n"); - return MPU6050_SUCCESS; - } - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_PWR_CTL, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_PWR_CTL, databuf)) -#endif - { - GYRO_ERR("read power ctl register err!\n"); - return MPU6050_ERR_I2C; - } - - databuf[0] &= ~MPU6050_SLEEP; - if (enable == FALSE) - { - if (MPU6050_gse_mode() == false) - { - databuf[0] |= MPU6050_SLEEP; - } - } - else - { - // do nothing - } - - - databuf[1] = databuf[0]; - databuf[0] = MPU6050_REG_PWR_CTL; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - - if (res <= 0) - { - GYRO_LOG("set power mode failed!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("set power mode ok %d!\n", enable); - } - msleep(200); - - sensor_power = enable; - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SetDataFormat(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - -static int MPU6050_SetFullScale(struct i2c_client *client, u8 dataformat) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - databuf[0] = MPU6050_REG_GYRO_CFG; - databuf[1] = dataformat; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - return MPU6050_ERR_I2C; - } - - //read sample rate after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_GYRO_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_GYRO_CFG, databuf)) -#endif - { - GYRO_ERR("read data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read data format: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} - - -// set the sample rate -static int MPU6050_SetSampleRate(struct i2c_client *client, int sample_rate) -{ - u8 databuf[2] = {0}; - int rate_div = 0; - int res = 0; - GYRO_FUN(); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_CFG, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_CFG, databuf)) -#endif - { - GYRO_ERR("read gyro data format register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro data format register: 0x%x\n", databuf[0]); - } - - if ((databuf[0] & 0x07) == 0) //Analog sample rate is 8KHz - { - rate_div = 8 * 1024 / sample_rate - 1; - } - else // 1kHz - { - rate_div = 1024 / sample_rate - 1; - } - - if (rate_div > 255) // rate_div: 0 to 255; - { - rate_div = 255; - } - else if (rate_div < 0) - { - rate_div = 0; - } - - databuf[0] = MPU6050_REG_SAMRT_DIV; - databuf[1] = rate_div; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - - //read sample div after written for test - udelay(500); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_byte(MPU6050_REG_SAMRT_DIV, databuf)) -#else - if (hwmsen_read_byte(client, MPU6050_REG_SAMRT_DIV, databuf)) -#endif - { - GYRO_ERR("read gyro sample rate register err!\n"); - return MPU6050_ERR_I2C; - } - else - { - GYRO_LOG("read gyro sample rate: 0x%x\n", databuf[0]); - } - - return MPU6050_SUCCESS; -} -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static int MPU6050_FIFOConfig(struct i2c_client *client, u8 clk) -{ - u8 databuf[2] = {0}; - int res = 0; - GYRO_FUN(); - - //use gyro X, Y or Z for clocking - databuf[0] = MPU6050_REG_PWR_CTL; - databuf[1] = clk; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 use gyro X for clocking OK!\n"); - - mdelay(50); - - //enable xyz gyro in FIFO - databuf[0] = MPU6050_REG_FIFO_EN; - databuf[1] = (MPU6050_FIFO_GYROX_EN|MPU6050_FIFO_GYROY_EN|MPU6050_FIFO_GYROZ_EN); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write Power CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 enable xyz gyro in FIFO OK!\n"); - - //disable AUX_VDDIO - databuf[0] = MPU6050_REG_AUX_VDD; - databuf[1] = MPU6050_AUX_VDDIO_DIS; -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write AUX_VDD register err!\n"); - return MPU6050_ERR_I2C; - } - GYRO_LOG("MPU6050 disable AUX_VDDIO OK!\n"); - - //enable FIFO and reset FIFO - databuf[0] = MPU6050_REG_FIFO_CTL; - databuf[1] = (MPU6050_FIFO_EN | MPU6050_FIFO_RST); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - res = MPU6050_i2c_master_send(databuf, 0x2); -#else - res = i2c_master_send(client, databuf, 0x2); -#endif - if (res <= 0) - { - GYRO_ERR("write FIFO CTRL register err!\n"); - return MPU6050_ERR_I2C; - } - - GYRO_LOG("MPU6050_FIFOConfig OK!\n"); - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadFifoData(struct i2c_client *client, s16 *data, int* datalen) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - u8 buf[MPU6050_DATA_LEN] = {0}; - s16 tmp1[MPU6050_AXES_NUM] = {0}; - s16 tmp2[MPU6050_AXES_NUM] = {0}; - int err = 0; - u8 tmp = 0; - int packet_cnt = 0; - int i; - GYRO_FUN(); - - if (NULL == client) - { - return -EINVAL; - } - - //stop putting data in FIFO - MPU6050_ReadStart(client, FALSE); - - //read data number of bytes in FIFO -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTH, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTH, &tmp); -#endif - if (err) - { - GYRO_ERR("read data high number of bytes error: %d\n", err); - return -1; - } - packet_cnt = tmp<< 8; - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - err = MPU6050_hwmsen_read_byte(MPU6050_REG_FIFO_CNTL, &tmp); -#else - err = hwmsen_read_byte(client, MPU6050_REG_FIFO_CNTL, &tmp); -#endif - if (err) - { - GYRO_ERR("read data low number of bytes error: %d\n", err); - return -1; - } - packet_cnt = (packet_cnt + tmp) /MPU6050_DATA_LEN; - - GYRO_LOG("MPU6050 Read Data packet number OK: %d\n", packet_cnt); - - *datalen = packet_cnt; - - //Within +-5% range: timing_tolerance * packet_thresh=0.05*75 - if (packet_cnt && (abs(packet_thresh -packet_cnt) < 4)) - { - //read data in FIFO - for (i = 0; i < packet_cnt; i++) - { -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#else - if (hwmsen_read_block(client, MPU6050_REG_FIFO_DATA, buf, MPU6050_DATA_LEN)) -#endif - { - GYRO_ERR("MPU6050 read data from FIFO error: %d\n", err); - return -2; - } - else - { - GYRO_LOG("MPU6050 read Data of diff address from FIFO OK !\n"); - } - - tmp1[MPU6050_AXIS_X] = (s16)((buf[MPU6050_AXIS_X*2+1]) | (buf[MPU6050_AXIS_X*2] << 8)); - tmp1[MPU6050_AXIS_Y] = (s16)((buf[MPU6050_AXIS_Y*2+1]) | (buf[MPU6050_AXIS_Y*2] << 8)); - tmp1[MPU6050_AXIS_Z] = (s16)((buf[MPU6050_AXIS_Z*2+1]) | (buf[MPU6050_AXIS_Z*2] << 8)); - - //remap coordinate// - tmp2[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*tmp1[MPU6050_AXIS_X]; - tmp2[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*tmp1[MPU6050_AXIS_Y]; - tmp2[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*tmp1[MPU6050_AXIS_Z]; - - data[3* i +MPU6050_AXIS_X] = tmp2[MPU6050_AXIS_X]; - data[3* i +MPU6050_AXIS_Y] = tmp2[MPU6050_AXIS_Y]; - data[3* i +MPU6050_AXIS_Z] = tmp2[MPU6050_AXIS_Z]; - - GYRO_LOG("gyro FIFO packet[%d]:[%04X %04X %04X] => [%5d %5d %5d]\n", i, - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z], - data[3*i +MPU6050_AXIS_X], data[3*i +MPU6050_AXIS_Y], data[3*i +MPU6050_AXIS_Z]); - } - - } - else - { - GYRO_ERR("MPU6050 Incorrect packet count: %d\n", packet_cnt); - return -3; - } - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroData(struct i2c_client *client, char *buf, int bufsize) -{ - char databuf[6]; - int data[3]; - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - if (atomic_read(&obj->suspend)) - { - return -3; - } - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - -#if INV_GYRO_AUTO_CALI==1 -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_TEMPH, databuf, 2)) -#else - if (hwmsen_read_block(client, MPU6050_REG_TEMPH, databuf, 2)) -#endif - { - GYRO_ERR("MPU6050 read temperature data error\n"); - return -2; - } - else - { - mutex_lock(&obj->temperature_mutex); - obj->temperature = ((s16)((databuf[1]) | (databuf[0] << 8))); - mutex_unlock(&obj->temperature_mutex); - } -#endif - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - if (MPU6050_hwmsen_read_block(MPU6050_REG_GYRO_XH, databuf, 6)) -#else - if (hwmsen_read_block(client, MPU6050_REG_GYRO_XH, databuf, 6)) -#endif - { - GYRO_ERR("MPU6050 read gyroscope data error\n"); - return -2; - } - else - { - obj->data[MPU6050_AXIS_X] = ((s16)((databuf[MPU6050_AXIS_X*2+1]) | (databuf[MPU6050_AXIS_X*2] << 8))); - obj->data[MPU6050_AXIS_Y] = ((s16)((databuf[MPU6050_AXIS_Y*2+1]) | (databuf[MPU6050_AXIS_Y*2] << 8))); - obj->data[MPU6050_AXIS_Z] = ((s16)((databuf[MPU6050_AXIS_Z*2+1]) | (databuf[MPU6050_AXIS_Z*2] << 8))); -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_RAWDATA) - { - GYRO_LOG("read gyro register: %d, %d, %d, %d, %d, %d", - databuf[0], databuf[1], databuf[2], databuf[3], databuf[4], databuf[5]); - GYRO_LOG("get gyro raw data (0x%08X, 0x%08X, 0x%08X) -> (%5d, %5d, %5d)\n", - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z], - obj->data[MPU6050_AXIS_X],obj->data[MPU6050_AXIS_Y],obj->data[MPU6050_AXIS_Z]); - } -#endif -#if INV_GYRO_AUTO_CALI==1 - mutex_lock(&obj->raw_data_mutex); - /*remap coordinate*/ - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - obj->inv_cali_raw[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - mutex_unlock(&obj->raw_data_mutex); -#endif - obj->data[MPU6050_AXIS_X] = obj->data[MPU6050_AXIS_X] + obj->cali_sw[MPU6050_AXIS_X]; - obj->data[MPU6050_AXIS_Y] = obj->data[MPU6050_AXIS_Y] + obj->cali_sw[MPU6050_AXIS_Y]; - obj->data[MPU6050_AXIS_Z] = obj->data[MPU6050_AXIS_Z] + obj->cali_sw[MPU6050_AXIS_Z]; - - /*remap coordinate*/ - data[obj->cvt.map[MPU6050_AXIS_X]] = obj->cvt.sign[MPU6050_AXIS_X]*obj->data[MPU6050_AXIS_X]; - data[obj->cvt.map[MPU6050_AXIS_Y]] = obj->cvt.sign[MPU6050_AXIS_Y]*obj->data[MPU6050_AXIS_Y]; - data[obj->cvt.map[MPU6050_AXIS_Z]] = obj->cvt.sign[MPU6050_AXIS_Z]*obj->data[MPU6050_AXIS_Z]; - - //Out put the degree/second(o/s) - data[MPU6050_AXIS_X] = data[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Y] = data[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - data[MPU6050_AXIS_Z] = data[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - - - } - - sprintf(buf, "%04x %04x %04x", data[MPU6050_AXIS_X],data[MPU6050_AXIS_Y],data[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro data packet:[%d %d %d]\n", data[0], data[1], data[2]); - } -#endif - - return 0; - -} - -//for factory mode -static int MPU6050_PROCESS_SMT_DATA(struct i2c_client *client, short *data) -{ - int total_num = 0; - int retval =0; - long xSum = 0; - long ySum = 0; - long zSum = 0; - long xAvg, yAvg, zAvg; - long xRMS, yRMS, zRMS; - int i=0; - - int bias_thresh = 5242; // 40 dps * 131.072 LSB/dps - //float RMS_thresh = 687.19f; // (.2 dps * 131.072) ^ 2 - long RMS_thresh = 68719; // (.2 dps * 131.072) ^ 2 - - total_num = data[0]; - retval = data[1]; - GYRO_LOG("MPU6050 read gyro data OK, total number: %d \n", total_num); - for (i = 0; i < total_num; i++) - { - xSum =xSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2]; - ySum =ySum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2]; - zSum =zSum + data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]; - - /* - FLPLOGD("read gyro data OK: packet_num:%d, [X:%5d, Y:%5d, Z:%5d]\n", i, data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y +2], data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z +2]); - FLPLOGD("MPU6050 xSum: %5d, ySum: %5d, zSum: %5d \n", xSum, ySum, zSum); - */ - - } - GYRO_LOG("MPU6050 xSum: %5ld, ySum: %5ld, zSum: %5ld \n", xSum, ySum, zSum); - - if (total_num != 0) - { - xAvg = (xSum / total_num); - yAvg = (ySum / total_num); - zAvg = (zSum / total_num); - } - else - { - xAvg = xSum; - yAvg = ySum; - zAvg = zSum; - } - - GYRO_LOG("MPU6050 xAvg: %ld, yAvg: %ld, zAvg: %ld \n", xAvg, yAvg, zAvg); - - if ( abs(xAvg) >bias_thresh) - { - GYRO_LOG("X-Gyro bias exceeded threshold \n"); - retval |= 1 << 3; - } - if ( abs(yAvg) > bias_thresh) - { - GYRO_LOG("Y-Gyro bias exceeded threshold \n"); - retval |= 1 << 4; - } - if ( abs(zAvg ) > bias_thresh) - { - GYRO_LOG("Z-Gyro bias exceeded threshold \n"); - retval |= 1 << 5; - } - - xRMS = 0; - yRMS = 0; - zRMS = 0; - - //Finally, check RMS - for ( i = 0; i < total_num ; i++) - { - xRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_X+2]-xAvg); - yRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Y+2]-yAvg); - zRMS += (data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg)*(data[MPU6050_AXES_NUM*i + MPU6050_AXIS_Z+2]-zAvg); - } - - GYRO_LOG("MPU6050 xRMS: %ld, yRMS: %ld, zRMS: %ld \n", xRMS, yRMS, zRMS); - xRMS = 100*xRMS; - yRMS = 100*yRMS; - zRMS = 100*zRMS; - - if (FACTORY_BOOT == get_boot_mode()) - return retval; - if ( xRMS > RMS_thresh * total_num) - { - GYRO_LOG("X-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 6; - } - if ( yRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Y-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 7; - } - if ( zRMS > RMS_thresh * total_num ) - { - GYRO_LOG("Z-Gyro RMS exceeded threshold, RMS_thresh: %ld \n", RMS_thresh * total_num); - retval |= 1 << 8; - } - if ( xRMS == 0 || yRMS == 0 || zRMS == 0) - //If any of the RMS noise value returns zero, then we might have dead gyro or FIFO/register failure - retval |= 1 << 9; - GYRO_LOG("retval %d \n", retval); - return retval; - -} - - - -/*----------------------------------------------------------------------------*/ -static int MPU6050_SMTReadSensorData(struct i2c_client *client, s16 *buf, int bufsize) -{ - //S16 gyro[MPU6050_AXES_NUM*MPU6050_FIFOSIZE]; - int res = 0; - int i; - int datalen, total_num= 0; - - GYRO_FUN(); - - if (sensor_power == false) - { - MPU6050_SetPowerMode(client, true); - } - - if (NULL == buf) - { - return -1; - } - if (NULL == client) - { - *buf = 0; - return -2; - } - - for (i = 0; i < MPU6050_AXES_NUM; i++) - { - res = MPU6050_FIFOConfig(client, (i+1)); - if (res) - { - GYRO_ERR("MPU6050_FIFOConfig error:%d!\n", res); - return -3; - } - - //putting data in FIFO during the delayed 600ms - mdelay(600); - - res = MPU6050_ReadFifoData(client, &(buf[total_num+2]), &datalen); - if (res) - { - if (res == (-3)) - { - buf[1] = (1<< i); - } - else - { - GYRO_ERR("MPU6050_ReadData error:%d!\n", res); - return -3; - } - } - else - { - buf[0] = datalen; - total_num+=datalen*MPU6050_AXES_NUM; - } - } - - GYRO_LOG("gyroscope read data OK, total packet: %d", buf[0] ); - - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadChipInfo(struct i2c_client *client, char *buf, int bufsize) -{ - u8 databuf[10]; - - memset(databuf, 0, sizeof(u8)*10); - - if ((NULL == buf)||(bufsize<=30)) - { - return -1; - } - - if (NULL == client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "MPU6050 Chip"); - return 0; -} - -#if INV_GYRO_AUTO_CALI==1 -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadGyroDataRaw(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->raw_data_mutex); - //return gyro raw LSB in device orientation - sprintf(buf, "%x %x %x", obj->inv_cali_raw[MPU6050_AXIS_X],obj->inv_cali_raw[MPU6050_AXIS_Y],obj->inv_cali_raw[MPU6050_AXIS_Z]); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro raw data packet:[%d %d %d]\n", obj->inv_cali_raw[0], obj->inv_cali_raw[1], obj->inv_cali_raw[2]); - } -#endif - mutex_unlock(&obj->raw_data_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadTemperature(struct i2c_client *client, char *buf, int bufsize) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - - mutex_lock(&obj->temperature_mutex); - sprintf(buf, "%x", obj->temperature); - -#if DEBUG - if (atomic_read(&obj->trace) & GYRO_TRC_DATA) - { - GYRO_LOG("get gyro temperature:[%d]\n", obj->temperature); - } -#endif - mutex_unlock(&obj->temperature_mutex); - - return 0; - -} - -/*----------------------------------------------------------------------------*/ -static int MPU6050_ReadPowerStatus(struct i2c_client *client, char *buf, int bufsize) -{ -#if DEBUG - GYRO_LOG("get gyro PowerStatus:[%d]\n", sensor_power); -#endif - - sprintf(buf, "%x", sensor_power); - - return 0; - -} -#endif - -/*----------------------------------------------------------------------------*/ -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadChipInfo(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = mpu6050_i2c_client; - char strbuf[MPU6050_BUFSIZE]; - - if (NULL == client) - { - GYRO_ERR("i2c client is null!!\n"); - return 0; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - return snprintf(buf, PAGE_SIZE, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct mpu6050_i2c_data *obj = obj_i2c_data; - int trace; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - GYRO_ERR("invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - ssize_t len = 0; - struct mpu6050_i2c_data *obj = obj_i2c_data; - if (obj == NULL) - { - GYRO_ERR("i2c_data obj is null!!\n"); - return 0; - } - - if (obj->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - obj->hw->i2c_num, obj->hw->direction, obj->hw->power_id, obj->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - return len; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(trace, S_IWUSR | S_IRUGO, show_trace_value, store_trace_value); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *MPU6050_attr_list[] = { - &driver_attr_chipinfo, /*chip information*/ - &driver_attr_sensordata, /*dump sensor data*/ - &driver_attr_trace, /*trace log*/ - &driver_attr_status, -}; -/*----------------------------------------------------------------------------*/ -static int mpu6050_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for (idx = 0; idx < num; idx++) - { - if (0 != (err = driver_create_file(driver, MPU6050_attr_list[idx]))) - { - GYRO_ERR("driver_create_file (%s) = %d\n", MPU6050_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(MPU6050_attr_list)/sizeof(MPU6050_attr_list[0])); - - if (driver == NULL) - { - return -EINVAL; - } - - - for (idx = 0; idx < num; idx++) - { - driver_remove_file(driver, MPU6050_attr_list[idx]); - } - - - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_gpio_config(void) -{ - //because we donot use EINT ,to support low power - // config to GPIO input mode + PD - //set GPIO_MSE_EINT_PIN - mt_set_gpio_mode(GPIO_GYRO_EINT_PIN, GPIO_GYRO_EINT_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_GYRO_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_GYRO_EINT_PIN, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(GPIO_GYRO_EINT_PIN, GPIO_PULL_DOWN); - return 0; -} -static int mpu6050_init_client(struct i2c_client *client, bool enable) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int res = 0; - bool sensor_power_org; - - GYRO_FUN(); - mpu6050_gpio_config(); - - sensor_power_org = sensor_power; - res = MPU6050_SetPowerMode(client, true); - if (res != MPU6050_SUCCESS) - { - return res; - } - - - - // The range should at least be 17.45 rad/s (ie: ~1000 deg/s). - res = MPU6050_SetDataFormat(client, (MPU6050_SYNC_GYROX << MPU6050_EXT_SYNC)| - MPU6050_RATE_1K_LPFB_188HZ); - - res = MPU6050_SetFullScale(client, (MPU6050_DEFAULT_FS << MPU6050_FS_RANGE)); - if (res != MPU6050_SUCCESS) - { - return res; - } - - // Set 125HZ sample rate - res = MPU6050_SetSampleRate(client, 125); - if (res != MPU6050_SUCCESS ) - { - return res; - } - - res = MPU6050_SetPowerMode(client, sensor_power_org); - if (res != MPU6050_SUCCESS) - { - return res; - } - - GYRO_LOG("mpu6050_init_client OK!\n"); - -#ifdef CONFIG_MPU6050_LOWPASS - memset(&obj->fir, 0x00, sizeof(obj->fir)); -#endif - - return MPU6050_SUCCESS; -} - -/*----------------------------------------------------------------------------*/ -int mpu6050_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - struct mpu6050_i2c_data *priv = (struct mpu6050_i2c_data*)self; - hwm_sensor_data* gyro_data; - char buff[MPU6050_BUFSIZE]; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - - } - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GYRO_ERR("Enable gyroscope parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if (((value == 0) && (sensor_power == false)) ||((value == 1) && (sensor_power == true))) - { - GYRO_LOG("gyroscope device have updated!\n"); - } - else - { - err = MPU6050_SetPowerMode(priv->client, !sensor_power); - } - } - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - GYRO_ERR("get gyroscope data parameter error!\n"); - err = -EINVAL; - } - else - { - gyro_data = (hwm_sensor_data *)buff_out; - err = MPU6050_ReadGyroData(priv->client, buff, MPU6050_BUFSIZE); - if(!err) - { - sscanf(buff, "%x %x %x", &gyro_data->values[0], - &gyro_data->values[1], &gyro_data->values[2]); - gyro_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - gyro_data->value_divide = DEGREE_TO_RAD; - } - } - break; - default: - GYRO_ERR("gyroscope operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/****************************************************************************** - * Function Configuration -******************************************************************************/ -static int mpu6050_open(struct inode *inode, struct file *file) -{ - file->private_data = mpu6050_i2c_client; - - if (file->private_data == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - return nonseekable_open(inode, file); -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_release(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} -/*----------------------------------------------------------------------------*/ -static long mpu6050_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct i2c_client *client = (struct i2c_client*)file->private_data; - char strbuf[MPU6050_BUFSIZE] = {0}; - s16 *SMTdata; - void __user *data; - long err = 0; - int copy_cnt = 0; - SENSOR_DATA sensor_data; - int cali[3]; - int smtRes=0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case GYROSCOPE_IOCTL_INIT: - mpu6050_init_client(client, false); - break; - - case GYROSCOPE_IOCTL_SMT_DATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - SMTdata = kzalloc(sizeof(*SMTdata) * 800, GFP_KERNEL); - if (SMTdata == NULL) - { - err = -ENOMEM; - break; - } - memset(SMTdata, 0, sizeof(*SMTdata) * 800); - MPU6050_SMTReadSensorData(client, SMTdata, 800); - - GYRO_LOG("gyroscope read data from kernel OK: SMTdata[0]:%d, copied packet:%d!\n", SMTdata[0], - ((SMTdata[0]*MPU6050_AXES_NUM+2)*sizeof(s16)+1)); - - smtRes = MPU6050_PROCESS_SMT_DATA(client,SMTdata); - GYRO_LOG("ioctl smtRes: %d!\n", smtRes); - copy_cnt = copy_to_user(data, &smtRes, sizeof(smtRes)); - kfree(SMTdata); - if (copy_cnt) - { - err = -EFAULT; - GYRO_ERR("copy gyro data to user failed!\n"); - } - GYRO_LOG("copy gyro data to user OK: %d!\n", copy_cnt); - break; - - case GYROSCOPE_IOCTL_READ_SENSORDATA: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroData(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_SET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - - else - { - cali[MPU6050_AXIS_X] = sensor_data.x * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Y] = sensor_data.y * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - cali[MPU6050_AXIS_Z] = sensor_data.z * MPU6050_DEFAULT_LSB / MPU6050_FS_MAX_LSB; - GYRO_LOG("gyro set cali:[%5d %5d %5d]\n", - cali[MPU6050_AXIS_X], cali[MPU6050_AXIS_Y], cali[MPU6050_AXIS_Z]); - err = MPU6050_WriteCalibration(client, cali); - } - break; - - case GYROSCOPE_IOCTL_CLR_CALI: - err = MPU6050_ResetCalibration(client); - break; - - case GYROSCOPE_IOCTL_GET_CALI: - data = (void __user*)arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - err = MPU6050_ReadCalibration(client, cali); - if (err) - { - break; - } - - sensor_data.x = cali[MPU6050_AXIS_X] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.y = cali[MPU6050_AXIS_Y] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - sensor_data.z = cali[MPU6050_AXIS_Z] * MPU6050_FS_MAX_LSB / MPU6050_DEFAULT_LSB; - if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) - { - err = -EFAULT; - break; - } - break; - -#if INV_GYRO_AUTO_CALI==1 - case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadGyroDataRaw(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_READ_TEMPERATURE: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadTemperature(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; - - case GYROSCOPE_IOCTL_GET_POWER_STATUS: - data = (void __user *) arg; - if (data == NULL) - { - err = -EINVAL; - break; - } - - MPU6050_ReadPowerStatus(client, strbuf, MPU6050_BUFSIZE); - if (copy_to_user(data, strbuf, sizeof(strbuf))) - { - err = -EFAULT; - break; - } - break; -#endif - - default: - GYRO_ERR("unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - } - return err; -} - - -/*----------------------------------------------------------------------------*/ -static struct file_operations mpu6050_fops = { - .open = mpu6050_open, - .release = mpu6050_release, - .unlocked_ioctl = mpu6050_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice mpu6050_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "gyroscope", - .fops = &mpu6050_fops, -}; -/*----------------------------------------------------------------------------*/ -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int mpu6050_suspend(struct i2c_client *client, pm_message_t msg) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - GYRO_FUN(); - - if (msg.event == PM_EVENT_SUSPEND) - { - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - atomic_set(&obj->suspend, 1); - - err = MPU6050_SetPowerMode(client, false); - if (err <= 0) - { - return err; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_resume(struct i2c_client *client) -{ - struct mpu6050_i2c_data *obj = i2c_get_clientdata(client); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return -EINVAL; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(client, false); - if (err) - { - GYRO_ERR("initialize client fail!!\n"); - return err; - } - atomic_set(&obj->suspend, 0); - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void mpu6050_early_suspend(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - //u8 databuf[2]; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - atomic_set(&obj->suspend, 1); - err = MPU6050_SetPowerMode(obj->client, false); - if (err) - { - GYRO_ERR("write power control fail!!\n"); - return; - } - - sensor_power = false; - - MPU6050_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void mpu6050_late_resume(struct early_suspend *h) -{ - struct mpu6050_i2c_data *obj = container_of(h, struct mpu6050_i2c_data, early_drv); - int err; - GYRO_FUN(); - - if (obj == NULL) - { - GYRO_ERR("null pointer!!\n"); - return; - } - - MPU6050_power(obj->hw, 1); - err = mpu6050_init_client(obj->client, false); - if (err) - { - GYRO_ERR("initialize client fail! err code %d!\n", err); - return; - } - atomic_set(&obj->suspend, 0); -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, MPU6050_DEV_NAME); - return 0; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct mpu6050_i2c_data *obj; - struct hwmsen_object sobj; - int err = 0; - GYRO_FUN(); - - if (!(obj = kzalloc(sizeof(*obj), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - - memset(obj, 0, sizeof(struct mpu6050_i2c_data)); - - obj->hw = get_cust_gyro_hw(); - err = hwmsen_get_convert(obj->hw->direction, &obj->cvt); - if (err) - { - GYRO_ERR("invalid direction: %d\n", obj->hw->direction); - goto exit; - } - - - GYRO_LOG("gyro_default_i2c_addr: %x\n", client->addr); -#ifdef MPU6050_ACCESS_BY_GSE_I2C - obj->hw->addr = MPU6050_I2C_SLAVE_ADDR; /* mtk i2c not allow to probe two same address */ -#endif - - GYRO_LOG("gyro_custom_i2c_addr: %x\n", obj->hw->addr); - if (0!=obj->hw->addr) - { - client->addr = obj->hw->addr >> 1; - GYRO_LOG("gyro_use_i2c_addr: %x\n", client->addr); - } - - obj_i2c_data = obj; - obj->client = client; - new_client = obj->client; - i2c_set_clientdata(new_client,obj); - - atomic_set(&obj->trace, 0); - atomic_set(&obj->suspend, 0); - - - - mpu6050_i2c_client = new_client; - err = mpu6050_init_client(new_client, false); - if (err) - { - goto exit_init_failed; - } - - - err = misc_register(&mpu6050_device); - if (err) - { - GYRO_ERR("mpu6050_device misc register failed!\n"); - goto exit_misc_device_register_failed; - } - - err = mpu6050_create_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050 create attribute err = %d\n", err); - goto exit_create_attr_failed; - } - - - sobj.self = obj; - sobj.polling = 1; - sobj.sensor_operate = mpu6050_operate; - err = hwmsen_attach(ID_GYROSCOPE, &sobj); - if (err) - { - GYRO_ERR("hwmsen_attach fail = %d\n", err); - goto exit_kfree; - } - - -#ifdef CONFIG_HAS_EARLYSUSPEND - obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - obj->early_drv.suspend = mpu6050_early_suspend, - obj->early_drv.resume = mpu6050_late_resume, - register_early_suspend(&obj->early_drv); -#endif - -#if INV_GYRO_AUTO_CALI==1 - mutex_init(&obj->temperature_mutex); - mutex_init(&obj->raw_data_mutex); -#endif - - GYRO_LOG("%s: OK\n", __func__); - return 0; - - exit_create_attr_failed: - misc_deregister(&mpu6050_device); - exit_misc_device_register_failed: - exit_init_failed: - //i2c_detach_client(new_client); - exit_kfree: - kfree(obj); - exit: - GYRO_ERR("%s: err = %d\n", __func__, err); - return err; -} - -/*----------------------------------------------------------------------------*/ -static int mpu6050_i2c_remove(struct i2c_client *client) -{ - int err = 0; - - err = mpu6050_delete_attr(&mpu6050_gyro_driver.driver); - if (err) - { - GYRO_ERR("mpu6050_delete_attr fail: %d\n", err); - } - - err = misc_deregister(&mpu6050_device); - if (err) - { - GYRO_ERR("misc_deregister fail: %d\n", err); - } - - err = hwmsen_detach(ID_ACCELEROMETER); - if (err) - { - GYRO_ERR("hwmsen_detach fail: %d\n", err); - } - - mpu6050_i2c_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_probe(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 1); - if (i2c_add_driver(&mpu6050_i2c_driver)) - { - GYRO_ERR("add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mpu6050_remove(struct platform_device *pdev) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_FUN(); - MPU6050_power(hw, 0); - i2c_del_driver(&mpu6050_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct platform_driver mpu6050_gyro_driver = { - .probe = mpu6050_probe, - .remove = mpu6050_remove, - .driver = { - .name = "gyroscope", - } -}; - -/*----------------------------------------------------------------------------*/ -static int __init mpu6050_init(void) -{ - struct gyro_hw *hw = get_cust_gyro_hw(); - GYRO_LOG("%s: i2c_number=%d\n", __func__,hw->i2c_num); - i2c_register_board_info(hw->i2c_num, &i2c_mpu6050, 1); - if (platform_driver_register(&mpu6050_gyro_driver)) - { - GYRO_ERR("failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit mpu6050_exit(void) -{ - GYRO_FUN(); - platform_driver_unregister(&mpu6050_gyro_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(mpu6050_init); -module_exit(mpu6050_exit); -/*----------------------------------------------------------------------------*/ -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MPU6050 gyroscope driver"); -MODULE_AUTHOR("Yucong.Xiong@mediatek.com"); diff --git a/arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.h b/arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.h deleted file mode 100644 index 1f5f2164f2f..00000000000 --- a/arch/arm/mach-mt8127/ttab/gyroscope/mpu6050.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef MPU6050_H -#define MPU6050_H - -#include - -#define MPU6050_ACCESS_BY_GSE_I2C - -#ifdef MPU6050_ACCESS_BY_GSE_I2C - #define MPU6050_I2C_SLAVE_ADDR (0xD2) /* mtk i2c not allow to probe two same address */ -#else - #define MPU6050_I2C_SLAVE_ADDR 0xD0 -#endif - - -/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */ - -#define MPU6050_REG_DEVID 0x75 -#define MPU6050_REG_FIFO_EN 0x23 -#define MPU6050_REG_AUX_VDD 0x01 - -#define MPU6050_REG_SAMRT_DIV 0x19 -#define MPU6050_REG_CFG 0x1A //set external sync, full-scale range and sample rate, low pass filter bandwidth -#define MPU6050_REG_GYRO_CFG 0x1B // full-scale range and sample rate, - - -#define MPU6050_REG_GYRO_XH 0x43 - -#define MPU6050_REG_TEMPH 0x41 - - -#define MPU6050_REG_FIFO_CNTH 0x72 -#define MPU6050_REG_FIFO_CNTL 0x73 -#define MPU6050_REG_FIFO_DATA 0x74 -#define MPU6050_REG_FIFO_CTL 0x6A -#define MPU6050_REG_PWR_CTL 0x6B -#define MPU6050_REG_PWR_CTL2 0x6C - - -/*MPU6050 Register Bit definitions*/ - -#define MPU6050_FIFO_GYROX_EN 0x40 //insert the X Gyro data into FIFO -#define MPU6050_FIFO_GYROY_EN 0x20 //insert the Y Gyro data into FIFO -#define MPU6050_FIFO_GYROZ_EN 0x10 //insert the Z Gyro data into FIFO - -#define MPU6050_AUX_VDDIO_DIS 0x00 //disable VDD level for the secondary I2C bus clock and data lines - -// for MPU6050_REG_CFG -#define MPU6050_EXT_SYNC 0x03 //0x05 //captue the state of external frame sync input pin to insert into LSB of registers -#define MPU6050_SYNC_GYROX 0x02 - -// for MPU6050_REG_GYRO_CFG -#define MPU6050_FS_RANGE 0x03 //set the full-scale range of the gyro sensors -#define MPU6050_FS_1000 0x02 - - -#define MPU6050_FS_1000_LSB 33 -#define MPU6050_FS_MAX_LSB 131 - -#define MPU6050_RATE_1K_LPFB_188HZ 0x01 -#define MPU6050_RATE_1K_LPFB_256HZ 0x00 - -#define MPU6050_FIFO_EN 0x40 //enable FIFO operation for sensor data - -#define MPU6050_FIFO_RST 0x40 //reset FIFO function - -#define MPU6050_SLEEP 0x40 //enable low power sleep mode - - -#define MPU6050_SUCCESS 0 -#define MPU6050_ERR_I2C -1 -#define MPU6050_ERR_STATUS -3 -#define MPU6050_ERR_SETUP_FAILURE -4 -#define MPU6050_ERR_GETGSENSORDATA -5 -#define MPU6050_ERR_IDENTIFICATION -6 - - -#define MPU6050_BUFSIZE 60 - -// 1 rad = 180/PI degree, MAX_LSB = 131, -// 180*131/PI = 7506 -#define DEGREE_TO_RAD 7506 - -#endif //MPU6050_H - diff --git a/arch/arm/mach-mt8127/ttab/hdmi/Makefile b/arch/arm/mach-mt8127/ttab/hdmi/Makefile deleted file mode 100644 index 0672c01f00d..00000000000 --- a/arch/arm/mach-mt8127/ttab/hdmi/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := hdmi_cust.o - diff --git a/arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.c b/arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.c deleted file mode 100644 index 3589ca26698..00000000000 --- a/arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#include -#include -#include - -/****************************************************************** -** Basic define -******************************************************************/ -#ifndef s32 - #define s32 signed int -#endif -#ifndef s64 - #define s64 signed long long -#endif - -static bool cust_power_on = false; -int cust_hdmi_power_on(int on) -{ -/* - if(on > 0) - { - printk("MHL_Power power %x, rst %x \n" ,GPIO_MHL_POWER_CTRL_PIN, GPIO_MHL_RST_B_PIN); - mt_set_gpio_mode(GPIO_MHL_POWER_CTRL_PIN, GPIO_MODE_00); - mt_set_gpio_dir(GPIO_MHL_POWER_CTRL_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_MHL_POWER_CTRL_PIN, GPIO_OUT_ONE); -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == false) - { - hwPowerOn(PMIC_APP_MHL_POWER_LDO1, VOL_1200,"MHL"); - cust_power_on = true; - } -#else - printk("Error: PMIC_APP_MHL_POWER_LDO1 not defined -\n" ); -#endif - } - else - { -#ifdef PMIC_APP_MHL_POWER_LDO1 - if(cust_power_on == true) - { - hwPowerDown(PMIC_APP_MHL_POWER_LDO1, "MHL"); - cust_power_on = false; - } -#endif - } -*/ - return 0; -} - - -int cust_hdmi_dpi_gpio_on(int on) -{ -/* - unsigned int dpi_pin_start = 0; - if(on > 0) - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_01); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined+ %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#else - printk("%s,%d Error: GPIO_EXT_DISP_DPI0_PIN is not defined\n", __func__, __LINE__); -#endif - - } - else - { -#ifdef GPIO_EXT_DISP_DPI0_PIN - for(dpi_pin_start = GPIO_EXT_DISP_DPI0_PIN; dpi_pin_start < GPIO_EXT_DISP_DPI0_PIN + 16; dpi_pin_start++) - { - mt_set_gpio_mode(dpi_pin_start, GPIO_MODE_00); - mt_set_gpio_dir(dpi_pin_start, GPIO_DIR_IN); - mt_set_gpio_pull_enable(dpi_pin_start, GPIO_PULL_ENABLE); - mt_set_gpio_pull_select(dpi_pin_start, GPIO_PULL_DOWN); - } - printk("%s, %d GPIO_EXT_DISP_DPI0_PIN is defined- %x\n", __func__, __LINE__, GPIO_EXT_DISP_DPI0_PIN); -#endif - } -*/ - return 0; -} - -int cust_hdmi_i2s_gpio_on(int on) -{ -/* - if(on > 0) - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MHL_I2S_OUT_WS_PIN_M_I2S3_WS); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MHL_I2S_OUT_CK_PIN_M_I2S3_BCK); - mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MHL_I2S_OUT_DAT_PIN_M_I2S3_DO); -#else - printk("%s,%d Error. GPIO_MHL_I2S_OUT_WS_PIN is not defined\n", __func__, __LINE__); -#endif - } - else - { -#ifdef GPIO_MHL_I2S_OUT_WS_PIN - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_PULL_DISABLE); - mt_set_gpio_pull_enable(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_PULL_DISABLE); -#endif - } -*/ - return 0; -} - -int get_hdmi_i2c_addr(void) -{ -// return (SII_I2C_ADDR); - return 0; -} - -int get_hdmi_i2c_channel(void) -{ -// return (HDMI_I2C_CHANNEL); - return 0; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.h b/arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.h deleted file mode 100644 index 6ee8f0cecdd..00000000000 --- a/arch/arm/mach-mt8127/ttab/hdmi/hdmi_cust.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************************************************* - * - * Filename: - * --------- - * hdmi_customization.h - * - * Project: - * -------- - * Android - * - * Description: - * ------------ - * This file implements Customization base function - * - *******************************************************************************/ - -#ifndef HDMI_CUSTOMIZATION_H -#define HDMI_CUSTOMIZATION_H - -/****************************************************************** -** scale adjustment -******************************************************************/ -/* -#define USING_SCALE_ADJUSTMENT - -///if mhl chip CI2CA pin is pull up, the folloing should be defined. otherwise, please mask it. -#define SII_I2C_ADDR (0x72) -#define HDMI_I2C_CHANNEL 3 -*/ - - - -/****************************************************************** -** MHL GPIO Customization -******************************************************************/ -//#define MHL_PHONE_GPIO_REUSAGE -void ChangeGPIOToI2S(); -void ChangeI2SToGPIO(); - -int cust_hdmi_power_on(int on); - -int cust_hdmi_dpi_gpio_on(int on); - -int cust_hdmi_i2s_gpio_on(int on); - -int get_hdmi_i2c_addr(void); - -int get_hdmi_i2c_channel(void); - - -#endif diff --git a/arch/arm/mach-mt8127/ttab/hdmi/inc/hdmi_drv.h b/arch/arm/mach-mt8127/ttab/hdmi/inc/hdmi_drv.h deleted file mode 100644 index beb48034122..00000000000 --- a/arch/arm/mach-mt8127/ttab/hdmi/inc/hdmi_drv.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef __HDMI_DRV_H__ -#define __HDMI_DRV_H__ - -#ifdef CONFIG_MTK_MT8193_HDMI_SUPPORT - -#include "mt8193hdmictrl.h" -#include "mt8193edid.h" -#include "mt8193cec.h" - -#define AVD_TMR_ISR_TICKS 5 -#define MDI_BOUCING_TIMING 50//20 //20ms - -typedef enum -{ - HDMI_CEC_CMD=0, - HDMI_PLUG_DETECT_CMD, - HDMI_HDCP_PROTOCAL_CMD, - HDMI_DISABLE_HDMI_TASK_CMD, - MAX_HDMI_TMR_NUMBER - -}HDMI_TASK_COMMAND_TYPE_T; - -#endif - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -typedef enum -{ - HDMI_POLARITY_RISING = 0, - HDMI_POLARITY_FALLING = 1 -}HDMI_POLARITY; - -typedef enum -{ - HDMI_CLOCK_PHASE_0 = 0, - HDMI_CLOCK_PHASE_90 = 1 -}HDMI_CLOCK_PHASE; - -typedef enum -{ - HDMI_COLOR_ORDER_RGB = 0, - HDMI_COLOR_ORDER_BGR = 1 -}HDMI_COLOR_ORDER; - -typedef enum -{ - IO_DRIVING_CURRENT_8MA = (1 << 0), - IO_DRIVING_CURRENT_4MA = (1 << 1), - IO_DRIVING_CURRENT_2MA = (1 << 2), - IO_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), -}IO_DRIVING_CURRENT; - -#if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) -typedef enum -{ - HDMI_VIDEO_720x480p_60Hz = 0, - HDMI_VIDEO_1280x720p_60Hz =2, - HDMI_VIDEO_1920x1080p_30Hz =6, - HDMI_VIDEO_RESOLUTION_NUM -}HDMI_VIDEO_RESOLUTION; -#endif - -typedef enum -{ - HDMI_VIN_FORMAT_RGB565, - HDMI_VIN_FORMAT_RGB666, - HDMI_VIN_FORMAT_RGB888, -} HDMI_VIDEO_INPUT_FORMAT; - -typedef enum -{ - HDMI_VOUT_FORMAT_RGB888, - HDMI_VOUT_FORMAT_YUV422, - HDMI_VOUT_FORMAT_YUV444, -}HDMI_VIDEO_OUTPUT_FORMAT; - -typedef enum -{ - HDMI_AUDIO_PCM_16bit_48000, - HDMI_AUDIO_PCM_16bit_44100, - HDMI_AUDIO_PCM_16bit_32000, - HDMI_AUDIO_SOURCE_STREAM, -}HDMI_AUDIO_FORMAT; - -typedef struct -{ - HDMI_VIDEO_RESOLUTION vformat; - HDMI_VIDEO_INPUT_FORMAT vin; - HDMI_VIDEO_OUTPUT_FORMAT vout; - HDMI_AUDIO_FORMAT aformat; -}HDMI_CONFIG; - -typedef enum{ - HDMI_OUTPUT_MODE_LCD_MIRROR, - HDMI_OUTPUT_MODE_VIDEO_MODE, - HDMI_OUTPUT_MODE_DPI_BYPASS -}HDMI_OUTPUT_MODE; - -typedef enum{ - HDMI_CABLE, - MHL_CABLE, - MHL_SMB_CABLE, - MHL_2_CABLE ///MHL 2.0 -}HDMI_CABLE_TYPE; - -typedef struct -{ - unsigned int width; - unsigned int height; - - HDMI_CONFIG init_config; - - /* polarity parameters */ - HDMI_POLARITY clk_pol; - HDMI_POLARITY de_pol; - HDMI_POLARITY vsync_pol; - HDMI_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - HDMI_COLOR_ORDER rgb_order; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - IO_DRIVING_CURRENT io_driving_current; - HDMI_OUTPUT_MODE output_mode; - - int is_force_awake; - int is_force_landscape; - - unsigned int scaling_factor; // determine the scaling of output screen size, valid value 0~10 - // 0 means no scaling, 5 means scaling to 95%, 10 means 90% - HDMI_CABLE_TYPE cabletype; - bool NeedSwHDCP; -}HDMI_PARAMS; - -typedef enum{ - HDMI_STATE_NO_DEVICE, - HDMI_STATE_ACTIVE, - HDMI_STATE_CONNECTING, - #if defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - HDMI_STATE_PLUGIN_ONLY, - HDMI_STATE_EDID_UPDATE, - HDMI_STATE_CEC_UPDATE - #endif -}HDMI_STATE; - -// --------------------------------------------------------------------------- - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - void (*wait_transfer_done)(void); - void (*state_callback)(HDMI_STATE state); -}HDMI_UTIL_FUNCS; - - -typedef struct -{ - void (*set_util_funcs)(const HDMI_UTIL_FUNCS *util); - void (*get_params)(HDMI_PARAMS *params); - - int (*init)(void); - int (*enter)(void); - int (*exit)(void); - void (*suspend)(void); - void (*resume)(void); - int (*audio_config)(HDMI_AUDIO_FORMAT aformat); - int (*video_config)(HDMI_VIDEO_RESOLUTION vformat, HDMI_VIDEO_INPUT_FORMAT vin, HDMI_VIDEO_OUTPUT_FORMAT vou); - int (*video_enable)(bool enable); - int (*audio_enable)(bool enable); - int (*irq_enable)(bool enable); - int (*power_on)(void); - void (*power_off)(void); - HDMI_STATE (*get_state)(void); - void (*set_mode)(unsigned char ucMode); - void (*dump)(void); - #if !defined(CONFIG_MTK_MT8193_HDMI_SUPPORT) - void (*read)(unsigned char u8Reg); - void (*write)(unsigned char u8Reg, unsigned char u8Data); - void (*log_enable)(bool enable); - #else - void (*read)(u16 u2Reg, u32 *p4Data); - void (*write)(u16 u2Reg, u32 u4Data); - void (*log_enable)(u16 enable); - void (*InfoframeSetting)(u8 i1typemode, u8 i1typeselect); - void (*checkedid)(u8 i1noedid); - void (*colordeep)(u8 u1colorspace, u8 u1deepcolor); - void (*enablehdcp)(u8 u1hdcponoff); - void (*setcecrxmode)(u8 u1cecrxmode); - void (*hdmistatus)(void); - void (*hdcpkey)(u8 *pbhdcpkey); - void (*getedid)(HDMI_EDID_INFO_T *pv_get_info); - void (*setcecla)(CEC_DRV_ADDR_CFG_T* prAddr); - void (*sendsltdata)(u8 *pu1Data); - void (*getceccmd)(CEC_FRAME_DESCRIPTION* frame); - void (*getsltdata)(CEC_SLT_DATA* rCecSltData); - void (*setceccmd)(CEC_SEND_MSG_T* msg); - void (*cecenable)(u8 u1EnCec); - void (*getcecaddr)(CEC_ADDRESS *cecaddr); - void (*mutehdmi)(u8 u1flagvideomute, u8 u1flagaudiomute); - #endif -} HDMI_DRIVER; - - -// --------------------------------------------------------------------------- -// HDMI Driver Functions -// --------------------------------------------------------------------------- - -const HDMI_DRIVER* HDMI_GetDriver(void); - -#endif // __HDMI_DRV_H__ diff --git a/arch/arm/mach-mt8127/ttab/headset/Makefile b/arch/arm/mach-mt8127/ttab/headset/Makefile deleted file mode 100755 index 6cbe08cfb67..00000000000 --- a/arch/arm/mach-mt8127/ttab/headset/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := accdet_custom.o - diff --git a/arch/arm/mach-mt8127/ttab/headset/accdet_custom.c b/arch/arm/mach-mt8127/ttab/headset/accdet_custom.c deleted file mode 100644 index 14e56ca377e..00000000000 --- a/arch/arm/mach-mt8127/ttab/headset/accdet_custom.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "accdet_custom_def.h" -#include - -//key press customization: long press time -struct headset_key_custom headset_key_custom_setting = { - 2000 -}; - -struct headset_key_custom* get_headset_key_custom_setting(void) -{ - return &headset_key_custom_setting; -} - -#ifdef ACCDET_MULTI_KEY_FEATURE -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x800, 0x800, 0x20 -}; -#else -//headset mode register settings(for MT6575) -static struct headset_mode_settings cust_headset_settings = { - 0x900, 0x400, 1, 0x3f0, 0x3000, 0x3000, 0x20 -}; -#endif - -struct headset_mode_settings* get_cust_headset_settings(void) -{ - return &cust_headset_settings; -} \ No newline at end of file diff --git a/arch/arm/mach-mt8127/ttab/headset/accdet_custom.h b/arch/arm/mach-mt8127/ttab/headset/accdet_custom.h deleted file mode 100644 index 9cbde46a1a3..00000000000 --- a/arch/arm/mach-mt8127/ttab/headset/accdet_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -struct headset_mode_settings{ - int pwm_width; //pwm frequence - int pwm_thresh; //pwm duty - int fall_delay; //falling stable time - int rise_delay; //rising stable time - int debounce0; //hook switch or double check debounce - int debounce1; //mic bias debounce - int debounce3; //plug out debounce -}; - -//key press customization: long press time -struct headset_key_custom{ - int headset_long_press_time; -}; diff --git a/arch/arm/mach-mt8127/ttab/headset/accdet_custom_def.h b/arch/arm/mach-mt8127/ttab/headset/accdet_custom_def.h deleted file mode 100644 index bac773afd4d..00000000000 --- a/arch/arm/mach-mt8127/ttab/headset/accdet_custom_def.h +++ /dev/null @@ -1,15 +0,0 @@ -// use accdet + EINT solution -#define ACCDET_EINT -// support multi_key feature -#define ACCDET_MULTI_KEY_FEATURE -// after 5s disable accdet -#define ACCDET_LOW_POWER - -//#define ACCDET_PIN_RECOGNIZATION -#define ACCDET_28V_MODE - -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE -#define ACCDET_SHORT_PLUGOUT_DEBOUNCE_CN 20 - -//extern struct headset_mode_settings* get_cust_headset_settings(void); -//extern int get_long_press_time_cust(void); \ No newline at end of file diff --git a/arch/arm/mach-mt8127/ttab/keypad/Makefile b/arch/arm/mach-mt8127/ttab/keypad/Makefile deleted file mode 100755 index 64e2e3df12a..00000000000 --- a/arch/arm/mach-mt8127/ttab/keypad/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := mtk_kpd_bkl.o diff --git a/arch/arm/mach-mt8127/ttab/keypad/mtk_kpd.h b/arch/arm/mach-mt8127/ttab/keypad/mtk_kpd.h deleted file mode 100644 index b173ba13a12..00000000000 --- a/arch/arm/mach-mt8127/ttab/keypad/mtk_kpd.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _MTK_KPD_H_ -#define _MTK_KPD_H_ - -#include -#include -#include -#include -/* include PMIC header file */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define KPD_PWRKEY_MAP KEY_POWER -#define KPD_PWRKEY_USE_EINT KPD_NO -#define KPD_PWRKEY_USE_PMIC KPD_YES -#define KPD_DRV_CTRL_BACKLIGHT KPD_NO /* retired, move to Lights framework */ -#define KPD_BACKLIGHT_TIME 8 /* sec */ -/* the keys can wake up the system and we should enable backlight */ -#define KPD_BACKLIGHT_WAKE_KEY \ -{ \ - KEY_ENDCALL, KEY_POWER, \ -} - -#define KPD_HAS_SLIDE_QWERTY KPD_NO -#if KPD_HAS_SLIDE_QWERTY -static inline bool powerOn_slidePin_interface() { - return hwPowerOn(MT65XX_POWER_LDO_VCAM_IO, VOL_2800, "Qwerty slide"); -} -static inline bool powerOff_slidePin_interface(){ - return hwPowerDown(MT65XX_POWER_LDO_VCAM_IO, "Qwerty slide"); -} -#endif -#define KPD_SLIDE_EINT CUST_EINT_KPD_SLIDE_NUM -#define KPD_SLIDE_DEBOUNCE CUST_EINT_KPD_SLIDE_DEBOUNCE_CN /* ms */ -#define KPD_SLIDE_POLARITY CUST_EINT_KPD_SLIDE_POLARITY -#define KPD_SLIDE_SENSITIVE CUST_EINT_KPD_SLIDE_SENSITIVE - -#if KPD_DRV_CTRL_BACKLIGHT -extern void kpd_enable_backlight(void); -extern void kpd_disable_backlight(void); -extern void kpd_backlight_handler(bool pressed, u16 linux_keycode); -#else -#define kpd_enable_backlight() do {} while (0) -#define kpd_disable_backlight() do {} while (0) -#define kpd_backlight_handler(pressed, linux_keycode) do {} while (0) -#endif - -/* for META tool */ -extern void kpd_set_backlight(bool onoff, void *val1, void *val2); - -#if KPD_PWRKEY_USE_PMIC -void kpd_pwrkey_pmic_handler(unsigned long pressed); -#else -static inline void kpd_pwrkey_pmic_handler(unsigned long data){} -#endif - -void kpd_pmic_rstkey_handler(unsigned long pressed); - -#define ONEKEY_REBOOT_NORMAL_MODE -//#define TWOKEY_REBOOT_NORMAL_MODE -#define ONEKEY_REBOOT_OTHER_MODE -//#define TWOKEY_REBOOT_OTHER_MODE -#define KPD_PMIC_RSTKEY_MAP KEY_VOLUMEDOWN -#define KPD_PMIC_LPRST_TD 1 /* timeout period. 0: 7sec; 1: 11sec; 2: 14sec; 3: 5sec */ - -#endif diff --git a/arch/arm/mach-mt8127/ttab/keypad/mtk_kpd_bkl.c b/arch/arm/mach-mt8127/ttab/keypad/mtk_kpd_bkl.c deleted file mode 100644 index 3b81032692b..00000000000 --- a/arch/arm/mach-mt8127/ttab/keypad/mtk_kpd_bkl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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. - * - */ - -#include -#include /* custom file */ - -#if KPD_DRV_CTRL_BACKLIGHT -void kpd_enable_backlight(void) -{ - /*mt6326_kpled_dim_duty_Full(); - mt6326_kpled_Enable();*/ -} - -void kpd_disable_backlight(void) -{ - /*mt6326_kpled_dim_duty_0(); - mt6326_kpled_Disable();*/ -} -#endif - -/* for META tool */ -void kpd_set_backlight(bool onoff, void *val1, void *val2) -{ - /*u8 div = *(u8 *)val1; - u8 duty = *(u8 *)val2; - - if (div > 15) - div = 15; - pmic_kp_dim_div(div); - - if (duty > 31) - duty = 31; - pmic_kp_dim_duty(duty); - - if (onoff) - mt6326_kpled_Enable(); - else - mt6326_kpled_Disable();*/ -} diff --git a/arch/arm/mach-mt8127/ttab/lcm/CPT_CLAP070WP03XG_LVDS.c b/arch/arm/mach-mt8127/ttab/lcm/CPT_CLAP070WP03XG_LVDS.c deleted file mode 100644 index 57ce37ed11e..00000000000 --- a/arch/arm/mach-mt8127/ttab/lcm/CPT_CLAP070WP03XG_LVDS.c +++ /dev/null @@ -1,391 +0,0 @@ -#ifndef BUILD_LK -#include -#endif -#ifdef BUILD_LK -#include -#include -#include -#include - -#elif (defined BUILD_UBOOT) -#include -#else -#include -#include -#include -#endif -#include "lcm_drv.h" -#include "mt8193_lvds.h" - -// --------------------------------------------------------------------------- -// Local Constants -// --------------------------------------------------------------------------- - -#if defined(MTK_ALPS_BOX_SUPPORT) -/*for 8127 box hdmi main path */ -#define FRAME_WIDTH (1920) -#define FRAME_HEIGHT (1080) -#else -#define FRAME_WIDTH (800) -#define FRAME_HEIGHT (1280) -#endif - -//#define GPIO_LCD_RST_EN GPIO90 -//#define GPIO_LCD_STB_EN GPIO89 - - -#ifdef GPIO_LCM_PWR -#define GPIO_LCD_PWR GPIO_LCM_PWR -#else -#define GPIO_LCD_PWR 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR_EN -#define GPIO_LCD_PWR_EN GPIO_LCM_PWR_EN -#else -#define GPIO_LCD_PWR_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_PWR2_EN -#define GPIO_LCD_PWR2_EN GPIO_LCM_PWR2_EN -#else -#define GPIO_LCD_PWR2_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_RST -#define GPIO_LCD_RST_EN GPIO_LCM_RST -#else -#define GPIO_LCD_RST_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_STB -#define GPIO_LCD_STB_EN GPIO_LCM_STB -#else -#define GPIO_LCD_STB_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_LVL_SHIFT_EN -#define GPIO_SHIFT_EN GPIO_LCM_LVL_SHIFT_EN -#else -#define GPIO_SHIFT_EN 0xFFFFFFFF -#endif - -#ifdef GPIO_LCM_BL_EN -#define GPIO_LCD_BL_EN GPIO_LCM_BL_EN -#else -#define GPIO_LCD_BL_EN 0xFFFFFFFF -#endif - - -#ifdef GPIO_LCM_BRIDGE_EN -#define GPIO_LCD_BRIDGE_EN GPIO_LCM_BRIDGE_EN -#else -#define GPIO_LCD_BRIDGE_EN 0xFFFFFFFF -#endif - - - -#define HSYNC_PULSE_WIDTH 16 -#define HSYNC_BACK_PORCH 16 -#define HSYNC_FRONT_PORCH 32 -#define VSYNC_PULSE_WIDTH 2 -#define VSYNC_BACK_PORCH 2 -#define VSYNC_FRONT_PORCH 4 - - -// --------------------------------------------------------------------------- -// Local Variables -// --------------------------------------------------------------------------- - -static LCM_UTIL_FUNCS lcm_util = {0}; - -#define SET_RESET_PIN(v) (mt_set_reset_pin((v))) - -#define UDELAY(n) -#define MDELAY(n) - - -// --------------------------------------------------------------------------- -// Local Functions -// --------------------------------------------------------------------------- - -static __inline void send_ctrl_cmd(unsigned int cmd) -{ - -} - -static __inline void send_data_cmd(unsigned int data) -{ - -} - -static __inline void set_lcm_register(unsigned int regIndex, - unsigned int regData) -{ - -} - - -static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output) -{ - - if(GPIO == 0xFFFFFFFF) - { - #ifdef BUILD_LK - printf("[LK/LCM] GPIO_LCD_PWR = 0x%x \n",GPIO_LCD_PWR); - printf("[LK/LCM] GPIO_LCD_PWR_EN = 0x%x\n",GPIO_LCD_PWR_EN); - printf("[LK/LCM] GPIO_LCD_PWR2_EN = 0x%x \n",GPIO_LCD_PWR2_EN); - printf("[LK/LCM] GPIO_LCD_RST_EN = 0x%x \n",GPIO_LCD_RST_EN); - printf("[LK/LCM] GPIO_LCD_STB_EN = 0x%x\n",GPIO_LCD_STB_EN); - printf("[LK/LCM] GPIO_SHIFT_EN = 0x%x\n",GPIO_SHIFT_EN); - printf("[LK/LCM] GPIO_LCD_BL_EN = 0x%x\n",GPIO_LCD_BL_EN); - printf("[LK/LCM] GPIO_LCD_BRIDGE_EN = 0x%x \n",GPIO_LCD_BRIDGE_EN); - - #elif (defined BUILD_UBOOT) - // do nothing in uboot - #else - //printf("kernel] lcm_set gpio() \n"); - #endif - return; - } - - mt_set_gpio_mode(GPIO, GPIO_MODE_00); - mt_set_gpio_dir(GPIO, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO, (output>0)? GPIO_OUT_ONE: GPIO_OUT_ZERO); -} - - -// --------------------------------------------------------------------------- -// LCM Driver Implementations -// --------------------------------------------------------------------------- - -static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) -{ - memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); -} - -static void lcm_get_params(LCM_PARAMS *params) -{ - memset(params, 0, sizeof(LCM_PARAMS)); - - params->type = LCM_TYPE_DPI; - params->ctrl = LCM_CTRL_SERIAL_DBI; - params->width = FRAME_WIDTH; - params->height = FRAME_HEIGHT; - params->io_select_mode = 0; - - params->dpi.PLL_CLOCK = 67; //67MHz - - - /* RGB interface configurations */ - params->dpi.mipi_pll_clk_ref = 0; - params->dpi.mipi_pll_clk_div1 = 0x80000101; //lvds pll 65M - params->dpi.mipi_pll_clk_div2 = 0x800a0000; - //params->dpi.dpi_clk_div = 2; - //params->dpi.dpi_clk_duty = 1; - - params->dpi.clk_pol = LCM_POLARITY_FALLING; - params->dpi.de_pol = LCM_POLARITY_RISING; - params->dpi.vsync_pol = LCM_POLARITY_FALLING; - params->dpi.hsync_pol = LCM_POLARITY_FALLING; - - params->dpi.hsync_pulse_width = HSYNC_PULSE_WIDTH; - params->dpi.hsync_back_porch = HSYNC_BACK_PORCH; - params->dpi.hsync_front_porch = HSYNC_FRONT_PORCH; - params->dpi.vsync_pulse_width = VSYNC_PULSE_WIDTH; - params->dpi.vsync_back_porch = VSYNC_BACK_PORCH; - params->dpi.vsync_front_porch = VSYNC_FRONT_PORCH; - - - //params->dpi.i2x_en = 1; - params->dpi.lvds_tx_en = 1; - params->dpi.ssc_disable = 1; - params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit - params->dpi.rgb_order = LCM_COLOR_ORDER_RGB; - params->dpi.is_serial_output = 0; - - params->dpi.intermediat_buffer_num = 0; - - params->dpi.io_driving_current = LCM_DRIVING_CURRENT_2MA; -} - - -static void lcm_init(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_PWR, 1); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - -//VGP6 3.3V -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - -MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_init() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, GPIO_OUT_ONE); - - -#endif - -} - - -static void lcm_suspend(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_suspend() enter\n"); - -lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); -MDELAY(20); - - - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - -lcm_set_gpio_output(GPIO_LCD_PWR, 0); -lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); -lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - -MDELAY(20); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_suspend() enter\n"); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 0); - - MDELAY(20); - -lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ZERO); -lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ZERO); - - lcm_set_gpio_output(GPIO_LCD_PWR, 0); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 0); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 0); - - MDELAY(20); -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");// -#else - hwPowerDown(MT6323_POWER_LDO_VGP1, "LCM");// -#endif - - MDELAY(20); - -#endif - -} - - -static void lcm_resume(void) -{ -#ifdef BUILD_LK - printf("[LK/LCM] lcm_resume() enter\n"); -//VGP6 3.3V - -#ifdef CONFIG_MTK_PMIC_MT6397 - upmu_set_rg_vgp6_vosel(0x7); - upmu_set_rg_vgp6_sw_en(0x1); -#else - upmu_set_rg_vgp1_vosel(0x7); - upmu_set_rg_vgp1_en(0x1); -#endif -//pmic_config_interface(0x424, 0x1, 0x1, 15); -//pmic_config_interface(0x45a, 0x07, 0x07, 5); - -// hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); - - lcm_set_gpio_output(GPIO_LCD_STB_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - - lcm_set_gpio_output(GPIO_LCD_RST_EN,GPIO_OUT_ONE); - MDELAY(20); - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#elif (defined BUILD_UBOOT) - // do nothing in uboot -#else - printk("[LCM] lcm_resume() enter\n"); - -#ifdef CONFIG_MTK_PMIC_MT6397 - hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM"); -#else - hwPowerOn(MT6323_POWER_LDO_VGP1, VOL_3300, "LCM"); -#endif - lcm_set_gpio_output(GPIO_LCD_PWR, 1); - lcm_set_gpio_output(GPIO_LCD_PWR_EN, 1); - lcm_set_gpio_output(GPIO_LCD_PWR2_EN, 1); - - MDELAY(5); - - lcm_set_gpio_output(GPIO_LCD_STB_EN, 1); - MDELAY(5); - lcm_set_gpio_output(GPIO_LCD_RST_EN, 1); - MDELAY(20); - - - lcm_set_gpio_output(GPIO_LCD_BL_EN, 1); - -#endif - -} - -LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv = -{ - .name = "cpt_clap070wp03xg_lvds", - .set_util_funcs = lcm_set_util_funcs, - .get_params = lcm_get_params, - .init = lcm_init, - .suspend = lcm_suspend, - .resume = lcm_resume, -}; - diff --git a/arch/arm/mach-mt8127/ttab/lcm/Makefile b/arch/arm/mach-mt8127/ttab/lcm/Makefile deleted file mode 100755 index 1df98423dcc..00000000000 --- a/arch/arm/mach-mt8127/ttab/lcm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := CPT_CLAP070WP03XG_LVDS.o -obj-y += mt65xx_lcm_list.o diff --git a/arch/arm/mach-mt8127/ttab/lcm/inc/lcm_drv.h b/arch/arm/mach-mt8127/ttab/lcm/inc/lcm_drv.h deleted file mode 100644 index 033cfc6cad2..00000000000 --- a/arch/arm/mach-mt8127/ttab/lcm/inc/lcm_drv.h +++ /dev/null @@ -1,634 +0,0 @@ -#ifndef __LCM_DRV_H__ -#define __LCM_DRV_H__ - - -// --------------------------------------------------------------------------- - -#ifndef ARY_SIZE -#define ARY_SIZE(x) (sizeof((x)) / sizeof((x[0]))) -#endif - -// --------------------------------------------------------------------------- - -/* common enumerations */ - -typedef enum -{ - LCM_TYPE_DBI = 0, - LCM_TYPE_DPI, - LCM_TYPE_DSI -} LCM_TYPE; - - -typedef enum -{ - LCM_CTRL_NONE = 0, - LCM_CTRL_SERIAL_DBI, - LCM_CTRL_PARALLEL_DBI, - LCM_CTRL_GPIO -} LCM_CTRL; - - -typedef enum -{ - LCM_POLARITY_RISING = 0, - LCM_POLARITY_FALLING = 1 -} LCM_POLARITY; - - -typedef enum -{ - LCM_CLOCK_PHASE_0 = 0, - LCM_CLOCK_PHASE_90 = 1 -} LCM_CLOCK_PHASE; - - -typedef enum -{ - LCM_COLOR_ORDER_RGB = 0, - LCM_COLOR_ORDER_BGR = 1 -} LCM_COLOR_ORDER; - - -typedef enum -{ - LCM_DRIVING_CURRENT_DEFAULT, - LCM_DRIVING_CURRENT_8MA = (1 << 0), - LCM_DRIVING_CURRENT_4MA = (1 << 1), - LCM_DRIVING_CURRENT_2MA = (1 << 2), - LCM_DRIVING_CURRENT_SLEW_CNTL = (1 << 3), - LCM_DRIVING_CURRENT_6575_4MA = (1 << 4), - LCM_DRIVING_CURRENT_6575_8MA = (3 << 4), - LCM_DRIVING_CURRENT_6575_12MA = (2 << 4), - LCM_DRIVING_CURRENT_6575_16MA = (4 << 4), - LCM_DRIVING_CURRENT_6MA, - LCM_DRIVING_CURRENT_12MA, - LCM_DRIVING_CURRENT_16MA -} LCM_DRIVING_CURRENT; - -typedef enum{ - LCM_INTERFACE_NOTDEFINED = 0, - LCM_INTERFACE_DSI0, - LCM_INTERFACE_DSI1, - LCM_INTERFACE_DSI_DUAL, - LCM_INTERFACE_DPI0, - LCM_INTERFACE_DPI1, - LCM_INTERFACE_DBI0 -}LCM_INTERFACE_ID; - -typedef enum{ - LCM_IOCTL_NULL = 0, -}LCM_IOCTL; - -/* DBI related enumerations */ - -typedef enum -{ - LCM_DBI_CLOCK_FREQ_104M = 0, - LCM_DBI_CLOCK_FREQ_52M, - LCM_DBI_CLOCK_FREQ_26M, - LCM_DBI_CLOCK_FREQ_13M, - LCM_DBI_CLOCK_FREQ_7M -} LCM_DBI_CLOCK_FREQ; - - -typedef enum -{ - LCM_DBI_DATA_WIDTH_8BITS = 0, - LCM_DBI_DATA_WIDTH_9BITS = 1, - LCM_DBI_DATA_WIDTH_16BITS = 2, - LCM_DBI_DATA_WIDTH_18BITS = 3, - LCM_DBI_DATA_WIDTH_24BITS = 4, - LCM_DBI_DATA_WIDTH_32BITS = 5 -} LCM_DBI_DATA_WIDTH; - - -typedef enum -{ - LCM_DBI_CPU_WRITE_8_BITS = 8, - LCM_DBI_CPU_WRITE_16_BITS = 16, - LCM_DBI_CPU_WRITE_32_BITS = 32, -} LCM_DBI_CPU_WRITE_BITS; - - -typedef enum -{ - LCM_DBI_FORMAT_RGB332 = 0, - LCM_DBI_FORMAT_RGB444 = 1, - LCM_DBI_FORMAT_RGB565 = 2, - LCM_DBI_FORMAT_RGB666 = 3, - LCM_DBI_FORMAT_RGB888 = 4 -} LCM_DBI_FORMAT; - - -typedef enum -{ - LCM_DBI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DBI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DBI_TRANS_SEQ; - - -typedef enum -{ - LCM_DBI_PADDING_ON_LSB = 0, - LCM_DBI_PADDING_ON_MSB = 1 -} LCM_DBI_PADDING; - - -typedef enum -{ - LCM_DBI_TE_MODE_DISABLED = 0, - LCM_DBI_TE_MODE_VSYNC_ONLY = 1, - LCM_DBI_TE_MODE_VSYNC_OR_HSYNC = 2, -} LCM_DBI_TE_MODE; - - -typedef enum -{ - LCM_DBI_TE_VS_WIDTH_CNT_DIV_8 = 0, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_16 = 1, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_32 = 2, - LCM_DBI_TE_VS_WIDTH_CNT_DIV_64 = 3, -} LCM_DBI_TE_VS_WIDTH_CNT_DIV; - - -/* DPI related enumerations */ - -typedef enum -{ - LCM_DPI_FORMAT_RGB565 = 0, - LCM_DPI_FORMAT_RGB666 = 1, - LCM_DPI_FORMAT_RGB888 = 2 -} LCM_DPI_FORMAT; - -typedef enum -{ - LCM_SERIAL_CLOCK_FREQ_104M = 0, - LCM_SERIAL_CLOCK_FREQ_26M, - LCM_SERIAL_CLOCK_FREQ_52M -} LCM_SERIAL_CLOCK_FREQ; - -typedef enum -{ - LCM_SERIAL_CLOCK_DIV_2 = 0, - LCM_SERIAL_CLOCK_DIV_4 = 1, - LCM_SERIAL_CLOCK_DIV_8 = 2, - LCM_SERIAL_CLOCK_DIV_16 = 3, -} LCM_SERIAL_CLOCK_DIV; - - -/* DSI related enumerations */ - -typedef enum -{ - CMD_MODE = 0, - SYNC_PULSE_VDO_MODE = 1, - SYNC_EVENT_VDO_MODE = 2, - BURST_VDO_MODE = 3 -} LCM_DSI_MODE_CON; - - -typedef enum -{ - LCM_ONE_LANE = 1, - LCM_TWO_LANE = 2, - LCM_THREE_LANE = 3, - LCM_FOUR_LANE = 4, -} LCM_LANE_NUM; - - -typedef enum -{ - LCM_DSI_FORMAT_RGB565 = 0, - LCM_DSI_FORMAT_RGB666 = 1, - LCM_DSI_FORMAT_RGB888 = 2 -} LCM_DSI_FORMAT; - - -typedef enum -{ - LCM_DSI_TRANS_SEQ_MSB_FIRST = 0, - LCM_DSI_TRANS_SEQ_LSB_FIRST = 1 -} LCM_DSI_TRANS_SEQ; - - -typedef enum -{ - LCM_DSI_PADDING_ON_LSB = 0, - LCM_DSI_PADDING_ON_MSB = 1 -} LCM_DSI_PADDING; - - -typedef enum -{ - LCM_PACKED_PS_16BIT_RGB565=0, - LCM_LOOSELY_PS_18BIT_RGB666=1, - LCM_PACKED_PS_24BIT_RGB888=2, - LCM_PACKED_PS_18BIT_RGB666=3 -} LCM_PS_TYPE; - -typedef enum -{ - LCM_DSI_6589_PLL_CLOCK_NULL = 0, - LCM_DSI_6589_PLL_CLOCK_201_5 = 1, - LCM_DSI_6589_PLL_CLOCK_208 = 2, - LCM_DSI_6589_PLL_CLOCK_214_5 = 3, - LCM_DSI_6589_PLL_CLOCK_221 = 4, - LCM_DSI_6589_PLL_CLOCK_227_5 = 5, - LCM_DSI_6589_PLL_CLOCK_234 = 6, - LCM_DSI_6589_PLL_CLOCK_240_5 = 7, - LCM_DSI_6589_PLL_CLOCK_247 = 8, - LCM_DSI_6589_PLL_CLOCK_253_5 = 9, - LCM_DSI_6589_PLL_CLOCK_260 = 10, - LCM_DSI_6589_PLL_CLOCK_266_5 = 11, - LCM_DSI_6589_PLL_CLOCK_273 = 12, - LCM_DSI_6589_PLL_CLOCK_279_5 = 13, - LCM_DSI_6589_PLL_CLOCK_286 = 14, - LCM_DSI_6589_PLL_CLOCK_292_5 = 15, - LCM_DSI_6589_PLL_CLOCK_299 = 16, - LCM_DSI_6589_PLL_CLOCK_305_5 = 17, - LCM_DSI_6589_PLL_CLOCK_312 = 18, - LCM_DSI_6589_PLL_CLOCK_318_5 = 19, - LCM_DSI_6589_PLL_CLOCK_325 = 20, - LCM_DSI_6589_PLL_CLOCK_331_5 = 21, - LCM_DSI_6589_PLL_CLOCK_338 = 22, - LCM_DSI_6589_PLL_CLOCK_344_5 = 23, - LCM_DSI_6589_PLL_CLOCK_351 = 24, - LCM_DSI_6589_PLL_CLOCK_357_5 = 25, - LCM_DSI_6589_PLL_CLOCK_364 = 26, - LCM_DSI_6589_PLL_CLOCK_370_5 = 27, - LCM_DSI_6589_PLL_CLOCK_377 = 28, - LCM_DSI_6589_PLL_CLOCK_383_5 = 29, - LCM_DSI_6589_PLL_CLOCK_390 = 30, - LCM_DSI_6589_PLL_CLOCK_396_5 = 31, - LCM_DSI_6589_PLL_CLOCK_403 = 32, - LCM_DSI_6589_PLL_CLOCK_409_5 = 33, - LCM_DSI_6589_PLL_CLOCK_416 = 34, - LCM_DSI_6589_PLL_CLOCK_422_5 = 35, - LCM_DSI_6589_PLL_CLOCK_429 = 36, - LCM_DSI_6589_PLL_CLOCK_435_5 = 37, - LCM_DSI_6589_PLL_CLOCK_442 = 38, - LCM_DSI_6589_PLL_CLOCK_448_5 = 39, - LCM_DSI_6589_PLL_CLOCK_455 = 40, - LCM_DSI_6589_PLL_CLOCK_461_5 = 41, - LCM_DSI_6589_PLL_CLOCK_468 = 42, - LCM_DSI_6589_PLL_CLOCK_474_5 = 43, - LCM_DSI_6589_PLL_CLOCK_481 = 44, - LCM_DSI_6589_PLL_CLOCK_487_5 = 45, - LCM_DSI_6589_PLL_CLOCK_494 = 46, - LCM_DSI_6589_PLL_CLOCK_500_5 = 47, - LCM_DSI_6589_PLL_CLOCK_507 = 48, - LCM_DSI_6589_PLL_CLOCK_513_5 = 49, - LCM_DSI_6589_PLL_CLOCK_520 = 50, -} LCM_DSI_PLL_CLOCK; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DBI_TRANS_SEQ trans_seq; - LCM_DBI_PADDING padding; - LCM_DBI_FORMAT format; - LCM_DBI_DATA_WIDTH width; -} LCM_DBI_DATA_FORMAT; - - -typedef struct -{ - LCM_POLARITY cs_polarity; - LCM_POLARITY clk_polarity; - LCM_CLOCK_PHASE clk_phase; - unsigned int is_non_dbi_mode; - - LCM_SERIAL_CLOCK_FREQ clock_base; - LCM_SERIAL_CLOCK_DIV clock_div; -////////////////////////////////////MT6575 added params, and if lcm driver is for 6575, only care these below params - unsigned int css; - unsigned int csh; - unsigned int rd_1st; - unsigned int rd_2nd; - unsigned int wr_1st; - unsigned int wr_2nd; - - unsigned int sif_3wire; - unsigned int sif_sdi; - LCM_POLARITY sif_1st_pol; - LCM_POLARITY sif_sck_def; - unsigned int sif_div2; - unsigned int sif_hw_cs; -//////////////////////////////////// -} LCM_DBI_SERIAL_PARAMS; - - -typedef struct -{ - /* timing parameters */ - unsigned int write_setup; - unsigned int write_hold; - unsigned int write_wait; - unsigned int read_setup; - unsigned int read_hold; - unsigned int read_latency; - unsigned int wait_period; - /*only for 6575*/ - unsigned int cs_high_width; -} LCM_DBI_PARALLEL_PARAMS; - - -typedef struct -{ - LCM_COLOR_ORDER color_order; - LCM_DSI_TRANS_SEQ trans_seq; - LCM_DSI_PADDING padding; - LCM_DSI_FORMAT format; -} LCM_DSI_DATA_FORMAT; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - /* common parameters for serial & parallel interface */ - unsigned int port; - LCM_DBI_CLOCK_FREQ clock_freq; - LCM_DBI_DATA_WIDTH data_width; - LCM_DBI_DATA_FORMAT data_format; - LCM_DBI_CPU_WRITE_BITS cpu_write_bits; - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT msb_io_driving_current; - - /* tearing control */ - LCM_DBI_TE_MODE te_mode; - LCM_POLARITY te_edge_polarity; - unsigned int te_hs_delay_cnt; - unsigned int te_vs_width_cnt; - LCM_DBI_TE_VS_WIDTH_CNT_DIV te_vs_width_cnt_div; - - /* particular parameters for serial & parallel interface */ - LCM_DBI_SERIAL_PARAMS serial; - LCM_DBI_PARALLEL_PARAMS parallel; -} LCM_DBI_PARAMS; - - -typedef struct -{ - /* - Pixel Clock Frequency = 26MHz * mipi_pll_clk_div1 - / (mipi_pll_clk_ref + 1) - / (2 * mipi_pll_clk_div2) - / dpi_clk_div - */ - unsigned int mipi_pll_clk_ref; // 0..1 - unsigned int mipi_pll_clk_div1; // 0..63 - unsigned int mipi_pll_clk_div2; // 0..15 - unsigned int mipi_pll_clk_fbk_div; //PCLK=> 8: 26MHz, 10: 35MHz, 12: 40MHz - unsigned int dpi_clk_div; // 2..32 - unsigned int dpi_clk_duty; // (dpi_clk_div - 1) .. 31 - unsigned int PLL_CLOCK; - unsigned int dpi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - - unsigned int width; - unsigned int height; - unsigned int bg_width; - unsigned int bg_height; - - /* polarity parameters */ - LCM_POLARITY clk_pol; - LCM_POLARITY de_pol; - LCM_POLARITY vsync_pol; - LCM_POLARITY hsync_pol; - - /* timing parameters */ - unsigned int hsync_pulse_width; - unsigned int hsync_back_porch; - unsigned int hsync_front_porch; - unsigned int vsync_pulse_width; - unsigned int vsync_back_porch; - unsigned int vsync_front_porch; - - /* output format parameters */ - LCM_DPI_FORMAT format; - LCM_COLOR_ORDER rgb_order; - unsigned int is_serial_output; - unsigned int i2x_en; - unsigned int i2x_edge; - unsigned int embsync; - unsigned int lvds_tx_en; - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - /* iopad parameters */ - LCM_DRIVING_CURRENT io_driving_current; - LCM_DRIVING_CURRENT lsb_io_driving_current; - -} LCM_DPI_PARAMS; - - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_DSI_MODE_CON mode; - unsigned int DSI_WMEM_CONTI; - unsigned int DSI_RMEM_CONTI; - unsigned int VC_NUM; - - LCM_LANE_NUM LANE_NUM; - LCM_DSI_DATA_FORMAT data_format; - - /* intermediate buffers parameters */ - unsigned int intermediat_buffer_num; // 2..3 - - LCM_PS_TYPE PS; - unsigned int word_count; - - unsigned int packet_size; - - unsigned int vertical_sync_active; - unsigned int vertical_backporch; - unsigned int vertical_frontporch; - unsigned int vertical_active_line; - - unsigned int horizontal_sync_active; - unsigned int horizontal_backporch; - unsigned int horizontal_frontporch; - unsigned int horizontal_blanking_pixel; - unsigned int horizontal_active_pixel; - unsigned int horizontal_bllp; - - unsigned int line_byte; - unsigned int horizontal_sync_active_byte; - unsigned int horizontal_backporch_byte; - unsigned int horizontal_frontporch_byte; - unsigned int rgb_byte; - - unsigned int horizontal_sync_active_word_count; - unsigned int horizontal_backporch_word_count; - unsigned int horizontal_frontporch_word_count; - - unsigned char HS_TRAIL; - unsigned char HS_ZERO; - unsigned char HS_PRPR; - unsigned char LPX; - - unsigned char TA_SACK; - unsigned char TA_GET; - unsigned char TA_SURE; - unsigned char TA_GO; - - unsigned char CLK_TRAIL; - unsigned char CLK_ZERO; - unsigned char LPX_WAIT; - unsigned char CONT_DET; - - unsigned char CLK_HS_PRPR; - unsigned char CLK_HS_POST; - unsigned char DA_HS_EXIT; - unsigned char CLK_HS_EXIT; - - unsigned int pll_select; - unsigned int pll_div1; - unsigned int pll_div2; - unsigned int fbk_div; - unsigned int fbk_sel; - unsigned int rg_bir; - unsigned int rg_bic; - unsigned int rg_bp; - unsigned int PLL_CLOCK; - unsigned int dsi_clock; - unsigned int ssc_disable; - unsigned int ssc_range; - unsigned int compatibility_for_nvk; - unsigned int cont_clock; - unsigned int ufoe_enable; - - unsigned int lcm_int_te_monitor; - unsigned int lcm_int_te_period; - - unsigned int lcm_ext_te_monitor; - unsigned int lcm_ext_te_enable; - - unsigned int noncont_clock; - unsigned int noncont_clock_period; - -} LCM_DSI_PARAMS; - -// --------------------------------------------------------------------------- - -typedef struct -{ - LCM_TYPE type; - LCM_CTRL ctrl; //! how to control LCM registers - LCM_INTERFACE_ID lcm_if; - LCM_INTERFACE_ID lcm_cmd_if; - /* common parameters */ - unsigned int width; - unsigned int height; - unsigned int io_select_mode; //DBI or DPI should select IO mode according to chip spec - - /* particular parameters */ - LCM_DBI_PARAMS dbi; - LCM_DPI_PARAMS dpi; - LCM_DSI_PARAMS dsi; - unsigned int physical_width; - unsigned int physical_height; - unsigned int od_table_size; - void *od_table; -} LCM_PARAMS; - - -// --------------------------------------------------------------------------- - -#define REGFLAG_ESCAPE_ID (0x00) -#define REGFLAG_DELAY_MS_V3 (0xFF) - -typedef struct { - unsigned char id; - unsigned char cmd; - unsigned char count; - unsigned char para_list[128]; -} LCM_setting_table_V3; - -typedef struct -{ - void (*set_reset_pin)(unsigned int value); - void (*set_chip_select)(unsigned int value); - int (*set_gpio_out)(unsigned int gpio, unsigned int value); - - void (*udelay)(unsigned int us); - void (*mdelay)(unsigned int ms); - - void (*send_cmd)(unsigned int cmd); - void (*send_data)(unsigned int data); - unsigned int (*read_data)(void); - - void (*dsi_set_cmdq_V3)(LCM_setting_table_V3 *para_list, unsigned int size, unsigned char force_update); - void (*dsi_set_cmdq_V2)(unsigned cmd, unsigned char count, unsigned char *para_list, unsigned char force_update); - void (*dsi_set_cmdq)(unsigned int *pdata, unsigned int queue_size, unsigned char force_update); - void (*dsi_write_cmd)(unsigned int cmd); - void (*dsi_write_regs)(unsigned int addr, unsigned int *para, unsigned int nums); - unsigned int (*dsi_read_reg)(void); - unsigned int (*dsi_dcs_read_lcm_reg)(unsigned char cmd); - unsigned int (*dsi_dcs_read_lcm_reg_v2)(unsigned char cmd, unsigned char *buffer, unsigned char buffer_size); - void (*wait_transfer_done)(void); - - /** FIXME: GPIO mode should not be configured in lcm driver - REMOVE ME after GPIO customization is done - */ - int (*set_gpio_mode)(unsigned int pin, unsigned int mode); - int (*set_gpio_dir)(unsigned int pin, unsigned int dir); - int (*set_gpio_pull_enable)(unsigned int pin, unsigned char pull_en); - -} LCM_UTIL_FUNCS; -typedef enum -{ - LCM_DRV_IOCTL_ENABLE_CMD_MODE = 0x100, -}LCM_DRV_IOCTL_CMD; - -typedef struct -{ - const char* name; - void (*set_util_funcs)(const LCM_UTIL_FUNCS *util); - void (*get_params)(LCM_PARAMS *params); - - void (*init)(void); - void (*suspend)(void); - void (*resume)(void); - - // for power-on sequence refinement - void (*init_power)(void); - void (*suspend_power)(void); - void (*resume_power)(void); - - void (*update)(unsigned int x, unsigned int y, unsigned int width, unsigned int height); - unsigned int (*compare_id)(void); - - ///////////////////////////CABC backlight related function - void (*set_backlight)(unsigned int level); - void (*set_pwm)(unsigned int divider); - unsigned int (*get_pwm)(unsigned int divider); - void (*set_backlight_mode)(unsigned int mode); - /////////////////////////// - - /////////////ESD_RECOVERY////////////////////// - unsigned int (*esd_check)(void); - unsigned int (*esd_recover)(void); - unsigned int (*check_status)(void); - unsigned int (*ata_check)(unsigned char *buffer); - void (*read_fb)(unsigned char *buffer); - int (*ioctl)(LCM_DRV_IOCTL_CMD cmd, unsigned int data); - ///////////////////////////////////////////////// -} LCM_DRIVER; - - -// --------------------------------------------------------------------------- -// LCM Driver Functions -// --------------------------------------------------------------------------- - -const LCM_DRIVER* LCM_GetDriver(void); -unsigned char which_lcd_module_triple(void); - -#endif // __LCM_DRV_H__ diff --git a/arch/arm/mach-mt8127/ttab/lcm/inc/mt8193_lvds.h b/arch/arm/mach-mt8127/ttab/lcm/inc/mt8193_lvds.h deleted file mode 100644 index 5337071badf..00000000000 --- a/arch/arm/mach-mt8127/ttab/lcm/inc/mt8193_lvds.h +++ /dev/null @@ -1,357 +0,0 @@ - -// LVDSTX(Base Address:+800h/+900h) -// 1.Basic setting -#define LVDS_OUTPUT_CTRL 0x0818 - #define RG_LVDSRX_FIFO_EN 0x80000000 //[31] lvdsrx fifo enable - #define RG_DPMODE 0x00000008 //[3] Reserved for ASFIFO test - #define RG_SYNC_TRIG_MODE 0x00000004 //[2] lvds 7-> trig vsync mode enable - #define RG_OUT_FIFO_EN 0x00000002 //[1] lvds output fifo enable - #define RG_LVDS_E 0x00000001 //[0] lvds 7bit-4bit fifo enable - -#define LVDS_CLK_CTRL 0x0820 - #define RG_TEST_CK_SEL2 0x00000400 //[10] 0->lvds ifclk, 1->scan clock - #define RG_TEST_CK_SEL1 0x00000200 //[9] 0->lvds ctsclk, 1->scan clock - #define RG_TEST_CK_SEL0 0x00000100 //[8] 0->lvds pclk, 1->scan clock - #define RG_TEST_CK_EN 0x00000004 //[2] lvdstx test pattern clock enable - #define RG_RX_CK_EN 0x00000002 //[1] lvdsrx clock enable - #define RG_TX_CK_EN 0x00000001 //[0] lvdstx clock enable - -#define LVDS_CLK_RESET 0x082c - #define RG_CTSCLK_RESET_B 0x00000002 //[1] contraol ctsclk_reset_b - #define RG_PCLK_RESET_B 0x00000001 //[0] control pclk_reset_b - -typedef enum -{ - LCD_DATA_FORMAT_VESA8BIT = 0, - LCD_DATA_FORMAT_VESA6BIT = 1, - LCD_DATA_FORMAT_DISM8BIT = 2 -} LCD_DATA_FMT; - - -// 2.VESA Standard 8Bit/6Bit encoder -#define LVDS_FMT_CTRL 0x0800 - #define RG_8BIT_FORMAT 0x00000000 //[6:4] Data format select 8-bit mode, 000->8bit mode - #define RG_6BIT_FORMAT 0x00000010 //[6:4] Data format select 8-bit mode, 001->6bit mode - #define RG_DE_INV 0x00000004 //[2] Input DE invert - #define RG_VSYNC_INV 0x00000002 //[1] Input VSYNC invert - #define RG_HSYNC_INV 0x00000001 //[0] Input HSYNC invert - -// 3.R_SEL/G_SEL/B_SEL should be set to the same value -#define LVDS_R_SEL 0x080c - #define RG_R_SEL_VESA 0x00000000 //VESA Standard - #define RG_R_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_G_SEL 0x0810 - #define RG_G_SEL_VESA 0x00000000 //VESA Standard - #define RG_G_SEL_DISM 0x00492492 //DISM Standard - -#define LVDS_B_SEL 0x0814 - #define RG_B_SEL_VESA 0x00000000 //VESA Standard - #define RG_B_SEL_DISM 0x00492492 //DISM Standard - -// 4.Build-in test pattern -#define LVDS_RG_HV_TOTAL 0x0908 - #define LVDS_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define LVDS_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define LVDS_RG_HV_WIDTH 0x090c - #define LVDS_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define LVDS_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define LVDS_RG_HV_START 0x0910 - #define LVDS_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define LVDS_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define LVDS_RG_HV_ACTIVE 0x0914 - #define LVDS_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define LVDS_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define LVDS_RG_PTGEN_CTRL 0x0918 - #define LVDS_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define LVDS_PTGEN_TYPE 0x00000200 //[15:8] [1:0] 10:generate configurable color bar - #define LVDS_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define LVDS_RG_PTGEN_BD 0x091c - #define LVDS_PTGEN_BD_B 0x00200000 //[23:16] Background B From register for test ptgen - #define LVDS_PTGEN_BD_G 0x00002000 //[15:8] Background G From register for test ptgen - #define LVDS_PTGEN_BD_R 0x000000ff //[7:0] Background R From register for test ptgen - -#define LVDS_RG_PTGEN_DATA 0x0920 - #define LVDS_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define LVDS_PTGEN_G 0x00002000 //[15:8] G From register for test ptgen - #define LVDS_PTGEN_R 0x00000020 //[7:0] R From register for test ptgen - -// 5.CRC check for digital function -#define LVDS_CRC_CTRL 0x0904 - #define RG_CRC_CLR 0x00000002 //[1] lvdstx_crc crc check clear control - #define RG_CRC_START 0x00000001 //[0] lvdstx_crc crc check start control - -#define LVDS_TX_CRC_STATUS 0x0934 - -// 6.LVDS analog test -#define LVDS_RG_TST_CH 0x0830 - #define RG_LVDS_CH2 0x00a00000 //[23:20] Channel 2 From register for ANA test - #define RG_LVDS_CH1 0x00002800 //[13:10] Channel 1 From register for ANA test - #define RG_LVDS_CH0 0x0000000a //[3:0] Channel 0 From register for ANA test - -#define LVDS_RG_TST_CLK 0x0834 - #define RG_LVDS_PAT_EN 0x80000000 //[31] Source From register for Analog test enable - #define RG_LVDS_CLK 0x00002800 //[13:10] Clcok channel From register for ANA test - #define RG_LVDS_CH3 0x0000000a //[3:0] Channel 3 From register for ANA test - -// 7.Lvdstx_fmt output control -#define LVDS_RG_SRC 0x0804 - #define RG_B 0x00000000 //[31:24] Register source for B - #define RG_G 0x00000000 //[23:16] Register source for G - #define RG_R 0x00000000 //[15:8] Register source for R - #define RG_B_SEL 0x00000000 //[5:4] 00->B, 01->R, 10->G, 11->rg_b - #define RG_G_SEL 0x00000000 //[3:2] 00->G, 01->B, 10->R, 11->rg_g - #define RG_R_SEL 0x00000000 //[1:0] 00->R, 01->G, 10->B, 11->rg_r - -#define LVDS_RG_CTRL 0x0808 - #define RG_DE 0x00000000 //[8] Register source for DE - #define RG_VSYNC 0x00000000 //[7] Register source for VSYNC - #define RG_HSYNC 0x00000000 //[6] Register source for HSYNC - #define RG_DE_SEL 0x00000000 //[5:4] 00->de, 01->hsync, 10->vsync, 11->rg_de - #define RG_VSYNC_SEL 0x00000000 //[3:2] 00->vsync, 01->de, 10->hsync, 11->rg_vsync - #define RG_HSYNC_SEL 0x00000000 //[1:0] 00->hsync, 01->vsync, 10->de, 11->rg_hsync - -// 8.Channel swap and bit invert -#define LVDS_CH_SWAP 0x081c - #define RG_SWAP_SEL 0x80000000 //[31] lvds_pa*_tmds_[6:0] Swap - #define RG_TOP_PN 0x00000000 //[28:24] Channel P/N Swap - #define RG_ML_SWAP 0x00000000 //[20:16] Channel MSB/LSB Swap - #define RG_CLK_SEL 0x00000000 //[14:12] Clock channel source select - #define RG_CH3_SEL 0x00000000 //[11:9] Channel 3 Source select - #define RG_CH2_SEL 0x00000000 //[8:6] Channel 2 Source select - #define RG_CH1_SEL 0x00000000 //[5:3] Channel 1 Source select - #define RG_CH0_SEL 0x00000000 //[2:0] Channel 0 Source select - - -// DGI0 (Base Address:+400h/+500h) -// 1.Basic setting -#define DGI0_DEC_CTRL 0x0400 - #define FIFO_WRITE_EN 0x00008000 //[15] fifo write enable - #define RESET_COUNTER 0x08000000 //[27] reset the counter for timing generate - #define CLEAR_COUNTER 0x00000000 - -#define DGI0_FIFO_CTRL 0x0404 - #define SW_RST 0x00080000 //[19] soft reset - #define FIFO_RESET_ON 0x00020000 //[17] fifo reset or not - #define RD_START 0x00000040 //[6:0] - -#define DGI0_DATA_OUT_CTRL 0x0408 - #define DATA_OUT_SWAP 0x04000000 //[26]rise fifo data and fall fifo swap bit - #define TTL_TIM_SWAP 0x00003000 //[14:12] ttl out timing swap HSYNC ->DE - #define TTL_TIM_SWAP2 0x00005000 //[14:12] ttl out timing swap VSYNC ->DE - -#define DGI0_DITHER_CTRL0 0x0410 - #define FRC_EN 0x10000000 //[28] frc dither enable - #define FCNT_DIF_EN 0x00000800 //[11] fcnt diffuse enable - #define SYNC_SEL 0x00000200 //[9] 0->internal sync generation by input DE, 1->input sync - #define OUT_FMT 0x00000010 //[5:4] 00->4bit, 01->6bit, 10->8bit, 11->10bit - -#define DGI0_DITHER_CTRL1 0x0414 -#define DGI0_DITHER_CTRL2 0x0418 - -#define DGI0_TG_CTRL00 0x041c - #define PRGS_OUT 0x00104000 //[20] progressive out - -#define DGI0_TG_CTRL01 0x0420 - #define RG_VSYNC_FORWARD 0x80000000 //[31] verical delay forward or back - #define RG_VSYNC_DELAY 0x00020000 //[28:16] vertical delay - #define RG_HSYNC_DELAY 0x000003a8 //[12:0] horizontal delay - -#define DGI0_TG_CTRL02 0x0424 - #define VSYNC_TOTAL 0x020d0000 //[27:16] vertical total - #define HSYNC_TOTAL 0x000003aa //[12:0] horizontal total - -#define DGI0_TG_CTRL03 0x0428 - #define VSYNC_WIDTH 0x00060000 //[24:16] vsync width - #define HSYNC_WIDTH 0x0000003e //[11:0] hsync width - -#define DGI0_TG_CTRL04 0x042c - #define H_ACT2_EN 0x00000400 //[10] horizontal active 2 enable - #define V_ACT2_EN 0x00000200 //[9] vertical active 2 enable - #define HD_ON 0x00000100 //[8] HD on - #define VSYNC_POL 0x00000040 //[6] vsync polarity - #define HSYNC_POL 0x00000020 //[5] hsync polarity - #define DE_POL 0x00000010 //[4] de polarity - -#define DGI0_TG_CTRL05 0x0430 - #define X_ACTIVE_START 0x007a0000 //[28:16] horizontal start point - #define X_ACTIVE_END 0x00000399 //[12:0] horizontal end point - -#define DGI0_TG_CTRL06 0x0434 - #define Y_ACTIVE_OSTART 0x00240000 //[27:16] odd vertical start point - #define Y_ACTIVE_OEND 0x00000203 //[11:0] odd vertical end point - -#define DGI0_TG_CTRL07 0x0438 - #define Y_ACTIVE_ESTART 0x00240000 //[27:16] even vertical start point - #define Y_ACTIVE_EEND 0x00000203 //[11:0] even vertical end point - -#define DGI0_TG_CTRL08 0x043c - #define X_ACTIVE_START_1 0x007a0000 //[28:16] horizontal start point 1 - #define X_ACTIVE_END_1 0x00000399 //[12:0] horizontal end point 1 - -#define DGI0_TG_CTRL09 0x0440 - #define Y_ACTIVE_OSTART_1 0x00240000 //[27:16] odd vertical start point 1 - #define Y_ACTIVE_OEND_1 0x00000203 //[11:0] odd vertical end point 1 - -#define DGI0_TG_CTRL10 0x0444 - #define Y_ACTIVE_ESTART_1 0x00240000 //[27:16] even vertical start point 1 - #define Y_ACTIVE_EEND_1 0x00000203 //[11:0] even vertical end point 1 - -#define DGI0_ANAIF_CTRL2 0x0448 - #define HDMIPLL_REG_CLK_SEL 0x00000000 //[31] hdmipll reference clock select bit, 0->dgi1_ref_clk, 1->dgi0_ref_clk - #define DGI1_DEL_D2_D4_SEL 0x00000000 //[17] dgi1 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI1_DEL_D1_SEL 0x00000000 //[16] dgi1 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - #define DGI0_DEL_D2_D4_SEL 0x00000000 //[1] dgi0 reference clock devide 2 or devide 4 select, 0->devide 2, 1->devide 4 - #define DGI0_DEL_D1_SEL 0x00000000 //[0] dgi0 reference clock devide 1 select, 0->devide 1, 1->select the d2_d4 clock - -#define DGI0_ANAIF_CTRL0 0x044c - #define DGI0_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi0 clock delay chain select 1 - #define DGI0_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi0 clock delay chain select 0 - #define DGI0_CK_INV_PRE_CTRL 0x0000000 //[1] dgi0 pad clock invert - #define DGI0_PAD_CLK_ENABLE 0x0000001 //[0] dgi0 pad clock enable - #define DGI0_PAD_CLK_DISABLE 0x0000000 //[0] dgi0 pad clock disable - -#define DGI0_ANAIF_CTRL1 0x0450 - #define DGI1_PAD_CLK_INV_EN 0x0000000 //[31] invter clock - #define DGI1_CLK_DELAY_SEL1 0x0000000 //[29:24] dgi1 clock delay chain select 1 - #define DGI1_CLK_DELAY_SEL0 0x0000000 //[21:16] dgi1 clock delay chain select 0 - #define DATA_IN_TV_MODE 0x0000000 //[9] data in TV mode - #define DATA_IN_BIT_INV 0x0000000 //[8] data in bit inv - #define ANAIF_DGI1_CLK_SEL 0x0000000 //[6] anaif dgi1 clock select from dgi0 clock or dgi1 clock - #define CLK_SEL_TV_MODE 0x0000000 //[4] clock in TV mode - #define CLK_MODE_SEL 0x0000000 //[3] clock mode select - #define NWEB_CLK_EN 0x0000000 //[2] nweb clock enable - #define DGI1_PAD_CLK_EN 0x0000000 //[1] dgi1 pad clk enable - #define TV_MODE_CLK_EN 0x0000000 //[0] TV mode clock enable - - -#define DGI0_TTL_ANAIF_CTRL 0x0454 - #define TTL_CLK_TEST_MODE 0x00000000 //[31] ttl clock test mode, 0->lvds display clock, 1->dgi0 anaif clock - #define TTL_CLK_DELAY_SEL1 0x00000000 //[21:16] ttl clock delay chain select 1 - #define TTL_CLK_DELAY_SEL0 0x00000000 //[13:8] ttl clock delay chain select 0 - #define TTL_CLK_INV_ENABLE 0x00000001 //[0] ttl clock invert enable - -#define DGI0_TTL_ANAIF_CTRL1 0x0458 - #define PAD_TTL_EN_PP 0x00000002 //[1] enable ttl out preplace, set to 1 - #define PAD_TTL_EN_FUN_SEL 0x00000001 //[0] TTL Pinmux, 1->function 2, 0->function 1 - -#define DGI0_CLK_RST_CTRL 0x045c - #define DGI0_TEST_MODE 0x80000000 //[31] dgi0 clk_out test mode - #define CLK_OUT_TO_IN_INV 0x00000000 //[5] clk_in_inv use clk_out when pat_gen - #define CLK_OUT_TO_IN 0x00000000 //[4] clk_in use clk_out when pat_gen - #define CLK_PAT_GEN_EN 0x00000008 //[3] pat_gen clock enable - #define DGI0_CLK_OUT_ENABLE 0x00000004 //[2] dgi0 clk_out enable - #define DGI0_CLK_IN_INV_ENABLE 0x00000002 //[1] dgi0 clk_in_inv enable - #define DGI0_CLK_IN_ENABLE 0x00000001 //[0] dgi0 clk_in enable - #define DGI0_CLK_OUT_DISABLE 0x00000000 //[2] dgi0 clk_out disable - -#define DGI0_PAT_GEN_CTRL0 0x0500 - #define RG_PTGEN_V_TOTAL 0x027b0000 //[27:16] V total From register for test ptgen - #define RG_PTGEN_H_TOTAL 0x00000540 //[12:0] H total From register for test ptgen - -#define DGI0_PAT_GEN_CTRL1 0x0504 - #define RG_PTGEN_V_WIDTH 0x00050000 //[27:16] V width From register for test ptgen - #define RG_PTGEN_H_WIDTH 0x00000080 //[12:0] H width From register for test ptgen - -#define DGI0_PAT_GEN_CTRL2 0x0508 - #define RG_PTGEN_V_START 0x00150000 //[27:16] V start From register for test ptgen - #define RG_PTGEN_H_START 0x00000118 //[12:0] H start From register for test ptgen - -#define DGI0_PAT_GEN_CTRL3 0x050c - #define RG_PTGEN_V_ACTIVE 0x02580000 //[27:16] V active From register for test ptgen - #define RG_PTGEN_H_ACTIVE 0x00000400 //[12:0] H active From register for test ptgen - -#define DGI0_PAT_GEN_CTRL4 0x0510 - #define RG_COLOR_BAR_TH 0x04000000 //[27:16] Threshold of de_v_count for test enable - #define RG_PTGEN_TYPE 0x00000200 //[15:8] [1:0]=10:generate configurable color bar - #define PAT_GEN_RST 0x00000004 //[2] pat_gen reset - #define PAT_IN 0x00000002 //[1] data in use pattern gen data - #define RG_TST_PAT_EN 0x00000001 //[0] Test Patgen Enable - -#define DGI0_PAT_GEN_CTRL5 0x0514 - #define RG_PTGEN_BD_B 0x00ff0000 //[23:16] Background B From register for test ptgen - #define RG_PTGEN_BD_G 0x00008800 //[15:8] Background G From register for test ptgen - #define RG_PTGEN_BD_R 0x00000044 //[7:0] Background R From register for test ptgen - -#define DGI0_PAT_GEN_CTRL6 0x0518 - #define RG_PTGEN_B 0x00ff0000 //[23:16] B From register for test ptgen - #define RG_PTGEN_G 0x00008800 //[15:8] G From register for test ptgen - #define RG_PTGEN_R 0x00000044 //[7:0] R From register for test ptgen - -#define DGI0_CRC_MON_CT 0x051c - #define C_CRC_CLR 0x00000002 - #define C_CRC_START 0x00000001 - -#define DGI0_CRC_OUT 0x0520 - #define CRC_RDY 0x10000000 - #define CRC_OUT 0x00ffffff - -#define DGI0_MON 0x0524 - -//ckgen setting -#define REG_LVDS_DISP_CKCFG 0x1014 -#define REG_LVDS_CTSCLKCFG 0x1018 -#define REG_LVDS_PWR_RST_B 0x1108 -#define REG_LVDS_PWR_CTRL 0x110c - -#define RG_LVDSWRAP_CTRL1 0x1254 - #define RG_DCXO_POR_MON_EN 0x00000100 //[8]dcxo_por mon enable - #define RG_PLL1_DIV 0x00000004 //[3:0] rg_pll1_div - #define RG_PLL1_DIV2 0x00000002 //[3:0] rg_pll1_div - #define RG_PLL1_DIV3 0x00000006 //[3:0] rg_pll1_div - -#define REG_LVDS_ANACFG0 0x1310 - #define RG_LVDS_APD 0xf8000000 //[31:27] - #define RG_LVDS_BIASA_PD 0x02000000 //[25] - #define RG_LVDS_ATERM_EN 0x00800000 //[24:23]00: No source termination; 10: 1k Ohm termination; 01: 100 Ohm termination; 11: 90 Ohm termination; - #define RG_LVDS_APSRC 0x00400000 //[22:20]LVDS A Group P Slew Rate Control; Strongest: 000; Weakest: 111 - #define RG_LVDS_ANSRC 0x00070000 //[19:17]LVDS A Group N Slew Rate Control; Strongest: 111; Weakest: 000 - #define RG_LVDS_ATVCM 0x0000c000 //[16:14]LVDS A Group Common Mode Voltage Control - #define RG_LVDS_ATVO 0x00002000 //LVDS A Group Output Swing Control - -#define REG_LVDS_ANACFG1 0x1314 - #define RG_LVDS_AE4 0x80000000 //[31]A Group TTL Output Enable 4ma strength control. - #define RG_LVDS_AE8 0x40000000 //[30]A Group TTL Output Enable 8ma strength control. - #define RG_LVDS_ASR 0x20000000 //[29]A Group TTL Output Slew Rate control - #define RG_LVDS_ASMTEN 0x10000000 //[28]A Group TTL Input Smitch Trigger Enable - #define RG_LVDS_AMINI_SEL_CK0 0x00000000 //[1] A Group Mini-LVDS ck channel enable - -#define REG_LVDS_ANACFG2 0x1318 - #define RG_VPLL_BC 0x30000000 //[31:27]Integral path cap value - #define RG_VPLL_BIC 0x02000000 //[26:24]Integral path charge pump current - #define RG_VPLL_BIR 0x00200000 //[23:20]Proportional path charge pump current - #define RG_VPLL_BP 0x00010000 //[19:16]Power down for VOPLL Bias - #define RG_VPLL_BG_PD 0x00008000 //[15]Power down for Bandgap - #define RG_VPLL_BR 0x00005000 //[14:12]Proportional path res value - #define RG_VPLL_BIAS_PD 0x00000800 //[11]Power down for VOPLL Bias - -#define REG_LVDS_ANACFG3 0x131c - #define RG_VPLL_DIV 0x00040000 //[21:17]Divider setting - #define RG_VPLL_DPIX_CKSEL 0x00001000 //[13:12]VPLL_DPIX_CLK Selection - #define RG_LVDS_DELAY 0x00000080 //[10:8]LVDS_DPIX_CLK Delay setting 70ps / step - #define RG_VPLL_MKVCO 0x00000040 //[7]VCO Range From 160 MHz~ 390 MHz - #define RG_VPLL_POSTDIV_EN 0x00000010 //[4] - -#define REG_LVDS_ANACFG4 0x1320 - #define RG_VPLL_RST 0x00800000 //[23] - #define RG_T2TTLO_EN 0x00000800 //[11] - #define RG_VPLL_PD 0x00000400 //[10] - #define RG_BYPASS 0x00000200 //[9]mini clock by pass phase interpolater - #define RG_LVDS_BYPASS 0x00000100 //[8] - -#define REG_PLL_GPANACFG0 0x134c - #define RG_PLL1_EN 0x80000000 //[31]Power Down 0: Power down 1: Power on - #define RG_PLL1_FBDIV 0x4c000000 //[30:26] Feedback divide ratio (N+1 Divider) - #define RG_PLL1_FBDIV2 0x2c000000 // - #define RG_PLL1_FBDIV3 0x6c000000 // - #define RG_PLL1_PREDIV 0x01000000 //[25:24] Pre-divider ratio - #define RG_PLL1_RST_DLY 0x00300000 //[21:20]Reset Time Control,Tin=1/Fref 00: 2^5 * Tin - #define RG_PLL1_LF 0x00000800 //[11]Frequency Band Control - #define RG_PLL1_MONCKEN 0x00000100 //[8]PLL1 clock monitor enable - #define RG_PLL1_VODEN 0x00000080 //[7]CHP OverDrive Enable - #define RG_NFIPLL_EN 0x00000002 //[1]Power Down 0: Power down 1: Power on diff --git a/arch/arm/mach-mt8127/ttab/lcm/inc/sn65dsi83_i2c.h b/arch/arm/mach-mt8127/ttab/lcm/inc/sn65dsi83_i2c.h deleted file mode 100644 index 6b9191ed649..00000000000 --- a/arch/arm/mach-mt8127/ttab/lcm/inc/sn65dsi83_i2c.h +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** -* -* Filename: -* --------- -* sn65dsi83.h -* -* Project: -* -------- -* Android -* -* Description: -* ------------ -* sn65dsi83 header file -* -* Author: -* ------- -* -****************************************************************************/ - -#ifndef _sn65dsi83_SW_H_ -#define _sn65dsi83_SW_H_ -#ifndef BUILD_LK - -//--------------------------------------------------------- -extern int sn65dsi83_read_byte(kal_uint8 cmd, kal_uint8 *returnData); -extern int sn65dsi83_write_byte(kal_uint8 cmd, kal_uint8 writeData); -#endif -#endif // _fan5405_SW_H_ - diff --git a/arch/arm/mach-mt8127/ttab/lcm/mt65xx_lcm_list.c b/arch/arm/mach-mt8127/ttab/lcm/mt65xx_lcm_list.c deleted file mode 100644 index baa92391789..00000000000 --- a/arch/arm/mach-mt8127/ttab/lcm/mt65xx_lcm_list.c +++ /dev/null @@ -1,964 +0,0 @@ -#include -#ifdef BUILD_LK -#include -#else -#include -#include -#endif -#include -//used to identify float ID PIN status -#define LCD_HW_ID_STATUS_LOW 0 -#define LCD_HW_ID_STATUS_HIGH 1 -#define LCD_HW_ID_STATUS_FLOAT 0x02 -#define LCD_HW_ID_STATUS_ERROR 0x03 - -#ifdef BUILD_LK -#define LCD_DEBUG(fmt) dprintf(CRITICAL,fmt) -#else -#define LCD_DEBUG(fmt) printk(fmt) -#endif -extern LCM_DRIVER otm1282a_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63319_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35598_wqhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER lp079x01_lcm_drv; -extern LCM_DRIVER hx8369_lcm_drv; -extern LCM_DRIVER hx8369_6575_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_hvga_lcm_drv; -extern LCM_DRIVER hx8363_6575_dsi_qvga_lcm_drv; -extern LCM_DRIVER hx8363b_wvga_dsi_cmd_drv; -extern LCM_DRIVER bm8578_lcm_drv; -extern LCM_DRIVER nt35582_mcu_lcm_drv; -extern LCM_DRIVER nt35582_mcu_6575_lcm_drv; -extern LCM_DRIVER nt35582_rgb_6575_lcm_drv; -extern LCM_DRIVER hx8357b_lcm_drv; -extern LCM_DRIVER hx8357c_hvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369_dsi_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_hvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_6575_qvga_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369b_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_drv; -extern LCM_DRIVER hx8369_hvga_lcm_drv; -extern LCM_DRIVER ili9481_lcm_drv; -extern LCM_DRIVER nt35582_lcm_drv; -extern LCM_DRIVER s6d0170_lcm_drv; -extern LCM_DRIVER spfd5461a_lcm_drv; -extern LCM_DRIVER ta7601_lcm_drv; -extern LCM_DRIVER tft1p3037_lcm_drv; -extern LCM_DRIVER ha5266_lcm_drv; -extern LCM_DRIVER hsd070idw1_lcm_drv; -extern LCM_DRIVER lg4571_lcm_drv; -extern LCM_DRIVER lg4573b_wvga_dsi_vdo_lh430mv1_drv; -extern LCM_DRIVER lvds_wsvga_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_lcm_drv; -extern LCM_DRIVER lvds_wsvga_ti_n_lcm_drv; -extern LCM_DRIVER nt35565_3d_lcm_drv; -extern LCM_DRIVER tm070ddh03_lcm_drv; -extern LCM_DRIVER r61408_lcm_drv; -extern LCM_DRIVER r61408_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_lcm_drv; -extern LCM_DRIVER nt35510_dpi_lcm_drv; -extern LCM_DRIVER nt35510_hvga_lcm_drv; -extern LCM_DRIVER nt35510_qvga_lcm_drv; -extern LCM_DRIVER nt35510_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_6517_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_hvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_fwvga_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6572_qvga_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6572_drv; -extern LCM_DRIVER nt35510_dpi_6572_lcm_drv; -extern LCM_DRIVER nt35510_mcu_6572_lcm_drv; -extern LCM_DRIVER nt51012_hd720_dsi_vdo_lcm_drv; -extern LCM_DRIVER r63303_idisplay_lcm_drv; -extern LCM_DRIVER hj080ia_lcm_drv; -extern LCM_DRIVER hj101na02a_lcm_drv; -extern LCM_DRIVER hj101na02a_8135_lcm_drv; -extern LCM_DRIVER hsd070pfw3_lcm_drv; -extern LCM_DRIVER hsd070pfw3_8135_lcm_drv; -extern LCM_DRIVER cm_n070ice_dsi_vdo_lcm_drv; -extern LCM_DRIVER ej101ia_lcm_drv; -extern LCM_DRIVER scf0700m48ggu02_lcm_drv; -extern LCM_DRIVER nt35510_fwvga_lcm_drv; -#if defined(GN_SSD2825_SMD_S6E8AA) -extern LCM_DRIVER gn_ssd2825_smd_s6e8aa; -#endif -extern LCM_DRIVER nt35517_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8369_dsi_bld_lcm_drv; -extern LCM_DRIVER hx8369_dsi_tm_lcm_drv; -extern LCM_DRIVER otm1280a_hd720_dsi_cmd_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_txd_fwvga_lcm_drv; -extern LCM_DRIVER nt35512_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35512_wvga_dsi_vdo_boe_drv; -extern LCM_DRIVER hx8369_rgb_6585_fpga_lcm_drv; -extern LCM_DRIVER hx8369_rgb_6572_fpga_lcm_drv; -extern LCM_DRIVER hx8369_mcu_6572_lcm_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_cmd_drv; -extern LCM_DRIVER hx8369a_wvga_dsi_vdo_drv; -extern LCM_DRIVER hx8392a_dsi_cmd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER ssd2075_hd720_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_cmi_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_ips9k1431_drv; -extern LCM_DRIVER nt35516_qhd_dsi_cmd_tft9k1342_drv; -extern LCM_DRIVER bp070ws1_lcm_drv; -extern LCM_DRIVER bp101wx1_lcm_drv; -extern LCM_DRIVER bp101wx1_n_lcm_drv; -extern LCM_DRIVER nt35516_qhd_rav4_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vdo_sharp_lcm_drv; -extern LCM_DRIVER r81592_hvga_dsi_cmd_drv; -extern LCM_DRIVER rm68190_dsi_vdo_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_vdo_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv; -extern LCM_DRIVER nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv; -extern LCM_DRIVER nt35596_fhd_dsi_vdo_yassy_lcm_drv; -extern LCM_DRIVER nt35590_hd720_dsi_cmd_truly2_lcm_drv; -extern LCM_DRIVER otm9608_wvga_dsi_cmd_drv; -extern LCM_DRIVER nt35510_dbi_18bit_gionee_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_cmd_tianma_lcm_drv; -extern LCM_DRIVER otm8009a_fwvga_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cm_otc3108bhv161_dsi_vdo_lcm_drv; -extern LCM_DRIVER auo_b079xat02_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv; -extern LCM_DRIVER cpt_claa101fp01_dsi_vdo_lcm_drv; -extern LCM_DRIVER h070d_18dm_lcm_drv; -extern LCM_DRIVER hx8394a_hd720_dsi_vdo_tianma_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_sn65dsi83_lcm_drv; -extern LCM_DRIVER nt35520_hd720_tm_lcm_drv; -extern LCM_DRIVER nt35520_hd720_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_dsi_vdo_boe_lcm_drv; -extern LCM_DRIVER nt35521_hd720_tm_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_vdo_lcm_drv; -extern LCM_DRIVER r69429_wuxga_dsi_cmd_lcm_drv; -extern LCM_DRIVER rm68210_hd720_dsi_ufoe_cmd_lcm_drv; -extern LCM_DRIVER r63311_fhd_dsi_vedio_lcm_drv; -extern LCM_DRIVER cpt_clap070wp03xg_lvds_lcm_drv; -extern LCM_DRIVER otm8018b_dsi_vdo_lcsh72_lcm_drv; -extern LCM_DRIVER hx8369_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER hx8369_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER hx8369_dbi_6571_lcm_drv; -extern LCM_DRIVER hx8369_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_hvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_cmd_6571_qvga_lcm_drv; -extern LCM_DRIVER nt35510_dsi_vdo_6571_lcm_drv; -extern LCM_DRIVER nt35510_dbi_6571_lcm_drv; -extern LCM_DRIVER nt35510_dpi_6571_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_fwvga_lcm_drv; -extern LCM_DRIVER nt35590_dsi_cmd_6571_qhd_lcm_drv; -extern LCM_DRIVER it6151_edp_dsi_video_sharp_lcm_drv; -extern LCM_DRIVER nt35517_qhd_dsi_vdo_lcm_drv; -extern LCM_DRIVER hx8389b_qhd_dsi_vdo_lgd_lcm_drv; -extern LCM_DRIVER it6151_fhd_edp_dsi_video_auo_lcm_drv; -extern LCM_DRIVER tf070mc_rgb_v18_mt6571_lcm_drv; -extern LCM_DRIVER zs070ih5015b3h6_mt6571_lcm_drv; -extern LCM_DRIVER a080ean01_dsi_vdo_lcm_drv; -LCM_DRIVER* lcm_driver_list[] = -{ -#if defined(OTM8018B_DSI_VDO_TXD_FWVGA) - &otm8018b_dsi_vdo_txd_fwvga_lcm_drv, -#endif - -#if defined(TF070MC_RGB_V18_MT6571) - &tf070mc_rgb_v18_mt6571_lcm_drv, -#endif - -#if defined(ZS070IH5015B3H6_RGB_MT6571) - &zs070ih5015b3h6_mt6571_lcm_drv, -#endif - -#if defined(OTM1282A_HD720_DSI_VDO) - &otm1282a_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO) - &r63311_fhd_dsi_vedio_lcm_drv, -#endif -#if defined(NT35517_QHD_DSI_VDO) - &nt35517_dsi_vdo_lcm_drv, -#endif - - -#if defined(LP079X01) - &lp079x01_lcm_drv, -#endif - -#if defined(HX8369) - &hx8369_lcm_drv, -#endif - -#if defined(HX8369_6575) - &hx8369_6575_lcm_drv, -#endif - -#if defined(BM8578) - &bm8578_lcm_drv, -#endif - -#if defined(NT35582_MCU) - &nt35582_mcu_lcm_drv, -#endif - -#if defined(NT35582_MCU_6575) - &nt35582_mcu_6575_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_TRULY2) - &nt35590_hd720_dsi_cmd_truly2_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_VDO_TRULY) - &nt35590_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(SSD2075_HD720_DSI_VDO_TRULY) - &ssd2075_hd720_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD) - &nt35590_hd720_dsi_cmd_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO) - &nt35590_hd720_dsi_cmd_auo_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_WVGA) - &nt35590_hd720_dsi_cmd_auo_wvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_QHD) - &nt35590_hd720_dsi_cmd_auo_qhd_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_AUO_FWVGA) - &nt35590_hd720_dsi_cmd_auo_fwvga_lcm_drv, -#endif - -#if defined(NT35590_HD720_DSI_CMD_CMI) - &nt35590_hd720_dsi_cmd_cmi_lcm_drv, -#endif - -#if defined(NT35582_RGB_6575) - &nt35582_rgb_6575_lcm_drv, -#endif - -#if defined(NT51012_HD720_DSI_VDO) - &nt51012_hd720_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_RGB_6585_FPGA) - &hx8369_rgb_6585_fpga_lcm_drv, -#endif - -#if defined(HX8369_RGB_6572_FPGA) - &hx8369_rgb_6572_fpga_lcm_drv, -#endif - -#if defined(HX8369_MCU_6572) - &hx8369_mcu_6572_lcm_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_CMD) - &hx8369a_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369A_WVGA_DSI_VDO) - &hx8369a_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8357B) - &hx8357b_lcm_drv, -#endif - -#if defined(HX8357C_HVGA_DSI_CMD) - &hx8357c_hvga_dsi_cmd_drv, -#endif - -#if defined(R61408) - &r61408_lcm_drv, -#endif - -#if defined(R61408_WVGA_DSI_CMD) - &r61408_wvga_dsi_cmd_drv, -#endif - -#if defined(HX8369_DSI_VDO) - &hx8369_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369_DSI) - &hx8369_dsi_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_NFC_ZTE) - &hx8369_dsi_6575_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_HVGA) - &hx8369_dsi_6575_hvga_lcm_drv, -#endif - -#if defined(HX8369_6575_DSI_QVGA) - &hx8369_dsi_6575_qvga_lcm_drv, -#endif - -#if defined(HX8369_HVGA) - &hx8369_hvga_lcm_drv, -#endif - -#if defined(NT35510) - &nt35510_lcm_drv, -#endif - -#if defined(NT35510_RGB_6575) - &nt35510_dpi_lcm_drv, -#endif - -#if defined(NT35510_HVGA) - &nt35510_hvga_lcm_drv, -#endif - -#if defined(NT35510_QVGA) - &nt35510_qvga_lcm_drv, -#endif - -#if defined(NT35510_WVGA_DSI_CMD) - &nt35510_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_6517) - &nt35510_6517_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572) - &nt35510_dsi_cmd_6572_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_HVGA) - &nt35510_dsi_cmd_6572_hvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_FWVGA) - &nt35510_dsi_cmd_6572_fwvga_drv, -#endif - -#if defined(NT35510_DSI_CMD_6572_QVGA) - &nt35510_dsi_cmd_6572_qvga_drv, -#endif - -#if defined(NT35510_DSI_VDO_6572) - &nt35510_dsi_vdo_6572_drv, -#endif - -#if defined(NT35510_DPI_6572) - &nt35510_dpi_6572_lcm_drv, -#endif - -#if defined(NT35510_MCU_6572) - &nt35510_mcu_6572_lcm_drv, -#endif - -#if defined(ILI9481) - &ili9481_lcm_drv, -#endif - -#if defined(NT35582) - &nt35582_lcm_drv, -#endif - -#if defined(S6D0170) - &s6d0170_lcm_drv, -#endif - -#if defined(SPFD5461A) - &spfd5461a_lcm_drv, -#endif - -#if defined(TA7601) - &ta7601_lcm_drv, -#endif - -#if defined(TFT1P3037) - &tft1p3037_lcm_drv, -#endif - -#if defined(HA5266) - &ha5266_lcm_drv, -#endif - -#if defined(HSD070IDW1) - &hsd070idw1_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI) - &hx8363_6575_dsi_lcm_drv, -#endif - -#if defined(HX8363_6575_DSI_HVGA) - &hx8363_6575_dsi_hvga_lcm_drv, -#endif - -#if defined(HX8363B_WVGA_DSI_CMD) - &hx8363b_wvga_dsi_cmd_drv, -#endif - -#if defined(LG4571) - &lg4571_lcm_drv, -#endif - -#if defined(LG4573B_WVGA_DSI_VDO_LH430MV1) - &lg4573b_wvga_dsi_vdo_lh430mv1_drv, -#endif - -#if defined(LVDS_WSVGA) - &lvds_wsvga_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI) - &lvds_wsvga_ti_lcm_drv, -#endif - -#if defined(LVDS_WSVGA_TI_N) - &lvds_wsvga_ti_n_lcm_drv, -#endif - -#if defined(NT35565_3D) - &nt35565_3d_lcm_drv, -#endif - -#if defined(TM070DDH03) - &tm070ddh03_lcm_drv, -#endif -#if defined(R63303_IDISPLAY) - &r63303_idisplay_lcm_drv, -#endif - -#if defined(HX8369B_DSI_VDO) - &hx8369b_dsi_vdo_lcm_drv, -#endif - -#if defined(HX8369B_WVGA_DSI_VDO) - &hx8369b_wvga_dsi_vdo_drv, -#endif - -#if defined(HX8369B_QHD_DSI_VDO) - &hx8389b_qhd_dsi_vdo_drv, -#endif - -#if defined(GN_SSD2825_SMD_S6E8AA) - &gn_ssd2825_smd_s6e8aa, -#endif -#if defined(HX8369_TM_DSI) - &hx8369_dsi_tm_lcm_drv, -#endif - -#if defined(HX8369_BLD_DSI) - &hx8369_dsi_bld_lcm_drv, -#endif - -#if defined(HJ080IA) - &hj080ia_lcm_drv, -#endif - -#if defined(HJ101NA02A) - &hj101na02a_lcm_drv, -#endif - -#if defined(HJ101NA02A_8135) - &hj101na02a_8135_lcm_drv, -#endif - -#if defined(HSD070PFW3) - &hsd070pfw3_lcm_drv, -#endif - -#if defined(HSD070PFW3_8135) - &hsd070pfw3_8135_lcm_drv, -#endif - -#if defined(EJ101IA) - &ej101ia_lcm_drv, -#endif - -#if defined(SCF0700M48GGU02) - &scf0700m48ggu02_lcm_drv, -#endif - -#if defined(OTM1280A_HD720_DSI_CMD) - &otm1280a_hd720_dsi_cmd_drv, -#endif - -#if defined(OTM8018B_DSI_VDO) - &otm8018b_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_DSI_VDO) - &nt35512_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35512_WVGA_DSI_VDO_BOE) - &nt35512_wvga_dsi_vdo_boe_drv, -#endif - -#if defined(HX8392A_DSI_CMD) - &hx8392a_dsi_cmd_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE) - &nt35516_qhd_dsi_cmd_ipsboe_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_WVGA) - &nt35516_qhd_dsi_cmd_ipsboe_wvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPSBOE_FWVGA) - &nt35516_qhd_dsi_cmd_ipsboe_fwvga_lcm_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_IPS9K1431) - &nt35516_qhd_dsi_cmd_ips9k1431_drv, -#endif - -#if defined(NT35516_QHD_DSI_CMD_TFT9K1342) - &nt35516_qhd_dsi_cmd_tft9k1342_drv, -#endif - -#if defined(NT35516_QHD_DSI_VEDIO) - &nt35516_qhd_rav4_lcm_drv, -#endif - -#if defined(BP070WS1) - &bp070ws1_lcm_drv, -#endif - -#if defined(BP101WX1) - &bp101wx1_lcm_drv, -#endif - -#if defined(BP101WX1_N) - &bp101wx1_n_lcm_drv, -#endif - -#if defined(CM_N070ICE_DSI_VDO) - &cm_n070ice_dsi_vdo_lcm_drv, -#endif - -#if defined(CM_OTC3108BH161_DSI_VDO) - &cm_otc3108bhv161_dsi_vdo_lcm_drv, -#endif -#if defined(NT35510_FWVGA) - &nt35510_fwvga_lcm_drv, -#endif - -#if defined(R63311_FHD_DSI_VDO_SHARP) - &r63311_fhd_dsi_vdo_sharp_lcm_drv, -#endif - -#if defined(R81592_HVGA_DSI_CMD) - &r81592_hvga_dsi_cmd_drv, -#endif - -#if defined(RM68190_QHD_DSI_VDO) - &rm68190_dsi_vdo_lcm_drv, -#endif - -#if defined(NT35596_FHD_DSI_VDO_TRULY) - &nt35596_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_VDO_TRULY) - &nt35595_fhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(R63319_WQHD_DSI_VDO_TRULY) - &r63319_wqhd_dsi_vdo_truly_lcm_drv, -#endif - - -#if defined(NT35598_WQHD_DSI_VDO_TRULY) - &nt35598_wqhd_dsi_vdo_truly_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132) - &nt35595_fhd_dsi_cmd_truly_tps65132_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY_TPS65132_720P) - &nt35595_fhd_dsi_cmd_truly_tps65132_720p_lcm_drv, -#endif - -#if defined(NT35595_FHD_DSI_CMD_TRULY) - &nt35595_fhd_dsi_cmd_truly_lcm_drv, -#endif - - -#if defined(NT35596_FHD_DSI_VDO_YASSY) - &nt35596_fhd_dsi_vdo_yassy_lcm_drv, -#endif - -#if defined(AUO_B079XAT02_DSI_VDO) - &auo_b079xat02_dsi_vdo_lcm_drv, -#endif -#if defined(OTM9608_WVGA_DSI_CMD) - &otm9608_wvga_dsi_cmd_drv, -#endif - -#if defined(NT35510_DBI_18BIT_GIONEE) - &nt35510_dbi_18bit_gionee_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_CMD_TIANMA) - &otm8009a_fwvga_dsi_cmd_tianma_lcm_drv, -#endif - -#if defined(OTM8009A_FWVGA_DSI_VDO_TIANMA) - &otm8009a_fwvga_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_TIANMA) - &hx8389b_qhd_dsi_vdo_tianma_lcm_drv, -#endif -#if defined(HX8389B_QHD_DSI_VDO_TIANMA055XDHP) - &hx8389b_qhd_dsi_vdo_tianma055xdhp_lcm_drv, -#endif - -#if defined(CPT_CLAA101FP01_DSI_VDO) - &cpt_claa101fp01_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_EDP_DSI_VIDEO_SHARP) - &it6151_edp_dsi_video_sharp_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_SN65DSI83) - &cpt_clap070wp03xg_sn65dsi83_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_TM) - &nt35520_hd720_tm_lcm_drv, -#endif -#if defined(NT35520_HD720_DSI_CMD_BOE) - &nt35520_hd720_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VDO_BOE) - &nt35521_hd720_dsi_vdo_boe_lcm_drv, -#endif -#if defined(NT35521_HD720_DSI_VIDEO_TM) - &nt35521_hd720_tm_lcm_drv, -#endif -#if defined(H070D_18DM) - &h070d_18dm_lcm_drv, -#endif -#if defined(R69429_WUXGA_DSI_VDO) - &r69429_wuxga_dsi_vdo_lcm_drv, -#endif - - -#if defined(HX8394A_HD720_DSI_VDO_TIANMA) - &hx8394a_hd720_dsi_vdo_tianma_lcm_drv, -#endif - -#if defined(R69429_WUXGA_DSI_CMD) - &r69429_wuxga_dsi_cmd_lcm_drv, -#endif - -#if defined(RM68210_HD720_DSI_UFOE_CMD) - &rm68210_hd720_dsi_ufoe_cmd_lcm_drv, -#endif - -#if defined(CPT_CLAP070WP03XG_LVDS) - &cpt_clap070wp03xg_lvds_lcm_drv, -#endif - -#if defined(OTM8018B_DSI_VDO_LCSH72) - &otm8018b_dsi_vdo_lcsh72_lcm_drv, -#endif - -#if defined(HX8369_DSI_CMD_6571) - &hx8369_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(HX8369_DSI_VDO_6571) - &hx8369_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(HX8369_DBI_6571) - &hx8369_dbi_6571_lcm_drv, -#endif - -#if defined(HX8369_DPI_6571) - &hx8369_dpi_6571_lcm_drv, -#endif - -#if defined(HX8389B_QHD_DSI_VDO_LGD) - &hx8389b_qhd_dsi_vdo_lgd_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571) - &nt35510_dsi_cmd_6571_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_HVGA) - &nt35510_dsi_cmd_6571_hvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_CMD_6571_QVGA) - &nt35510_dsi_cmd_6571_qvga_lcm_drv, -#endif - -#if defined(NT35510_DSI_VDO_6571) - &nt35510_dsi_vdo_6571_lcm_drv, -#endif - -#if defined(NT35510_DBI_6571) - &nt35510_dbi_6571_lcm_drv, -#endif - -#if defined(NT35510_DPI_6571) - &nt35510_dpi_6571_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_FWVGA) - &nt35590_dsi_cmd_6571_fwvga_lcm_drv, -#endif - -#if defined(NT35590_DSI_CMD_6571_QHD) - &nt35590_dsi_cmd_6571_qhd_lcm_drv, -#endif - -#if defined(NT35517_QHD_DSI_VIDEO) - &nt35517_qhd_dsi_vdo_lcm_drv, -#endif - -#if defined(IT6151_FHD_EDP_DSI_VIDEO_AUO) - &it6151_fhd_edp_dsi_video_auo_lcm_drv, -#endif - -#if defined(A080EAN01_DSI_VDO) - &a080ean01_dsi_vdo_lcm_drv, -#endif -}; - -#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) -#define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) -#define LCM_COMPILE_ASSERT_XX(condition, line) char assertion_failed_at_line_##line[(condition)?1:-1] - -unsigned int lcm_count = sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*); -/*LCM_COMPILE_ASSERT(0 != sizeof(lcm_driver_list)/sizeof(LCM_DRIVER*));*/ -#if defined(NT35520_HD720_DSI_CMD_TM) | defined(NT35520_HD720_DSI_CMD_BOE) | defined(NT35521_HD720_DSI_VDO_BOE) | defined(NT35521_HD720_DSI_VIDEO_TM) -#ifdef BUILD_LK -extern void mdelay(unsigned long msec); -#endif -static unsigned char lcd_id_pins_value = 0xFF; - - -/****************************************************************************** -Function: which_lcd_module_triple - Description: read LCD ID PIN status,could identify three status:high¡¢low¡¢float - Input: none - Output: none - Return: LCD ID1|ID0 value - Others: -******************************************************************************/ -unsigned char which_lcd_module_triple(void) -{ - unsigned char high_read0 = 0; - unsigned char low_read0 = 0; - unsigned char high_read1 = 0; - unsigned char low_read1 = 0; - unsigned char lcd_id0 = 0; - unsigned char lcd_id1 = 0; - unsigned char lcd_id = 0; - //Solve Coverity scan warning : check return value - unsigned int ret = 0; - //only recognise once - if(0xFF != lcd_id_pins_value) - { - return lcd_id_pins_value; - } - //Solve Coverity scan warning : check return value - ret = mt_set_gpio_mode(GPIO_DISP_ID0_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID0_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID0_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_enable fail\n"); - } - ret = mt_set_gpio_mode(GPIO_DISP_ID1_PIN, GPIO_MODE_00); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_mode fail\n"); - } - ret = mt_set_gpio_dir(GPIO_DISP_ID1_PIN, GPIO_DIR_IN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_dir fail\n"); - } - ret = mt_set_gpio_pull_enable(GPIO_DISP_ID1_PIN, GPIO_PULL_ENABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_enable fail\n"); - } - //pull down ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - //delay 100ms , for discharging capacitance - mdelay(100); - //get ID0 ID1 status - low_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - low_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - //pull up ID0 ID1 PIN - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - //delay 100ms , for charging capacitance - mdelay(100); - //get ID0 ID1 status - high_read0 = mt_get_gpio_in(GPIO_DISP_ID0_PIN); - high_read1 = mt_get_gpio_in(GPIO_DISP_ID1_PIN); - - if( low_read0 != high_read0 ) - { - /*float status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read0) && (LCD_HW_ID_STATUS_LOW == high_read0)) - { - /*low status , pull down ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read0) && (LCD_HW_ID_STATUS_HIGH == high_read0)) - { - /*high status , pull up ID0 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_HIGH; - } - else - { - LCD_DEBUG(" Read LCD_id0 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID0_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID0 mt_set_gpio_pull_select->Disbale fail\n"); - } - lcd_id0 = LCD_HW_ID_STATUS_ERROR; - } - - - if( low_read1 != high_read1 ) - { - /*float status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_FLOAT; - } - else if((LCD_HW_ID_STATUS_LOW == low_read1) && (LCD_HW_ID_STATUS_LOW == high_read1)) - { - /*low status , pull down ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DOWN); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Down fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_LOW; - } - else if((LCD_HW_ID_STATUS_HIGH == low_read1) && (LCD_HW_ID_STATUS_HIGH == high_read1)) - { - /*high status , pull up ID1 ,to prevent electric leakage*/ - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_UP); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->UP fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_HIGH; - } - else - { - - LCD_DEBUG(" Read LCD_id1 error\n"); - ret = mt_set_gpio_pull_select(GPIO_DISP_ID1_PIN,GPIO_PULL_DISABLE); - if(0 != ret) - { - LCD_DEBUG("ID1 mt_set_gpio_pull_select->Disable fail\n"); - } - lcd_id1 = LCD_HW_ID_STATUS_ERROR; - } -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#else - printk("which_lcd_module_triple,lcd_id0:%d\n",lcd_id0); - printk("which_lcd_module_triple,lcd_id1:%d\n",lcd_id1); -#endif - lcd_id = lcd_id0 | (lcd_id1 << 2); - -#ifdef BUILD_LK - dprintf(CRITICAL,"which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#else - printk("which_lcd_module_triple,lcd_id:%d\n",lcd_id); -#endif - - lcd_id_pins_value = lcd_id; - return lcd_id; -} -#endif diff --git a/arch/arm/mach-mt8127/ttab/leds/Makefile b/arch/arm/mach-mt8127/ttab/leds/Makefile deleted file mode 100755 index 5581b72bc32..00000000000 --- a/arch/arm/mach-mt8127/ttab/leds/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-$(CONFIG_MTK_LEDS) += mt65xx/ - diff --git a/arch/arm/mach-mt8127/ttab/leds/mt65xx/Makefile b/arch/arm/mach-mt8127/ttab/leds/mt65xx/Makefile deleted file mode 100755 index a6906ffcfd5..00000000000 --- a/arch/arm/mach-mt8127/ttab/leds/mt65xx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_leds.o diff --git a/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.c b/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.c deleted file mode 100644 index 885be6ee62e..00000000000 --- a/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.c +++ /dev/null @@ -1,131 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -extern int disp_bls_set_backlight(unsigned int level); - -// Only support 64 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT 64 -// Support 256 levels of backlight (when lcd-backlight = MT65XX_LED_MODE_PWM) -#define BACKLIGHT_LEVEL_PWM_256_SUPPORT 256 - -// Configure the support type "BACKLIGHT_LEVEL_PWM_256_SUPPORT" or "BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT" !! -#define BACKLIGHT_LEVEL_PWM_MODE_CONFIG BACKLIGHT_LEVEL_PWM_256_SUPPORT - -unsigned int Cust_GetBacklightLevelSupport_byPWM(void) -{ - return BACKLIGHT_LEVEL_PWM_MODE_CONFIG; -} - -unsigned int brightness_mapping(unsigned int level) -{ - unsigned int mapped_level; -/* [FEATURE]-Mod-BEGIN by TCTSZ.yaohui.zeng, 2015/04/20,set BL min level to 8(PWM 3.14%)*/ - if((level <= 32)&&(level > 0)) - mapped_level = 32; - else - mapped_level = level; -/* [FEATURE]-Mod-END by TCTSZ.yaohui.zeng, 2015/04/20*/ - return mapped_level; -} -/* -unsigned int Cust_SetBacklight(int level, int div) -{ - kal_uint32 ret=0; -// mtkfb_set_backlight_pwm(div); -// mtkfb_set_backlight_level(brightness_mapping(level)); - - - * To explain How to set these para for cust_led_list[] of led/backlight - * "name" para: led or backlight - * "mode" para:which mode for led/backlight - * such as: - * MT65XX_LED_MODE_NONE, - * MT65XX_LED_MODE_PWM, - * MT65XX_LED_MODE_GPIO, - * MT65XX_LED_MODE_PMIC, - * MT65XX_LED_MODE_CUST_LCM, - * MT65XX_LED_MODE_CUST_BLS_PWM - * - *"data" para: control methord for led/backlight - * such as: - * MT65XX_LED_PMIC_LCD_ISINK=0, - * MT65XX_LED_PMIC_NLED_ISINK0, - * MT65XX_LED_PMIC_NLED_ISINK1, - * MT65XX_LED_PMIC_NLED_ISINK2, - * MT65XX_LED_PMIC_NLED_ISINK3 - * - *"PWM_config" para:PWM(AP side Or BLS module), by default setting{0,0,0,0,0} Or {0} - *struct PWM_config { - * int clock_source; - * int div; - * int low_duration; - * int High_duration; - * BOOL pmic_pad;//AP side PWM pin in PMIC chip (only 89 needs confirm); 1:yes 0:no(default) - *}; - *------------------------------------------------------------------------------------------- - * for AP PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1 - * div: clock division, can be any value within 0~7 (i.e. 1/2^(div) = /1, /2, /4, /8, /16, /32, /64, /128) - * low_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * High_duration: only for BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT - * - *2. PWM freq. - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_256_SUPPORT, - * PWM freq. = clock source / 2^(div) / 256 - * - * If BACKLIGHT_LEVEL_PWM_MODE_CONFIG = BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT, - * PWM freq. = clock source / 2^(div) / [(High_duration+1)(Level')+(low_duration+1)(64 - Level')] - * = clock source / 2^(div) / [(High_duration+1)*64] (when low_duration = High_duration) - *Clock source: - * 0: block clock/1625 = 26M/1625 = 16K (MT6571) - * 1: block clock = 26M (MT6571) - *Div: 0~7 - * - *For example, in MT6571, PWM_config = {1,1,0,0,0} - * ==> PWM freq. = 26M/2^1/256 = 50.78 KHz ( when BACKLIGHT_LEVEL_PWM_256_SUPPORT ) - * ==> PWM freq. = 26M/2^1/(0+1)*64 = 203.13 KHz ( when BACKLIGHT_LEVEL_PWM_64_FIFO_MODE_SUPPORT ) - *------------------------------------------------------------------------------------------- - * for BLS PWM setting as follow: - *1. PWM config data - * clock_source: clock source frequency, can be 0/1/2/3 - * div: clock division, can be any value within 0~1023 - * low_duration: non-use - * High_duration: non-use - * pmic_pad: non-use - * - *2. PWM freq.= clock source / (div + 1) /1024 - *Clock source: - * 0: 26 MHz - * 1: 104 MHz - * 2: 124.8 MHz - * 3: 156 MHz - *Div: 0~1023 - * - *By default, clock_source = 0 and div = 0 => PWM freq. = 26 KHz - *------------------------------------------------------------------------------------------- - */ -static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { - {"red", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK2,{0}}, - {"green", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK1,{0}}, - {"blue", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK0,{0}}, - {"jogball-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"keyboard-backlight",MT65XX_LED_MODE_NONE, -1,{0}}, - {"button-backlight", MT65XX_LED_MODE_NONE, -1,{0}}, - {"lcd-backlight", MT65XX_LED_MODE_CUST_BLS_PWM, (int)disp_bls_set_backlight,{0,0,0,0,0}}, -}; - -struct cust_mt65xx_led *get_cust_led_list(void) -{ - return cust_led_list; -} - diff --git a/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.h b/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.h deleted file mode 100644 index 2fd28733209..00000000000 --- a/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CUST_LEDS_H -#define _CUST_LEDS_H - -#include -enum mt65xx_led_type -{ - MT65XX_LED_TYPE_RED = 0, - MT65XX_LED_TYPE_GREEN, - MT65XX_LED_TYPE_BLUE, - MT65XX_LED_TYPE_JOGBALL, - MT65XX_LED_TYPE_KEYBOARD, - MT65XX_LED_TYPE_BUTTON, - MT65XX_LED_TYPE_LCD, - MT65XX_LED_TYPE_TOTAL, -}; - - - -#endif - diff --git a/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds_def.h b/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds_def.h deleted file mode 100644 index 0824e0368cf..00000000000 --- a/arch/arm/mach-mt8127/ttab/leds/mt65xx/cust_leds_def.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _CUST_LEDS_DEF_H -#define _CUST_LEDS_DEF_H - -//#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ -//#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ -enum mt65xx_led_mode -{ - MT65XX_LED_MODE_NONE, - MT65XX_LED_MODE_PWM, - MT65XX_LED_MODE_GPIO, - MT65XX_LED_MODE_PMIC, - //MT65XX_LED_MODE_CUST, - MT65XX_LED_MODE_CUST_LCM, - MT65XX_LED_MODE_CUST_BLS_PWM -}; - -enum mt65xx_led_pmic -{ - MT65XX_LED_PMIC_LCD_ISINK=0, - MT65XX_LED_PMIC_NLED_ISINK0, - MT65XX_LED_PMIC_NLED_ISINK1, - MT65XX_LED_PMIC_NLED_ISINK2, - MT65XX_LED_PMIC_NLED_ISINK3 -}; -struct PWM_config -{ - int clock_source; - int div; - int low_duration; - int High_duration; - BOOL pmic_pad; -}; -typedef int (*cust_brightness_set)(int level, int div); -typedef int (*cust_set_brightness)(int level); - -/* - * name : must the same as lights HAL - * mode : control mode - * data : - * PWM: pwm number - * GPIO: gpio id - * PMIC: enum mt65xx_led_pmic - * CUST: custom set brightness function pointer -*/ -struct cust_mt65xx_led { - char *name; - enum mt65xx_led_mode mode; - int data; - struct PWM_config config_data; -}; - -extern struct cust_mt65xx_led *get_cust_led_list(void); -#endif /* _CUST_LEDS_DEF_H */ diff --git a/arch/arm/mach-mt8127/ttab/lens/Makefile b/arch/arm/mach-mt8127/ttab/lens/Makefile deleted file mode 100755 index 1d76c11a1b8..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := dummy_lens.o diff --git a/arch/arm/mach-mt8127/ttab/lens/dummy_lens.c b/arch/arm/mach-mt8127/ttab/lens/dummy_lens.c deleted file mode 100644 index f6ac5876877..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/dummy_lens.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MD218A voice coil motor driver - * - * - */ - -#include -#include -#include -#include -#include -#include -#include - - -//#define DUMMY_LENS_DEBUG -#ifdef DUMMY_LENS_DEBUG -#define DUMMY_LENSDB printk -#else -#define DUMMY_LENSDB(x,...) -#endif - -static int __init DUMMY_LENS_i2C_init(void) -{ - return 0; -} - -static void __exit DUMMY_LENS_i2C_exit(void) -{ - -} - -module_init(DUMMY_LENS_i2C_init); -module_exit(DUMMY_LENS_i2C_exit); - -MODULE_DESCRIPTION("Dummy lens module driver"); -MODULE_AUTHOR("KY Chen "); -MODULE_LICENSE("GPL"); - - diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/AD5820AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/AD5820AF.h deleted file mode 100644 index 2a7d08a1090..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/AD5820AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5820AF_H -#define _AD5820AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5820AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5820AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5820AFIOC_G_MOTORINFO _IOR(AD5820AF_MAGIC,0,stAD5820AF_MotorInfo) - -#define AD5820AFIOC_T_MOVETO _IOW(AD5820AF_MAGIC,1,unsigned long) - -#define AD5820AFIOC_T_SETINFPOS _IOW(AD5820AF_MAGIC,2,unsigned long) - -#define AD5820AFIOC_T_SETMACROPOS _IOW(AD5820AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/AD5823.h b/arch/arm/mach-mt8127/ttab/lens/inc/AD5823.h deleted file mode 100644 index d960c3d7fbe..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/AD5823.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823_H -#define _AD5823_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC,0,stAD5823_MotorInfo) - -#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC,1,unsigned long) - -#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC,2,unsigned long) - -#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/AD5823AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/AD5823AF.h deleted file mode 100644 index 6ef68305c29..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/AD5823AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _AD5823AF_H -#define _AD5823AF_H - -#include -//#include "kd_imgsensor.h" - -#define AD5823AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stAD5823AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define AD5823AFIOC_G_MOTORINFO _IOR(AD5823AF_MAGIC,0,stAD5823AF_MotorInfo) - -#define AD5823AFIOC_T_MOVETO _IOW(AD5823AF_MAGIC,1,unsigned long) - -#define AD5823AFIOC_T_SETINFPOS _IOW(AD5823AF_MAGIC,2,unsigned long) - -#define AD5823AFIOC_T_SETMACROPOS _IOW(AD5823AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/BU6424AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/BU6424AF.h deleted file mode 100644 index f2be508b605..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/BU6424AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6424AF_H -#define _BU6424AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6424AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6424AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6424AFIOC_G_MOTORINFO _IOR(BU6424AF_MAGIC,0,stBU6424AF_MotorInfo) - -#define BU6424AFIOC_T_MOVETO _IOW(BU6424AF_MAGIC,1,unsigned long) - -#define BU6424AFIOC_T_SETINFPOS _IOW(BU6424AF_MAGIC,2,unsigned long) - -#define BU6424AFIOC_T_SETMACROPOS _IOW(BU6424AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/BU6429AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/BU6429AF.h deleted file mode 100644 index 37997bfdc69..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/BU6429AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _BU6429AF_H -#define _BU6429AF_H - -#include -//#include "kd_imgsensor.h" - -#define BU6429AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stBU6429AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define BU6429AFIOC_G_MOTORINFO _IOR(BU6429AF_MAGIC,0,stBU6429AF_MotorInfo) - -#define BU6429AFIOC_T_MOVETO _IOW(BU6429AF_MAGIC,1,unsigned long) - -#define BU6429AFIOC_T_SETINFPOS _IOW(BU6429AF_MAGIC,2,unsigned long) - -#define BU6429AFIOC_T_SETMACROPOS _IOW(BU6429AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/DW9714AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/DW9714AF.h deleted file mode 100644 index 45ce7be3018..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/DW9714AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9714AF_H -#define _DW9714AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9714AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9714AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9714AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9714AFIOC_G_MOTORINFO _IOR(DW9714AF_MAGIC,0,stDW9714AF_MotorInfo) - -#define DW9714AFIOC_T_MOVETO _IOW(DW9714AF_MAGIC,1,unsigned long) - -#define DW9714AFIOC_T_SETINFPOS _IOW(DW9714AF_MAGIC,2,unsigned long) - -#define DW9714AFIOC_T_SETMACROPOS _IOW(DW9714AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9714AFIOC_G_MOTORMETAINFO _IOR(DW9714AF_MAGIC,4,stDW9714AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/DW9718AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/DW9718AF.h deleted file mode 100644 index f18e46762de..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/DW9718AF.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _DW9718AF_H -#define _DW9718AF_H - -#include -//#include "kd_imgsensor.h" - -#define DW9718AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stDW9718AF_MotorInfo; - - -//Structures -//#define LensdrvCM3 -#ifdef LensdrvCM3 -typedef struct { - //APERTURE , won't be supported on most devices. - float Aperture; - //FILTER_DENSITY, won't be supported on most devices. - float FilterDensity; - //FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. - float FocalLength; - //FOCAL_DISTANCE, current focus distance, lens to objects. - float FocalDistance; - //OPTICAL_STABILIZATION_MODE - u16 u4OIS_Mode; - //FACING - u16 Facing; - //Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. - float OpticalAxisAng[2]; - //Optical axis position (mm), usually is {0,0,0}. - float Position[3]; - //Focus range, DOF, - float FocusRange; - //State - u16 State; - //INFO - float InfoAvalibleMinFocusDistance; - float InfoAvalibleApertures; - float InfoAvalibleFilterDensity; - u16 InfoAvalibleOptStabilization; - float InfoAvalibleFocalLength; - float InfoAvalibleHypeDistance; -}stDW9718AF_MotorMETAInfo; -#endif - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC,0,stDW9718AF_MotorInfo) - -#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC,1,unsigned long) - -#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC,2,unsigned long) - -#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC,3,unsigned long) -#ifdef LensdrvCM3 -#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC,4,stDW9718AF_MotorMETAInfo) -#endif - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/FM50AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/FM50AF.h deleted file mode 100644 index 836f6f4c53d..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/FM50AF.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _FM50AF_H -#define _FM50AF_H - -#include -//#include "kd_imgsensor.h" - -#define FM50AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -//Support SR? -bool bIsSupportSR; -} stFM50AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define FM50AFIOC_G_MOTORINFO _IOR(FM50AF_MAGIC,0,stFM50AF_MotorInfo) - -#define FM50AFIOC_T_MOVETO _IOW(FM50AF_MAGIC,1,unsigned long) - -#define FM50AFIOC_T_SETINFPOS _IOW(FM50AF_MAGIC,2,unsigned long) - -#define FM50AFIOC_T_SETMACROPOS _IOW(FM50AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/MT9P017AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/MT9P017AF.h deleted file mode 100644 index 03b60c43d30..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/MT9P017AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MT9P017AF_H -#define _MT9P017AF_H - -#include -//#include "kd_imgsensor.h" - -#define MT9P017AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stMT9P017AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC,0,stMT9P017AF_MotorInfo) - -#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC,1,unsigned long) - -#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC,2,unsigned long) - -#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/lens/inc/OV8825AF.h b/arch/arm/mach-mt8127/ttab/lens/inc/OV8825AF.h deleted file mode 100644 index 37ae8e165c0..00000000000 --- a/arch/arm/mach-mt8127/ttab/lens/inc/OV8825AF.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OV8825AF_H -#define _OV8825AF_H - -#include -//#include "kd_imgsensor.h" - -#define OV8825AF_MAGIC 'A' -//IOCTRL(inode * ,file * ,cmd ,arg ) - - -//Structures -typedef struct { -//current position -unsigned long u4CurrentPosition; -//macro position -unsigned long u4MacroPosition; -//Infiniti position -unsigned long u4InfPosition; -//Motor Status -bool bIsMotorMoving; -//Motor Open? -bool bIsMotorOpen; -} stOV8825AF_MotorInfo; - -//Control commnad -//S means "set through a ptr" -//T means "tell by a arg value" -//G means "get by a ptr" -//Q means "get by return a value" -//X means "switch G and S atomically" -//H means "switch T and Q atomically" -#define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) - -#define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) - -#define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) - -#define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) - -#else -#endif diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/Makefile b/arch/arm/mach-mt8127/ttab/magnetometer/Makefile deleted file mode 100755 index 8b9466605d4..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y += cust_mag.o \ No newline at end of file diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/akm09911.c b/arch/arm/mach-mt8127/ttab/magnetometer/akm09911.c deleted file mode 100644 index d361d2548fc..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/akm09911.c +++ /dev/null @@ -1,2788 +0,0 @@ -/* akm09911.c - akm09911 compass driver - * - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#include -#include -#include -#include - - -#define POWER_NONE_MACRO MT65XX_POWER_NONE - -#include -#include "akm09911.h" -#include - -/*----------------------------------------------------------------------------*/ -#define DEBUG 0 -#define AKM09911_DEV_NAME "akm09911" -#define DRIVER_VERSION "1.0.1" -/*----------------------------------------------------------------------------*/ -#define AKM09911_DEBUG 1 -#define AKM09911_DEBUG_MSG 0 -#define AKM09911_DEBUG_FUNC 0 -#define AKM09911_DEBUG_DATA 1 -#define MAX_FAILURE_COUNT 3 -#define AKM09911_RETRY_COUNT 10 -#define AKM09911_DEFAULT_DELAY 100 - -//#define AKM_Pseudogyro // enable this if you need use 6D gyro -//#define AKM_Device_AK8963 //if use AK09911 code to compatible AK8963C, need define this - - -#if AKM09911_DEBUG_MSG -#define AKMDBG(format, ...) printk(KERN_ERR "AKM09911 " format "\n", ## __VA_ARGS__) -#else -#define AKMDBG(format, ...) -#endif - -#if AKM09911_DEBUG_FUNC -#define AKMFUNC(func) printk(KERN_INFO "AKM09911 " func " is called\n") -#else -#define AKMFUNC(func) -#endif - -static struct i2c_client *this_client = NULL; - -/* Addresses to scan -- protected by sense_data_mutex */ -static char sense_data[SENSOR_DATA_SIZE]; -static struct mutex sense_data_mutex; -// calibration msensor and orientation data -static int sensor_data[CALIBRATION_DATA_SIZE]; -static struct mutex sensor_data_mutex; -static DECLARE_WAIT_QUEUE_HEAD(data_ready_wq); -static DECLARE_WAIT_QUEUE_HEAD(open_wq); - -static short akmd_delay = AKM09911_DEFAULT_DELAY; - -static atomic_t open_flag = ATOMIC_INIT(0); -static atomic_t m_flag = ATOMIC_INIT(0); -static atomic_t o_flag = ATOMIC_INIT(0); - -static int factory_mode=0; -static int ecompass_status = 0; - -static int mEnabled=0; - -static struct proc_dir_entry *akm09911_ecompass_status_proc = NULL; - - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -static const struct i2c_device_id akm09911_i2c_id[] = {{AKM09911_DEV_NAME,0},{}}; -static struct i2c_board_info __initdata i2c_akm09911={ I2C_BOARD_INFO("akm09911", (AKM09911_I2C_ADDRESS>>1))}; -/*the adapter id will be available in customization*/ -//static unsigned short akm09911_force[] = {0x00, AKM09911_I2C_ADDRESS, I2C_CLIENT_END, I2C_CLIENT_END}; -//static const unsigned short *const akm09911_forces[] = { akm09911_force, NULL }; -//static struct i2c_client_address_data akm09911_addr_data = { .forces = akm09911_forces,}; -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int akm09911_i2c_remove(struct i2c_client *client); -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int akm_probe(struct platform_device *pdev); -static int akm_remove(struct platform_device *pdev); - - -/*----------------------------------------------------------------------------*/ -typedef enum { - AMK_FUN_DEBUG = 0x01, - AMK_DATA_DEBUG = 0X02, - AMK_HWM_DEBUG = 0X04, - AMK_CTR_DEBUG = 0X08, - AMK_I2C_DEBUG = 0x10, -} AMK_TRC; - - -/*----------------------------------------------------------------------------*/ -struct akm09911_i2c_data { - struct i2c_client *client; - struct mag_hw *hw; - atomic_t layout; - atomic_t trace; - struct hwmsen_convert cvt; -#if defined(CONFIG_HAS_EARLYSUSPEND) - struct early_suspend early_drv; -#endif -}; -/*----------------------------------------------------------------------------*/ -static struct i2c_driver akm09911_i2c_driver = { - .driver = { -// .owner = THIS_MODULE, - .name = AKM09911_DEV_NAME, - }, - .probe = akm09911_i2c_probe, - .remove = akm09911_i2c_remove, - .detect = akm09911_i2c_detect, -#if !defined(CONFIG_HAS_EARLYSUSPEND) - .suspend = akm09911_suspend, - .resume = akm09911_resume, -#endif - .id_table = akm09911_i2c_id, -// .address_data = &akm09911_addr_data, -}; - -/*----------------------------------------------------------------------------*/ -static struct platform_driver akm_sensor_driver = { - .probe = akm_probe, - .remove = akm_remove, - .driver = { - .name = "msensor", - .owner = THIS_MODULE, - } -}; - - -/*----------------------------------------------------------------------------*/ -static atomic_t dev_open_count; -/*----------------------------------------------------------------------------*/ -static void akm09911_power(struct mag_hw *hw, unsigned int on) -{ - static unsigned int power_on = 0; - - if(hw->power_id != POWER_NONE_MACRO) - { - AKMDBG("power %s\n", on ? "on" : "off"); - if(power_on == on) - { - AKMDBG("ignore power control: %d\n", on); - } - else if(on) - { - if(!hwPowerOn(hw->power_id, hw->power_vol, "akm09911")) - { - printk(KERN_ERR "power on fails!!\n"); - } - } - else - { - if(!hwPowerDown(hw->power_id, "akm09911")) - { - printk(KERN_ERR "power off fail!!\n"); - } - } - } - power_on = on; -} -static long AKI2C_RxData(char *rxData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - char addr = rxData[0]; -#endif - - - /* Caller should check parameter validity.*/ - if((rxData == NULL) || (length < 1)) - { - return -EINVAL; - } - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - this_client->addr = this_client->addr & I2C_MASK_FLAG; - this_client->addr = this_client->addr | I2C_WR_FLAG; - if(i2c_master_send(this_client, (const char*)rxData, ((length<<0X08) | 0X01))) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "RxData: len=%02x, addr=%02x\n data=", length, addr); - for(i = 0; i < length; i++) - { - printk(KERN_INFO " %02x", rxData[i]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -static long AKI2C_TxData(char *txData, int length) -{ - uint8_t loop_i; - -#if DEBUG - int i; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - /* Caller should check parameter validity.*/ - if ((txData == NULL) || (length < 2)) - { - return -EINVAL; - } - - this_client->addr = this_client->addr & I2C_MASK_FLAG; - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if(i2c_master_send(this_client, (const char*)txData, length) > 0) - { - break; - } - mdelay(10); - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "%s retry over %d\n", __func__, AKM09911_RETRY_COUNT); - return -EIO; - } -#if DEBUG - if(atomic_read(&data->trace) & AMK_I2C_DEBUG) - { - printk(KERN_INFO "TxData: len=%02x, addr=%02x\n data=", length, txData[0]); - for(i = 0; i < (length-1); i++) - { - printk(KERN_INFO " %02x", txData[i + 1]); - } - printk(KERN_INFO "\n"); - } -#endif - return 0; -} - -/* -static long AKECS_Set_CNTL1(unsigned char mode) -{ - unsigned char buffer[2]; - //int err; - - //Set measure mode - buffer[0] = AK09911_REG_CNTL1; - buffer[1] = mode; - - return AKI2C_TxData(buffer, 2);; -} -*/ - - -static long AKECS_SetMode_SngMeasure(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SNG_MEASURE; - - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SNG_MEASURE; - #endif - - /* Set data */ - return AKI2C_TxData(buffer, 2); - } - -static long AKECS_SetMode_SelfTest(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_SELF_TEST; - - #else - - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_SELF_TEST; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static long AKECS_SetMode_FUSEAccess(void) -{ - char buffer[2]; - - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_FUSE_ACCESS; - #else - /* Set measure mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_FUSE_ACCESS; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} -static int AKECS_SetMode_PowerDown(void) -{ - char buffer[2]; - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL1; - buffer[1] = AK8963_MODE_POWERDOWN; - #else - /* Set powerdown mode */ - buffer[0] = AK09911_REG_CNTL2; - buffer[1] = AK09911_MODE_POWERDOWN; - /* Set data */ - #endif - return AKI2C_TxData(buffer, 2); -} - -static long AKECS_Reset(int hard) -{ - unsigned char buffer[2]; - long err = 0; - - if (hard != 0) { - //TODO change to board setting - //gpio_set_value(akm->rstn, 0); - udelay(5); - //gpio_set_value(akm->rstn, 1); - } else { - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_CNTL2; - buffer[1] = 0x01; - #else - buffer[0] = AK09911_REG_CNTL3; - buffer[1] = 0x01; - #endif - err = AKI2C_TxData(buffer, 2); - if (err < 0) { - AKMDBG("%s: Can not set SRST bit.", __func__); - } else { - AKMDBG("Soft reset is done."); - } - } - - /* Device will be accessible 300 us after */ - udelay(300); // 100 - - return err; -} - -static long AKECS_SetMode(char mode) -{ - long ret; - - switch (mode & 0x1F){ - - - case AK09911_MODE_SNG_MEASURE: - ret = AKECS_SetMode_SngMeasure(); - break; - - case AK09911_MODE_SELF_TEST: - case AK8963_MODE_SELF_TEST: - ret = AKECS_SetMode_SelfTest(); - break; - - case AK09911_MODE_FUSE_ACCESS: - case AK8963_MODE_FUSE_ACCESS: - ret = AKECS_SetMode_FUSEAccess(); - break; - - case AK09911_MODE_POWERDOWN: - ret = AKECS_SetMode_PowerDown(); - break; - - default: - AKMDBG("%s: Unknown mode(%d)", __func__, mode); - return -EINVAL; - } - - /* wait at least 100us after changing mode */ - udelay(100); - - return ret; -} - -static int AKECS_CheckDevice(void) -{ - char buffer[2]; - int ret; - AKMDBG(" AKM check device id"); - /* Set measure mode */ - #ifdef AKM_Device_AK8963 - buffer[0] = AK8963_REG_WIA; - #else - buffer[0] = AK09911_REG_WIA1; - #endif - - - - /* Read data */ - ret = AKI2C_RxData(buffer, 1); - AKMDBG(" AKM check device id = %x",buffer[0]); - AKMDBG("ret = %d",ret); - if(ret < 0) - { - return ret; - } - /* Check read data */ - if(buffer[0] != 0x48) - { - return -ENXIO; - } - - return 0; -} - -// Daemon application save the data -static void AKECS_SaveData(int *buf) -{ -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - mutex_lock(&sensor_data_mutex); - memcpy(sensor_data, buf, sizeof(sensor_data)); - mutex_unlock(&sensor_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Get daemon data: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d!\n", - sensor_data[0],sensor_data[1],sensor_data[2],sensor_data[3], - sensor_data[4],sensor_data[5],sensor_data[6],sensor_data[7], - sensor_data[8],sensor_data[9],sensor_data[10],sensor_data[11], - sensor_data[12],sensor_data[13],sensor_data[14],sensor_data[15], - sensor_data[16],sensor_data[17],sensor_data[18],sensor_data[19], - sensor_data[20],sensor_data[21],sensor_data[22],sensor_data[23], - sensor_data[24],sensor_data[25]); - } -#endif - -} - -// M-sensor daemon application have set the sng mode -static long AKECS_GetData(char *rbuf, int size) -{ - char temp; - int loop_i,ret; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - - if(size < SENSOR_DATA_SIZE) - { - printk(KERN_ERR "buff size is too small %d!\n", size); - return -1; - } - - memset(rbuf, 0, SENSOR_DATA_SIZE); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - - for(loop_i = 0; loop_i < AKM09911_RETRY_COUNT; loop_i++) - { - if((ret = AKI2C_RxData(rbuf, 1))) - { - printk(KERN_ERR "read ST1 resigster failed!\n"); - return -1; - } - - if((rbuf[0] & 0x01) == 0x01) - { - break; - } - msleep(2); - #ifdef AKM_Device_AK8963 - rbuf[0] = AK8963_REG_ST1; - #else - rbuf[0] = AK09911_REG_ST1; - #endif - } - - if(loop_i >= AKM09911_RETRY_COUNT) - { - printk(KERN_ERR "Data read retry larger the max count!\n"); - if(0 ==factory_mode) - { - return -1;//if return we can not get data at factory mode - } - } - - temp = rbuf[0]; - #ifdef AKM_Device_AK8963 - rbuf[1]= AK8963_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -2); - #else - rbuf[1]= AK09911_REG_HXL; - ret = AKI2C_RxData(&rbuf[1], SENSOR_DATA_SIZE -1); - #endif - if(ret < 0) - { - printk(KERN_ERR "AKM8975 akm8975_work_func: I2C failed\n"); - return -1; - } - rbuf[0] = temp; - #ifdef AKM_Device_AK8963 - rbuf[8]=rbuf[7]; - rbuf[7]=0; - #endif - mutex_lock(&sense_data_mutex); - memcpy(sense_data, rbuf, sizeof(sense_data)); - mutex_unlock(&sense_data_mutex); - -#if DEBUG - if(atomic_read(&data->trace) & AMK_DATA_DEBUG) - { - AKMDBG("Get device data: %d, %d, %d, %d , %d, %d, %d, %d!\n", - sense_data[0],sense_data[1],sense_data[2],sense_data[3], - sense_data[4],sense_data[5],sense_data[6],sense_data[7]); - } -#endif - - return 0; -} - -// Get Msensor Raw data -static int AKECS_GetRawData(char *rbuf, int size) -{ - char strbuf[SENSOR_DATA_SIZE]; - s16 data[3]; - if((atomic_read(&open_flag) == 0) || (factory_mode == 1)) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - } - - AKECS_GetData(strbuf, SENSOR_DATA_SIZE); - data[0] = (s16)(strbuf[1] | (strbuf[2] << 8)); - data[1] = (s16)(strbuf[3] | (strbuf[4] << 8)); - data[2] = (s16)(strbuf[5] | (strbuf[6] << 8)); - - sprintf(rbuf, "%x %x %x", data[0], data[1], data[2]); - - return 0; - -} - - - -static int AKECS_GetOpenStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) != 0)); - return atomic_read(&open_flag); -} - -static int AKECS_GetCloseStatus(void) -{ - wait_event_interruptible(open_wq, (atomic_read(&open_flag) <= 0)); - return atomic_read(&open_flag); -} - - - - -/*----------------------------------------------------------------------------*/ -static int akm09911_ReadChipInfo(char *buf, int bufsize) -{ - if((!buf)||(bufsize <= AKM09911_BUFSIZE -1)) - { - return -1; - } - if(!this_client) - { - *buf = 0; - return -2; - } - - sprintf(buf, "akm09911 Chip"); - return 0; -} - -/*----------------------------shipment test------------------------------------------------*/ -/*! - @return If @a testdata is in the range of between @a lolimit and @a hilimit, - the return value is 1, otherwise -1. - @param[in] testno A pointer to a text string. - @param[in] testname A pointer to a text string. - @param[in] testdata A data to be tested. - @param[in] lolimit The maximum allowable value of @a testdata. - @param[in] hilimit The minimum allowable value of @a testdata. - @param[in,out] pf_total - */ -int -TEST_DATA(const char testno[], - const char testname[], - const int testdata, - const int lolimit, - const int hilimit, - int * pf_total) -{ - int pf; //Pass;1, Fail;-1 - - if ((testno == NULL) && (strncmp(testname, "START", 5) == 0)) { - // Display header - AKMDBG("--------------------------------------------------------------------\n"); - AKMDBG(" Test No. Test Name Fail Test Data [ Low High]\n"); - AKMDBG("--------------------------------------------------------------------\n"); - - pf = 1; - } else if ((testno == NULL) && (strncmp(testname, "END", 3) == 0)) { - // Display result - AKMDBG("--------------------------------------------------------------------\n"); - if (*pf_total == 1) { - AKMDBG("Factory shipment test was passed.\n\n"); - } else { - AKMDBG("Factory shipment test was failed.\n\n"); - } - - pf = 1; - } else { - if ((lolimit <= testdata) && (testdata <= hilimit)) { - //Pass - pf = 1; - } else { - //Fail - pf = -1; - } - - //display result - AKMDBG(" %7s %-10s %c %9d [%9d %9d]\n", - testno, testname, ((pf == 1) ? ('.') : ('F')), testdata, - lolimit, hilimit); - } - - //Pass/Fail check - if (*pf_total != 0) { - if ((*pf_total == 1) && (pf == 1)) { - *pf_total = 1; //Pass - } else { - *pf_total = -1; //Fail - } - } - return pf; -} -int FST_AK8963(void) - { - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Set to PowerDown mode - //if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - // AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - // return 0; - //} - AKECS_Reset(0); - msleep(1); - - // When the serial interface is SPI, - // write "00011011" to I2CDIS register(to disable I2C,). - if(CSPEC_SPI_USE == 1){ - i2cData[0] = AK8963_REG_I2CDIS; - i2cData[1] = 0x1B; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - } - - // Read values from WIA to ASTC. - i2cData[0] = AK8963_REG_WIA; - if (AKI2C_RxData(i2cData, 7) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA, TLIMIT_TN_RST_WIA, (int)i2cData[0], TLIMIT_LO_RST_WIA, TLIMIT_HI_RST_WIA, &pf_total); - TEST_DATA(TLIMIT_NO_RST_INFO, TLIMIT_TN_RST_INFO, (int)i2cData[1], TLIMIT_LO_RST_INFO, TLIMIT_HI_RST_INFO, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST1, TLIMIT_TN_RST_ST1, (int)i2cData[2], TLIMIT_LO_RST_ST1, TLIMIT_HI_RST_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXL, TLIMIT_TN_RST_HXL, (int)i2cData[3], TLIMIT_LO_RST_HXL, TLIMIT_HI_RST_HXL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HXH, TLIMIT_TN_RST_HXH, (int)i2cData[4], TLIMIT_LO_RST_HXH, TLIMIT_HI_RST_HXH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYL, TLIMIT_TN_RST_HYL, (int)i2cData[5], TLIMIT_LO_RST_HYL, TLIMIT_HI_RST_HYL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HYH, TLIMIT_TN_RST_HYH, (int)i2cData[6], TLIMIT_LO_RST_HYH, TLIMIT_HI_RST_HYH, &pf_total); - // our i2c only most can read 8 byte at one time , - i2cData[7]= AK8963_REG_HZL; - if (AKI2C_RxData((i2cData+7), 6) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - TEST_DATA(TLIMIT_NO_RST_HZL, TLIMIT_TN_RST_HZL, (int)i2cData[7], TLIMIT_LO_RST_HZL, TLIMIT_HI_RST_HZL, &pf_total); - TEST_DATA(TLIMIT_NO_RST_HZH, TLIMIT_TN_RST_HZH, (int)i2cData[8], TLIMIT_LO_RST_HZH, TLIMIT_HI_RST_HZH, &pf_total); - TEST_DATA(TLIMIT_NO_RST_ST2, TLIMIT_TN_RST_ST2, (int)i2cData[9], TLIMIT_LO_RST_ST2, TLIMIT_HI_RST_ST2, &pf_total); - TEST_DATA(TLIMIT_NO_RST_CNTL, TLIMIT_TN_RST_CNTL, (int)i2cData[10], TLIMIT_LO_RST_CNTL, TLIMIT_HI_RST_CNTL, &pf_total); - // i2cData[11] is BLANK. - TEST_DATA(TLIMIT_NO_RST_ASTC, TLIMIT_TN_RST_ASTC, (int)i2cData[12], TLIMIT_LO_RST_ASTC, TLIMIT_HI_RST_ASTC, &pf_total); - - // Read values from I2CDIS. - i2cData[0] = AK8963_REG_I2CDIS; - if (AKI2C_RxData(i2cData, 1) < 0 ) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - if(CSPEC_SPI_USE == 1){ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USESPI, TLIMIT_HI_RST_I2CDIS_USESPI, &pf_total); - }else{ - TEST_DATA(TLIMIT_NO_RST_I2CDIS, TLIMIT_TN_RST_I2CDIS, (int)i2cData[0], TLIMIT_LO_RST_I2CDIS_USEI2C, TLIMIT_HI_RST_I2CDIS_USEI2C, &pf_total); - } - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK8963_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK8963_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX, TLIMIT_TN_ASAX, asax, TLIMIT_LO_ASAX, TLIMIT_HI_ASAX, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY, TLIMIT_TN_ASAY, asay, TLIMIT_LO_ASAY, TLIMIT_HI_ASAY, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ, TLIMIT_TN_ASAZ, asaz, TLIMIT_LO_ASAZ, TLIMIT_HI_ASAZ, &pf_total); - - // Read values. CNTL - i2cData[0] = AK8963_REG_CNTL1; - if (AKI2C_RxData(i2cData, 1)< 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to PowerDown mode - if (AKECS_SetMode(AK8963_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_WR_CNTL, TLIMIT_TN_WR_CNTL, (int)i2cData[0], TLIMIT_LO_WR_CNTL, TLIMIT_HI_WR_CNTL, &pf_total); - - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8 bytes - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - - // TEST - TEST_DATA(TLIMIT_NO_SNG_ST1, TLIMIT_TN_SNG_ST1, (int)i2cData[0], TLIMIT_LO_SNG_ST1, TLIMIT_HI_SNG_ST1, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HX, TLIMIT_TN_SNG_HX, hdata[0], TLIMIT_LO_SNG_HX, TLIMIT_HI_SNG_HX, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY, TLIMIT_TN_SNG_HY, hdata[1], TLIMIT_LO_SNG_HY, TLIMIT_HI_SNG_HY, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ, TLIMIT_TN_SNG_HZ, hdata[2], TLIMIT_LO_SNG_HZ, TLIMIT_HI_SNG_HZ, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2, TLIMIT_TN_SNG_ST2, (int)i2cData[8], TLIMIT_LO_SNG_ST2, TLIMIT_HI_SNG_ST2, &pf_total); - - // Generate magnetic field for self-test (Set ASTC register) - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x40; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK8963_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - msleep(10); - // Get measurement data from AK8963 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 = 8Byte - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST1, TLIMIT_TN_SLF_ST1, (int)i2cData[0], TLIMIT_LO_SLF_ST1, TLIMIT_HI_SLF_ST1, &pf_total); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // AK8963 @ 14 BIT - hdata[0] <<= 2; - hdata[1] <<= 2; - hdata[2] <<= 2; - - AKMDBG("hdata[0] = %d\n",hdata[0] ); - AKMDBG("asax = %d\n",asax ); - TEST_DATA( - TLIMIT_NO_SLF_RVHX, - TLIMIT_TN_SLF_RVHX, - (hdata[0])*((asax - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHX, - TLIMIT_HI_SLF_RVHX, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY, - TLIMIT_TN_SLF_RVHY, - (hdata[1])*((asay - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHY, - TLIMIT_HI_SLF_RVHY, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ, - TLIMIT_TN_SLF_RVHZ, - (hdata[2])*((asaz - 128)/2/128 + 1), - TLIMIT_LO_SLF_RVHZ, - TLIMIT_HI_SLF_RVHZ, - &pf_total - ); - // TEST - TEST_DATA(TLIMIT_NO_SLF_ST2, TLIMIT_TN_SLF_ST2, (int)i2cData[8], TLIMIT_LO_SLF_ST2, TLIMIT_HI_SLF_ST2, &pf_total); - - // Set to Normal mode for self-test. - i2cData[0] = AK8963_REG_ASTC; - i2cData[1] = 0x00; - if (AKI2C_TxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - AKMDBG("pf_total = %d\n",pf_total ); - return pf_total; - } - - - -/*! - Execute "Onboard Function Test" (NOT includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FST_AK09911(void) -{ - int pf_total; //p/f flag for this subtest - char i2cData[16]; - int hdata[3]; - int asax; - int asay; - int asaz; - - //*********************************************** - // Reset Test Result - //*********************************************** - pf_total = 1; - - //*********************************************** - // Step1 - //*********************************************** - - // Reset device. - if (AKECS_Reset(0) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from WIA. - i2cData[0] = AK09911_REG_WIA1; - if (AKI2C_RxData(i2cData, 2) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - TEST_DATA(TLIMIT_NO_RST_WIA1_09911, TLIMIT_TN_RST_WIA1_09911, (int)i2cData[0], TLIMIT_LO_RST_WIA1_09911, TLIMIT_HI_RST_WIA1_09911, &pf_total); - TEST_DATA(TLIMIT_NO_RST_WIA2_09911, TLIMIT_TN_RST_WIA2_09911, (int)i2cData[1], TLIMIT_LO_RST_WIA2_09911, TLIMIT_HI_RST_WIA2_09911, &pf_total); - - // Set to FUSE ROM access mode - if (AKECS_SetMode(AK09911_MODE_FUSE_ACCESS) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Read values from ASAX to ASAZ - i2cData[0] = AK09911_FUSE_ASAX; - if (AKI2C_RxData(i2cData, 3) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - asax = (int)i2cData[0]; - asay = (int)i2cData[1]; - asaz = (int)i2cData[2]; - - // TEST - TEST_DATA(TLIMIT_NO_ASAX_09911, TLIMIT_TN_ASAX_09911, asax, TLIMIT_LO_ASAX_09911, TLIMIT_HI_ASAX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAY_09911, TLIMIT_TN_ASAY_09911, asay, TLIMIT_LO_ASAY_09911, TLIMIT_HI_ASAY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_ASAZ_09911, TLIMIT_TN_ASAZ_09911, asaz, TLIMIT_LO_ASAZ_09911, TLIMIT_HI_ASAZ_09911, &pf_total); - - // Set to PowerDown mode - if (AKECS_SetMode(AK09911_MODE_POWERDOWN) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //*********************************************** - // Step2 - //*********************************************** - - // Set to SNG measurement pattern (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SNG_MEASURE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9yte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SNG_ST1_09911, TLIMIT_TN_SNG_ST1_09911, (int)i2cData[0], TLIMIT_LO_SNG_ST1_09911, TLIMIT_HI_SNG_ST1_09911, &pf_total); - - // TEST - TEST_DATA(TLIMIT_NO_SNG_HX_09911, TLIMIT_TN_SNG_HX_09911, hdata[0], TLIMIT_LO_SNG_HX_09911, TLIMIT_HI_SNG_HX_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HY_09911, TLIMIT_TN_SNG_HY_09911, hdata[1], TLIMIT_LO_SNG_HY_09911, TLIMIT_HI_SNG_HY_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_HZ_09911, TLIMIT_TN_SNG_HZ_09911, hdata[2], TLIMIT_LO_SNG_HZ_09911, TLIMIT_HI_SNG_HZ_09911, &pf_total); - TEST_DATA(TLIMIT_NO_SNG_ST2_09911, TLIMIT_TN_SNG_ST2_09911, (int)i2cData[8], TLIMIT_LO_SNG_ST2_09911, TLIMIT_HI_SNG_ST2_09911, &pf_total); - - // Set to Self-test mode (Set CNTL register) - if (AKECS_SetMode(AK09911_MODE_SELF_TEST) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // Wait for DRDY pin changes to HIGH. - //usleep(AKM_MEASURE_TIME_US); - // Get measurement data from AK09911 - // ST1 + (HXL + HXH) + (HYL + HYH) + (HZL + HZH) + TEMP + ST2 - // = 1 + (1 + 1) + (1 + 1) + (1 + 1) + 1 + 1 = 9byte - //if (AKD_GetMagneticData(i2cData) != AKD_SUCCESS) { - if (AKECS_GetData(i2cData,SENSOR_DATA_SIZE) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return 0; - } - - // TEST - i2cData[0] &= 0x7F; - TEST_DATA(TLIMIT_NO_SLF_ST1_09911, TLIMIT_TN_SLF_ST1_09911, (int)i2cData[0], TLIMIT_LO_SLF_ST1_09911, TLIMIT_HI_SLF_ST1_09911, &pf_total); - - //hdata[0] = (int)((((uint)(i2cData[2]))<<8)+(uint)(i2cData[1])); - //hdata[1] = (int)((((uint)(i2cData[4]))<<8)+(uint)(i2cData[3])); - //hdata[2] = (int)((((uint)(i2cData[6]))<<8)+(uint)(i2cData[5])); - - hdata[0] = (s16)(i2cData[1] | (i2cData[2] << 8)); - hdata[1] = (s16)(i2cData[3] | (i2cData[4] << 8)); - hdata[2] = (s16)(i2cData[5] | (i2cData[6] << 8)); - - // TEST - TEST_DATA( - TLIMIT_NO_SLF_RVHX_09911, - TLIMIT_TN_SLF_RVHX_09911, - (hdata[0])*(asax/128 + 1), - TLIMIT_LO_SLF_RVHX_09911, - TLIMIT_HI_SLF_RVHX_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHY_09911, - TLIMIT_TN_SLF_RVHY_09911, - (hdata[1])*(asay/128 + 1), - TLIMIT_LO_SLF_RVHY_09911, - TLIMIT_HI_SLF_RVHY_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_RVHZ_09911, - TLIMIT_TN_SLF_RVHZ_09911, - (hdata[2])*(asaz/128 + 1), - TLIMIT_LO_SLF_RVHZ_09911, - TLIMIT_HI_SLF_RVHZ_09911, - &pf_total - ); - - TEST_DATA( - TLIMIT_NO_SLF_ST2_09911, - TLIMIT_TN_SLF_ST2_09911, - (int)i2cData[8], - TLIMIT_LO_SLF_ST2_09911, - TLIMIT_HI_SLF_ST2_09911, - &pf_total - ); - - return pf_total; -} - -/*! - Execute "Onboard Function Test" (includes "START" and "END" command). - @retval 1 The test is passed successfully. - @retval -1 The test is failed. - @retval 0 The test is aborted by kind of system error. - */ -int FctShipmntTestProcess_Body(void) -{ - int pf_total = 1; - - //*********************************************** - // Reset Test Result - //*********************************************** - TEST_DATA(NULL, "START", 0, 0, 0, &pf_total); - - //*********************************************** - // Step 1 to 2 - //*********************************************** - #ifdef AKM_Device_AK8963 - pf_total = FST_AK8963(); - #else - pf_total = FST_AK09911(); - #endif - - //*********************************************** - // Judge Test Result - //*********************************************** - TEST_DATA(NULL, "END", 0, 0, 0, &pf_total); - - return pf_total; -} - -static ssize_t store_shipment_test(struct device_driver * ddri,const char * buf, size_t count) -{ - //struct i2c_client *client = this_client; - //struct akm09911_i2c_data *data = i2c_get_clientdata(client); - //int layout = 0; - - - return count; -} - -static ssize_t show_shipment_test(struct device_driver *ddri, char *buf) -{ - char result[10]; - int res = 0; - res = FctShipmntTestProcess_Body(); - if(1 == res) - { - AKMDBG("shipment_test pass\n"); - strcpy(result,"y"); - } - else if(-1 == res) - { - AKMDBG("shipment_test fail\n"); - strcpy(result,"n"); - } - else - { - AKMDBG("shipment_test NaN\n"); - strcpy(result,"NaN"); - } - - return sprintf(buf, "%s\n", result); -} - -static ssize_t show_daemon_name(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - sprintf(strbuf, "akmd09911"); - return sprintf(buf, "%s", strbuf); -} - -static ssize_t show_chipinfo_value(struct device_driver *ddri, char *buf) -{ - char strbuf[AKM09911_BUFSIZE]; - akm09911_ReadChipInfo(strbuf, AKM09911_BUFSIZE); - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_sensordata_value(struct device_driver *ddri, char *buf) -{ - - char sensordata[SENSOR_DATA_SIZE]; - char strbuf[AKM09911_BUFSIZE]; - if(atomic_read(&open_flag) == 0) - { - AKECS_SetMode_SngMeasure(); - msleep(10); - AKECS_GetData(sensordata, SENSOR_DATA_SIZE); - } - else - { - mutex_lock(&sense_data_mutex); - memcpy(sensordata, sense_data, sizeof(sensordata)); - mutex_unlock(&sense_data_mutex); - } - - - - sprintf(strbuf, "%d %d %d %d %d %d %d %d %d\n", sensordata[0],sensordata[1],sensordata[2], - sensordata[3],sensordata[4],sensordata[5],sensordata[6],sensordata[7],sensordata[8]); - - return sprintf(buf, "%s\n", strbuf); -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_posturedata_value(struct device_driver *ddri, char *buf) -{ - short tmp[3]; - char strbuf[AKM09911_BUFSIZE]; - tmp[0] = sensor_data[13] * CONVERT_O / CONVERT_O_DIV; - tmp[1] = sensor_data[14] * CONVERT_O / CONVERT_O_DIV; - tmp[2] = sensor_data[15] * CONVERT_O / CONVERT_O_DIV; - sprintf(strbuf, "%d, %d, %d\n", tmp[0],tmp[1], tmp[2]); - - return sprintf(buf, "%s\n", strbuf);; -} - -/*----------------------------------------------------------------------------*/ -static ssize_t show_layout_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - - return sprintf(buf, "(%d, %d)\n[%+2d %+2d %+2d]\n[%+2d %+2d %+2d]\n", - data->hw->direction,atomic_read(&data->layout), data->cvt.sign[0], data->cvt.sign[1], - data->cvt.sign[2],data->cvt.map[0], data->cvt.map[1], data->cvt.map[2]); -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_layout_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - int layout = 0; - - if(1 == sscanf(buf, "%d", &layout)) - { - atomic_set(&data->layout, layout); - if(!hwmsen_get_convert(layout, &data->cvt)) - { - printk(KERN_ERR "HWMSEN_GET_CONVERT function error!\r\n"); - } - else if(!hwmsen_get_convert(data->hw->direction, &data->cvt)) - { - printk(KERN_ERR "invalid layout: %d, restore to %d\n", layout, data->hw->direction); - } - else - { - printk(KERN_ERR "invalid layout: (%d, %d)\n", layout, data->hw->direction); - hwmsen_get_convert(0, &data->cvt); - } - } - else - { - printk(KERN_ERR "invalid format = '%s'\n", buf); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_status_value(struct device_driver *ddri, char *buf) -{ - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - ssize_t len = 0; - - if(data->hw) - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: %d %d (%d %d)\n", - data->hw->i2c_num, data->hw->direction, data->hw->power_id, data->hw->power_vol); - } - else - { - len += snprintf(buf+len, PAGE_SIZE-len, "CUST: NULL\n"); - } - - len += snprintf(buf+len, PAGE_SIZE-len, "OPEN: %d\n", atomic_read(&dev_open_count)); - return len; -} -/*----------------------------------------------------------------------------*/ -static ssize_t show_trace_value(struct device_driver *ddri, char *buf) -{ - ssize_t res; - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - res = snprintf(buf, PAGE_SIZE, "0x%04X\n", atomic_read(&obj->trace)); - return res; -} -/*----------------------------------------------------------------------------*/ -static ssize_t store_trace_value(struct device_driver *ddri, const char *buf, size_t count) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int trace; - if(NULL == obj) - { - printk(KERN_ERR "akm09911_i2c_data is null!!\n"); - return 0; - } - - if(1 == sscanf(buf, "0x%x", &trace)) - { - atomic_set(&obj->trace, trace); - } - else - { - printk(KERN_ERR "invalid content: '%s', length = %d\n", buf, count); - } - - return count; -} -/*----------------------------------------------------------------------------*/ -static DRIVER_ATTR(daemon, S_IRUGO, show_daemon_name, NULL); -static DRIVER_ATTR(shipmenttest,S_IRUGO | S_IWUSR, show_shipment_test, store_shipment_test); -static DRIVER_ATTR(chipinfo, S_IRUGO, show_chipinfo_value, NULL); -static DRIVER_ATTR(sensordata, S_IRUGO, show_sensordata_value, NULL); -static DRIVER_ATTR(posturedata, S_IRUGO, show_posturedata_value, NULL); -static DRIVER_ATTR(layout, S_IRUGO | S_IWUSR, show_layout_value, store_layout_value ); -static DRIVER_ATTR(status, S_IRUGO, show_status_value, NULL); -static DRIVER_ATTR(trace, S_IRUGO | S_IWUSR, show_trace_value, store_trace_value ); -/*----------------------------------------------------------------------------*/ -static struct driver_attribute *akm09911_attr_list[] = { - &driver_attr_daemon, - &driver_attr_shipmenttest, - &driver_attr_chipinfo, - &driver_attr_sensordata, - &driver_attr_posturedata, - &driver_attr_layout, - &driver_attr_status, - &driver_attr_trace, -}; -/*----------------------------------------------------------------------------*/ -static int akm09911_create_attr(struct device_driver *driver) -{ - int idx, err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - if (driver == NULL) - { - return -EINVAL; - } - - for(idx = 0; idx < num; idx++) - { - if((err = driver_create_file(driver, akm09911_attr_list[idx]))) - { - printk(KERN_ERR "driver_create_file (%s) = %d\n", akm09911_attr_list[idx]->attr.name, err); - break; - } - } - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_delete_attr(struct device_driver *driver) -{ - int idx ,err = 0; - int num = (int)(sizeof(akm09911_attr_list)/sizeof(akm09911_attr_list[0])); - - if(driver == NULL) - { - return -EINVAL; - } - - - for(idx = 0; idx < num; idx++) - { - driver_remove_file(driver, akm09911_attr_list[idx]); - } - - - return err; -} - - -/*----------------------------------------------------------------------------*/ -static int akm09911_open(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - int ret = -1; - - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Open device node:akm09911\n"); - } - ret = nonseekable_open(inode, file); - - return ret; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_release(struct inode *inode, struct file *file) -{ - struct akm09911_i2c_data *obj = i2c_get_clientdata(this_client); - atomic_dec(&dev_open_count); - if(atomic_read(&obj->trace) & AMK_CTR_DEBUG) - { - AKMDBG("Release device node:akm09911\n"); - } - return 0; -} - - -/*----------------------------------------------------------------------------*/ -//static int akm09911_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long arg) -static long akm09911_unlocked_ioctl(struct file *file, unsigned int cmd,unsigned long arg) -{ - void __user *argp = (void __user *)arg; - - /* NOTE: In this function the size of "char" should be 1-byte. */ - char sData[SENSOR_DATA_SIZE];/* for GETDATA */ - char rwbuf[RWBUF_SIZE]; /* for READ/WRITE */ - char buff[AKM09911_BUFSIZE]; /* for chip information */ - char mode; /* for SET_MODE*/ - int value[26]; /* for SET_YPR */ - int64_t delay[3]; /* for GET_DELAY */ - int status; /* for OPEN/CLOSE_STATUS */ - long ret = -1; /* Return value. */ - int layout; - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); - hwm_sensor_data* osensor_data; - uint32_t enable; - /* These two buffers are initialized at start up. - After that, the value is not changed */ - unsigned char sense_info[AKM_SENSOR_INFO_SIZE]; - unsigned char sense_conf[AKM_SENSOR_CONF_SIZE]; - - // printk(KERN_ERR"akm09911 cmd:0x%x\n", cmd); - switch (cmd) - { - case ECS_IOCTL_WRITE: - //AKMFUNC("ECS_IOCTL_WRITE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 2) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_TxData(&rwbuf[1], rwbuf[0]); - if(ret < 0) - { - return ret; - } - break; - case ECS_IOCTL_RESET: - ret = AKECS_Reset(0); // sw: 0, hw: 1 - if (ret < 0) - return ret; - break; - case ECS_IOCTL_READ: - //AKMFUNC("ECS_IOCTL_READ"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - - if(copy_from_user(rwbuf, argp, sizeof(rwbuf))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - - if((rwbuf[0] < 1) || (rwbuf[0] > (RWBUF_SIZE-1))) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - ret = AKI2C_RxData(&rwbuf[1], rwbuf[0]); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, rwbuf, rwbuf[0]+1)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_INFO: - - #ifdef AKM_Device_AK8963 - sense_info[0] = AK8963_REG_WIA; - #else - sense_info[0] = AK09911_REG_WIA1; - #endif - - ret = AKI2C_RxData(sense_info, AKM_SENSOR_INFO_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_info, AKM_SENSOR_INFO_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - case ECS_IOCTL_GET_CONF: - /* Set FUSE access mode */ - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_FUSE_ACCESS); - #else - ret = AKECS_SetMode(AK09911_MODE_FUSE_ACCESS); - #endif - if (ret < 0) - return ret; - #ifdef AKM_Device_AK8963 - sense_conf[0] = AK8963_FUSE_ASAX; - #else - sense_conf[0] = AK09911_FUSE_ASAX; - #endif - - ret = AKI2C_RxData(sense_conf, AKM_SENSOR_CONF_SIZE); - if (ret < 0) - { - return ret; - } - if(copy_to_user(argp, sense_conf, AKM_SENSOR_CONF_SIZE)) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - #ifdef AKM_Device_AK8963 - ret = AKECS_SetMode(AK8963_MODE_POWERDOWN); - #else - ret = AKECS_SetMode(AK09911_MODE_POWERDOWN); - #endif - if (ret < 0) - return ret; - - break; - - case ECS_IOCTL_SET_MODE: - //AKMFUNC("ECS_IOCTL_SET_MODE"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(&mode, argp, sizeof(mode))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - ret = AKECS_SetMode(mode); // MATCH command from AKMD PART - if(ret < 0) - { - return ret; - } - break; - - case ECS_IOCTL_GETDATA: - //AKMFUNC("ECS_IOCTL_GETDATA"); - ret = AKECS_GetData(sData, SENSOR_DATA_SIZE); - if(ret < 0) - { - return ret; - } - - if(copy_to_user(argp, sData, sizeof(sData))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_SET_YPR_09911: - //AKMFUNC("ECS_IOCTL_SET_YPR"); - if(argp == NULL) - { - AKMDBG("invalid argument."); - return -EINVAL; - } - if(copy_from_user(value, argp, sizeof(value))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - AKECS_SaveData(value); - break; - - case ECS_IOCTL_GET_OPEN_STATUS: - //AKMFUNC("IOCTL_GET_OPEN_STATUS"); - status = AKECS_GetOpenStatus(); - //AKMDBG("AKECS_GetOpenStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_CLOSE_STATUS: - //AKMFUNC("IOCTL_GET_CLOSE_STATUS"); - status = AKECS_GetCloseStatus(); - //AKMDBG("AKECS_GetCloseStatus returned (%d)", status); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_OSENSOR_STATUS: - //AKMFUNC("ECS_IOCTL_GET_OSENSOR_STATUS"); - status = atomic_read(&o_flag); - if(copy_to_user(argp, &status, sizeof(status))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_DELAY_09911: - //AKMFUNC("IOCTL_GET_DELAY"); - delay[0] = (int)akmd_delay * 1000000; - delay[1] = (int)akmd_delay * 1000000; - delay[2] = (int)akmd_delay * 1000000; - if(copy_to_user(argp, delay, sizeof(delay))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case ECS_IOCTL_GET_LAYOUT_09911: - layout = atomic_read(&data->layout); - printk(KERN_ERR "layout=%d\r\n",layout); - if(copy_to_user(argp, &layout, sizeof(layout))) - { - AKMDBG("copy_to_user failed."); - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_CHIPINFO: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - akm09911_ReadChipInfo(buff, AKM09911_BUFSIZE); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_READ_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - AKECS_GetRawData(buff, AKM09911_BUFSIZE); - - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - break; - - case MSENSOR_IOCTL_SENSOR_ENABLE: - - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - if(copy_from_user(&enable, argp, sizeof(enable))) - { - AKMDBG("copy_from_user failed."); - return -EFAULT; - } - else - { - printk( "MSENSOR_IOCTL_SENSOR_ENABLE enable=%d!\r\n",enable); - factory_mode = 1; - if(1 == enable) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - } - - break; - - case MSENSOR_IOCTL_READ_FACTORY_SENSORDATA: - if(argp == NULL) - { - printk(KERN_ERR "IO parameter pointer is NULL!\r\n"); - break; - } - - //AKECS_GetRawData(buff, AKM09911_BUFSIZE); - osensor_data = (hwm_sensor_data *)buff; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); - - sprintf(buff, "%x %x %x %x %x", osensor_data->values[0], osensor_data->values[1], - osensor_data->values[2],osensor_data->status,osensor_data->value_divide); - if(copy_to_user(argp, buff, strlen(buff)+1)) - { - return -EFAULT; - } - - break; - - default: - printk(KERN_ERR "%s not supported = 0x%04x", __FUNCTION__, cmd); - return -ENOIOCTLCMD; - break; - } - - return 0; -} -/*----------------------------------------------------------------------------*/ -static struct file_operations akm09911_fops = { - .owner = THIS_MODULE, - .open = akm09911_open, - .release = akm09911_release, - //.unlocked_ioctl = akm09911_ioctl, - .unlocked_ioctl = akm09911_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice akm09911_device = { - .minor = MISC_DYNAMIC_MINOR, - .name = "msensor", - .fops = &akm09911_fops, -}; -/*----------------------------------------------------------------------------*/ -int akm09911_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* msensor_data; - -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_operate"); - } -#endif - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if(value == 1) - { - atomic_set(&m_flag, 1); - atomic_set(&open_flag, 1); - } - else - { - atomic_set(&m_flag, 0); - if(atomic_read(&o_flag) == 0) - { - // atomic_set(&m_flag, 0); // if gyro, rv,la ,gravity open , then m flag open - atomic_set(&open_flag, 0); - } - } - wake_up(&open_wq); - - // TODO: turn device into standby or normal mode - } - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - msensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - msensor_data->values[0] = sensor_data[5] * CONVERT_M; - msensor_data->values[1] = sensor_data[6] * CONVERT_M; - msensor_data->values[2] = sensor_data[7] * CONVERT_M; - msensor_data->status = sensor_data[8]; - msensor_data->value_divide = CONVERT_M_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get m-sensor data: %d, %d, %d. divide %d, status %d!\n", - msensor_data->values[0],msensor_data->values[1],msensor_data->values[2], - msensor_data->value_divide,msensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "msensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_orientation_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* osensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_orientation_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_orientation_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - osensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - osensor_data->values[0] = sensor_data[13] * CONVERT_O; - osensor_data->values[1] = sensor_data[14] * CONVERT_O; - osensor_data->values[2] = sensor_data[15] * CONVERT_O; - osensor_data->status = sensor_data[8]; - osensor_data->value_divide = CONVERT_O_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get o-sensor data: %d, %d, %d. divide %d, status %d!\n", - osensor_data->values[0],osensor_data->values[1],osensor_data->values[2], - osensor_data->value_divide,osensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gsensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#ifdef AKM_Pseudogyro -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -int akm09911_gyroscope_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gyrosensor_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gyroscope_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - // printk(KERN_ERR "akm09911_gyroscope_operate SENSOR_ENABLE=%d mEnabled=%d\n",value,mEnabled); - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gyrosensor_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gyrosensor_data->values[0] = sensor_data[9] * CONVERT_Q16; - gyrosensor_data->values[1] = sensor_data[10] * CONVERT_Q16; - gyrosensor_data->values[2] = sensor_data[11] * CONVERT_Q16; - gyrosensor_data->status = sensor_data[12]; - gyrosensor_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gyro-sensor data: %d, %d, %d. divide %d, status %d!\n", - gyrosensor_data->values[0],gyrosensor_data->values[1],gyrosensor_data->values[2], - gyrosensor_data->value_divide,gyrosensor_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gyrosensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -/*----------------------------------------------------------------------------*/ -int akm09911_rotation_vector_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* RV_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_rotation_vector_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - akmd_delay = 10; // fix to 100Hz - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - RV_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - RV_data->values[0] = sensor_data[22] * CONVERT_Q16; - RV_data->values[1] = sensor_data[23] * CONVERT_Q16; - RV_data->values[2] = sensor_data[24] * CONVERT_Q16; - RV_data->status = 0 ; //sensor_data[19]; fix w-> 0 w - RV_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get rv-sensor data: %d, %d, %d. divide %d, status %d!\n", - RV_data->values[0],RV_data->values[1],RV_data->values[2], - RV_data->value_divide,RV_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "RV operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_gravity_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* gravity_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_gravity_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - gravity_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - gravity_data->values[0] = sensor_data[16] * CONVERT_Q16; - gravity_data->values[1] = sensor_data[17] * CONVERT_Q16; - gravity_data->values[2] = sensor_data[18] * CONVERT_Q16; - gravity_data->status = sensor_data[4]; - gravity_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get gravity-sensor data: %d, %d, %d. divide %d, status %d!\n", - gravity_data->values[0],gravity_data->values[1],gravity_data->values[2], - gravity_data->value_divide,gravity_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "gravity operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - - -/*----------------------------------------------------------------------------*/ -int akm09911_linear_accelration_operate(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout) -{ - int err = 0; - int value; - hwm_sensor_data* LA_data; -#if DEBUG - struct i2c_client *client = this_client; - struct akm09911_i2c_data *data = i2c_get_clientdata(client); -#endif - -#if DEBUG - if(atomic_read(&data->trace) & AMK_FUN_DEBUG) - { - AKMFUNC("akm09911_linear_accelration_operate"); - } -#endif - - switch (command) - { - case SENSOR_DELAY: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Set delay parameter error!\n"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - if(value <= 10) - { - value = 10; - } - akmd_delay = value; - } - break; - - case SENSOR_ENABLE: - if((buff_in == NULL) || (size_in < sizeof(int))) - { - printk(KERN_ERR "Enable sensor parameter error!\n"); - err = -EINVAL; - } - else - { - - value = *(int *)buff_in; - - if (mEnabled <= 0) { - if(value == 1) - { - atomic_set(&o_flag, 1); - atomic_set(&open_flag, 1); - } - } - else if (mEnabled == 1){ - if (!value ) - { - atomic_set(&o_flag, 0); - if(atomic_read(&m_flag) == 0) - { - atomic_set(&open_flag, 0); - } - } - } - - if (value ) { - mEnabled++; - if (mEnabled > 32767) mEnabled = 32767; - } else { - mEnabled--; - if (mEnabled < 0) mEnabled = 0; - } - wake_up(&open_wq); - } - - break; - - case SENSOR_GET_DATA: - if((buff_out == NULL) || (size_out< sizeof(hwm_sensor_data))) - { - printk(KERN_ERR "get sensor data parameter error!\n"); - err = -EINVAL; - } - else - { - LA_data = (hwm_sensor_data *)buff_out; - mutex_lock(&sensor_data_mutex); - - LA_data->values[0] = sensor_data[19] * CONVERT_Q16; - LA_data->values[1] = sensor_data[20] * CONVERT_Q16; - LA_data->values[2] = sensor_data[21] * CONVERT_Q16; - LA_data->status = sensor_data[4]; - LA_data->value_divide = CONVERT_Q16_DIV; - - mutex_unlock(&sensor_data_mutex); -#if DEBUG - if(atomic_read(&data->trace) & AMK_HWM_DEBUG) - { - AKMDBG("Hwm get LA-sensor data: %d, %d, %d. divide %d, status %d!\n", - LA_data->values[0],LA_data->values[1],LA_data->values[2], - LA_data->value_divide,LA_data->status); - } -#endif - } - break; - default: - printk(KERN_ERR "linear_accelration operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} - -#endif - -#ifndef CONFIG_HAS_EARLYSUSPEND -/*----------------------------------------------------------------------------*/ -static int akm09911_suspend(struct i2c_client *client, pm_message_t msg) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - if(msg.event == PM_EVENT_SUSPEND) - { - akm09911_power(obj->hw, 0); - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_resume(struct i2c_client *client) -{ - int err; - struct akm09911_i2c_data *obj = i2c_get_clientdata(client) - - - akm09911_power(obj->hw, 1); - - - return 0; -} -/*----------------------------------------------------------------------------*/ -#else /*CONFIG_HAS_EARLY_SUSPEND is defined*/ -/*----------------------------------------------------------------------------*/ -static void akm09911_early_suspend(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err = 0; - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - if ((err = AKECS_SetMode(AK09911_MODE_POWERDOWN)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } - - akm09911_power(obj->hw, 0); -} -/*----------------------------------------------------------------------------*/ -static void akm09911_late_resume(struct early_suspend *h) -{ - struct akm09911_i2c_data *obj = container_of(h, struct akm09911_i2c_data, early_drv); - int err; - - - if(NULL == obj) - { - printk(KERN_ERR "null pointer!!\n"); - return; - } - akm09911_power(obj->hw, 1); - - if ((err = AKECS_SetMode(AK09911_MODE_SNG_MEASURE)) < 0) { - AKMDBG("%s:%d Error.\n", __FUNCTION__, __LINE__); - return; - } -} -/*----------------------------------------------------------------------------*/ -#endif /*CONFIG_HAS_EARLYSUSPEND*/ -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, AKM09911_DEV_NAME); - return 0; -} - -static int ecompass_status_read_proc(struct file *file, char *buffer, size_t count, loff_t *ppos) -{ - char *page = NULL; - char *ptr = NULL; - int len = 0; - int err = -1; - - page = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!page) - { - kfree(page); - return -ENOMEM; - } - ptr = page; - - ptr += sprintf(ptr, "%d\n", ecompass_status); - - len = ptr - page; - if(*ppos >= len) - { - kfree(page); - return 0; - } - err = copy_to_user(buffer,(char *)page,len); - *ppos += len; - if(err) - { - kfree(page); - return err; - } - kfree(page); - return len; -} - -static const struct file_operations akm09911_ecompass_status_proc_fops = { - .read = ecompass_status_read_proc -}; - - -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - struct i2c_client *new_client; - struct akm09911_i2c_data *data; - int err = 0; - struct hwmsen_object sobj_m, sobj_o; - struct hwmsen_object sobj_gyro, sobj_rv; - struct hwmsen_object sobj_gravity, sobj_la; - - if(!(data = kmalloc(sizeof(struct akm09911_i2c_data), GFP_KERNEL))) - { - err = -ENOMEM; - goto exit; - } - memset(data, 0, sizeof(struct akm09911_i2c_data)); - data->hw = get_cust_mag_hw(); - - atomic_set(&data->layout, data->hw->direction); - atomic_set(&data->trace, 0); - - mutex_init(&sense_data_mutex); - mutex_init(&sensor_data_mutex); - - init_waitqueue_head(&data_ready_wq); - init_waitqueue_head(&open_wq); - - data->client = client; - new_client = data->client; - i2c_set_clientdata(new_client, data); - - this_client = new_client; - - printk(KERN_ERR " AKM09911 akm09911_probe: befor init prob \n"); - /* Check connection */ - err = AKECS_CheckDevice(); - if(err < 0) - { - printk(KERN_ERR "AKM09911 akm09911_probe: check device connect error\n"); - goto exit_init_failed; - } - - - /* Register sysfs attribute */ - if((err = akm09911_create_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "create attribute err = %d\n", err); - goto exit_sysfs_create_group_failed; - } - - - if((err = misc_register(&akm09911_device))) - { - printk(KERN_ERR "akm09911_device register failed\n"); - goto exit_misc_device_register_failed; } - - sobj_m.self = data; - sobj_m.polling = 1; - sobj_m.sensor_operate = akm09911_operate; - if((err = hwmsen_attach(ID_MAGNETIC, &sobj_m))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - sobj_o.self = data; - sobj_o.polling = 1; - sobj_o.sensor_operate = akm09911_orientation_operate; - if((err = hwmsen_attach(ID_ORIENTATION, &sobj_o))) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#ifdef AKM_Pseudogyro - //pseudo gyro sensor - sobj_gyro.self = data; - sobj_gyro.polling = 1; - sobj_gyro.sensor_operate = akm09911_gyroscope_operate; - if(err = hwmsen_attach(ID_GYROSCOPE, &sobj_gyro)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //rotation vector sensor - - sobj_rv.self = data; - sobj_rv.polling = 1; - sobj_rv.sensor_operate = akm09911_rotation_vector_operate; - if(err = hwmsen_attach(ID_ROTATION_VECTOR, &sobj_rv)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //Gravity sensor - - sobj_gravity.self = data; - sobj_gravity.polling = 1; - sobj_gravity.sensor_operate = akm09911_gravity_operate; - if(err = hwmsen_attach( ID_GRAVITY, &sobj_gravity)) - { - printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - - //LINEAR_ACCELERATION sensor - - sobj_la.self = data; - sobj_la.polling = 1; - sobj_la.sensor_operate = akm09911_linear_accelration_operate; - if(err = hwmsen_attach( ID_LINEAR_ACCELERATION, &sobj_la)) - { - // printk(KERN_ERR "attach fail = %d\n", err); - goto exit_kfree; - } - -#endif - -#if CONFIG_HAS_EARLYSUSPEND - data->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 2, - data->early_drv.suspend = akm09911_early_suspend, - data->early_drv.resume = akm09911_late_resume, - register_early_suspend(&data->early_drv); -#endif - - AKMDBG("%s: OK\n", __func__); - ecompass_status = 1; - return 0; - - exit_sysfs_create_group_failed: - exit_init_failed: - exit_misc_device_register_failed: - exit_kfree: - kfree(data); - exit: - printk(KERN_ERR "%s: err = %d\n", __func__, err); - ecompass_status = 0; - return err; -} -/*----------------------------------------------------------------------------*/ -static int akm09911_i2c_remove(struct i2c_client *client) -{ - int err; - - if((err = akm09911_delete_attr(&akm_sensor_driver.driver))) - { - printk(KERN_ERR "akm09911_delete_attr fail: %d\n", err); - } - - this_client = NULL; - i2c_unregister_device(client); - kfree(i2c_get_clientdata(client)); - misc_deregister(&akm09911_device); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_probe(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 1); - - atomic_set(&dev_open_count, 0); - //akm09911_force[0] = hw->i2c_num; - - if(i2c_add_driver(&akm09911_i2c_driver)) - { - printk(KERN_ERR "add driver error\n"); - return -1; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static int akm_remove(struct platform_device *pdev) -{ - struct mag_hw *hw = get_cust_mag_hw(); - - akm09911_power(hw, 0); - atomic_set(&dev_open_count, 0); - i2c_del_driver(&akm09911_i2c_driver); - return 0; -} -/*----------------------------------------------------------------------------*/ -static int __init akm09911_init(void) -{ - struct mag_hw *hw = get_cust_mag_hw(); - printk("akm09911: i2c_number=%d\n",hw->i2c_num); - // register cat /proc/ecompass_status - akm09911_ecompass_status_proc = proc_create("ecompass_status", 0, NULL, &akm09911_ecompass_status_proc_fops); - if (akm09911_ecompass_status_proc == NULL) - { - printk(KERN_ERR "create_proc_entry ecompass_status failed"); - } - - i2c_register_board_info(hw->i2c_num, &i2c_akm09911, 1); - if(platform_driver_register(&akm_sensor_driver)) - { - printk(KERN_ERR "failed to register driver"); - return -ENODEV; - } - return 0; -} -/*----------------------------------------------------------------------------*/ -static void __exit akm09911_exit(void) -{ - platform_driver_unregister(&akm_sensor_driver); -} -/*----------------------------------------------------------------------------*/ -module_init(akm09911_init); -module_exit(akm09911_exit); - -MODULE_AUTHOR("viral wang "); -MODULE_DESCRIPTION("AKM09911 compass driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRIVER_VERSION); diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/akm09911.h b/arch/arm/mach-mt8127/ttab/magnetometer/akm09911.h deleted file mode 100644 index 8fa660b6a28..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/akm09911.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Definitions for akm09911 compass chip. - */ -#ifndef AKM09911_H -#define AKM09911_H - -#include - -#define AKM09911_I2C_NAME "akm09911" - -#define AKM09911_I2C_ADDRESS 0x18 -#define AKM09911_BUFSIZE 0x20 - -#define SENSOR_DATA_SIZE 9 /* Rx buffer size, i.e from ST1 to ST2 */ -#define RWBUF_SIZE 16 /* Read/Write buffer size.*/ -#define CALIBRATION_DATA_SIZE 26 - -/*! \name AK09911 register address -\anchor AK09911_REG -Defines a register address of the AK09911.*/ -/*! @{*/ -/* Device specific constant values */ -#define AK09911_REG_WIA1 0x00 -#define AK09911_REG_WIA2 0x01 -#define AK09911_REG_INFO1 0x02 -#define AK09911_REG_INFO2 0x03 -#define AK09911_REG_ST1 0x10 -#define AK09911_REG_HXL 0x11 -#define AK09911_REG_HXH 0x12 -#define AK09911_REG_HYL 0x13 -#define AK09911_REG_HYH 0x14 -#define AK09911_REG_HZL 0x15 -#define AK09911_REG_HZH 0x16 -#define AK09911_REG_TMPS 0x17 -#define AK09911_REG_ST2 0x18 -#define AK09911_REG_CNTL1 0x30 -#define AK09911_REG_CNTL2 0x31 -#define AK09911_REG_CNTL3 0x32 - -/*! \name AK09911 fuse-rom address -\anchor AK09911_FUSE -Defines a read-only address of the fuse ROM of the AK09911.*/ -#define AK09911_FUSE_ASAX 0x60 -#define AK09911_FUSE_ASAY 0x61 -#define AK09911_FUSE_ASAZ 0x62 - -/*! \name AK09911 operation mode - \anchor AK09911_Mode - Defines an operation mode of the AK09911.*/ -#define AK09911_MODE_SNG_MEASURE 0x01 -#define AK09911_MODE_SELF_TEST 0x10 -#define AK09911_MODE_FUSE_ACCESS 0x1F -#define AK09911_MODE_POWERDOWN 0x00 -#define AK09911_RESET_DATA 0x01 - -#define AK09911_REGS_SIZE 13 -#define AK09911_WIA1_VALUE 0x48 -#define AK09911_WIA2_VALUE 0x05 - -/* Device specific constant values for AK8963*/ -#define AK8963_REG_WIA 0x00 -#define AK8963_REG_INFO 0x01 -#define AK8963_REG_ST1 0x02 -#define AK8963_REG_HXL 0x03 -#define AK8963_REG_HXH 0x04 -#define AK8963_REG_HYL 0x05 -#define AK8963_REG_HYH 0x06 -#define AK8963_REG_HZL 0x07 -#define AK8963_REG_HZH 0x08 -#define AK8963_REG_ST2 0x09 -#define AK8963_REG_CNTL1 0x0A -#define AK8963_REG_CNTL2 0x0B -#define AK8963_REG_ASTC 0x0C -#define AK8963_REG_TS1 0x0D -#define AK8963_REG_TS2 0x0E -#define AK8963_REG_I2CDIS 0x0F - -#define AK8963_FUSE_ASAX 0x10 -#define AK8963_FUSE_ASAY 0x11 -#define AK8963_FUSE_ASAZ 0x12 - -#define AK8963_MODE_SNG_MEASURE 0x01 -#define AK8963_MODE_SELF_TEST 0x08 -#define AK8963_MODE_FUSE_ACCESS 0x0F -#define AK8963_MODE_POWERDOWN 0x00 -#define AK8963_RESET_DATA 0x01 - -#define AK8963_REGS_SIZE 13 -#define AK8963_WIA_VALUE 0x48 - - -/* To avoid device dependency, convert to general name */ -#define AKM_I2C_NAME "akm09911" -#define AKM_MISCDEV_NAME "akm09911_dev" -#define AKM_SYSCLS_NAME "compass" -#define AKM_SYSDEV_NAME "akm09911" -#define AKM_REG_MODE AK09911_REG_CNTL2 -#define AKM_REG_RESET AK09911_REG_CNTL3 -#define AKM_REG_STATUS AK09911_REG_ST1 -#define AKM_MEASURE_TIME_US 10000 -#define AKM_DRDY_IS_HIGH(x) ((x) & 0x01) -#define AKM_SENSOR_INFO_SIZE 2 -#define AKM_SENSOR_CONF_SIZE 3 -#define AKM_SENSOR_DATA_SIZE 9 - -#define AKM_YPR_DATA_SIZE 26 -#define AKM_RWBUF_SIZE 16 -#define AKM_REGS_SIZE AK09911_REGS_SIZE -#define AKM_REGS_1ST_ADDR AK09911_REG_WIA1 -#define AKM_FUSE_1ST_ADDR AK09911_FUSE_ASAX - -#define AKM_MODE_SNG_MEASURE AK09911_MODE_SNG_MEASURE -#define AKM_MODE_SELF_TEST AK09911_MODE_SELF_TEST -#define AKM_MODE_FUSE_ACCESS AK09911_MODE_FUSE_ACCESS -#define AKM_MODE_POWERDOWN AK09911_MODE_POWERDOWN -#define AKM_RESET_DATA AK09911_RESET_DATA - -#define ACC_DATA_FLAG 0 -#define MAG_DATA_FLAG 1 -#define FUSION_DATA_FLAG 2 -#define AKM_NUM_SENSORS 3 - -#define ACC_DATA_READY (1<<(ACC_DATA_FLAG)) -#define MAG_DATA_READY (1<<(MAG_DATA_FLAG)) -#define FUSION_DATA_READY (1<<(FUSION_DATA_FLAG)) -/*! @}*/ - - - -// conversion of magnetic data (for AK09911) to uT units -//#define CONVERT_M (1.0f*0.06f) -// conversion of orientation data to degree units -//#define CONVERT_O (1.0f/64.0f) - -#define CONVERT_M 6 -#define CONVERT_M_DIV 100 // 6/100 = CONVERT_M -#define CONVERT_O 1 -#define CONVERT_O_DIV 64 // 1/64 = CONVERT_O - -#define CONVERT_Q16 1 -#define CONVERT_Q16_DIV 65536 // 1/64 = CONVERT_O - - - -#define CSPEC_SPI_USE 0 -#define DBG_LEVEL0 0x0001 // Critical -#define DBG_LEVEL1 0x0002 // Notice -#define DBG_LEVEL2 0x0003 // Information -#define DBG_LEVEL3 0x0004 // Debug -#define DBGFLAG DBG_LEVEL2 - -/* -//sensors_io.h need modify@junger -#define AKMIO 0xA1 - -* IOCTLs for AKM library * -#define ECS_IOCTL_READ _IOWR(AKMIO, 0x01, char*) -#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char*) -#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x03, short) -#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x04, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x05, int[YPR_DATA_SIZE]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x06, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x07, int) -#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x08, long long int[AKM_NUM_SENSORS]) -#define ECS_IOCTL_GET_LAYOUT _IOR(AKMIO, 0x09, char) -#define ECS_IOCTL_GET_OUTBIT _IOR(AKMIO, 0x0B, char) -#define ECS_IOCTL_RESET _IO(AKMIO, 0x0C) -#define ECS_IOCTL_GET_ACCEL _IOR(AKMIO, 0x30, short[3]) -*/ - -/* IOCTLs for Msensor misc. device library */ -#define MSENSOR 0x83 -/* IOCTLs for AKM library */ -#define ECS_IOCTL_WRITE _IOW(MSENSOR, 0x0b, char*) -#define ECS_IOCTL_READ _IOWR(MSENSOR, 0x0c, char*) -#define ECS_IOCTL_RESET _IO(MSENSOR, 0x0d) /* NOT used in AK8975 */ -#define ECS_IOCTL_SET_MODE _IOW(MSENSOR, 0x0e, short) -#define ECS_IOCTL_GETDATA _IOR(MSENSOR, 0x0f, char[SENSOR_DATA_SIZE]) -#define ECS_IOCTL_SET_YPR _IOW(MSENSOR, 0x10, short[12]) -#define ECS_IOCTL_GET_OPEN_STATUS _IOR(MSENSOR, 0x11, int) -#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(MSENSOR, 0x12, int) -#define ECS_IOCTL_GET_OSENSOR_STATUS _IOR(MSENSOR, 0x13, int) -#define ECS_IOCTL_GET_DELAY _IOR(MSENSOR, 0x14, short) -#define ECS_IOCTL_GET_PROJECT_NAME _IOR(MSENSOR, 0x15, char[64]) -#define ECS_IOCTL_GET_MATRIX _IOR(MSENSOR, 0x16, short [4][3][3]) -#define ECS_IOCTL_GET_LAYOUT _IOR(MSENSOR, 0x17, int[3]) - -#define ECS_IOCTL_GET_OUTBIT _IOR(MSENSOR, 0x23, char) -#define ECS_IOCTL_GET_ACCEL _IOR(MSENSOR, 0x24, short[3]) - -//#define ECS_IOCTL_GET_INFO _IOR(MSENSOR, 0x27, unsigned char[AKM_SENSOR_INFO_SIZE]) -#define ECS_IOCTL_GET_CONF _IOR(MSENSOR, 0x28, unsigned char[AKM_SENSOR_CONF_SIZE]) -#define ECS_IOCTL_SET_YPR_09911 _IOW(MSENSOR, 0x29, int[26]) -#define ECS_IOCTL_GET_DELAY_09911 _IOR(MSENSOR, 0x30, int64_t[3]) -#define ECS_IOCTL_GET_LAYOUT_09911 _IOR(MSENSOR, 0x31, char) - -#ifndef DBGPRINT -#define DBGPRINT(level, format, ...) \ - ((((level) != 0) && ((level) <= DBGFLAG)) \ - ? (printk(KERN_INFO, (format), ##__VA_ARGS__)) \ - : (void)0) - -#endif - -struct akm09911_platform_data { - char layout; - char outbit; - int gpio_DRDY; - int gpio_RSTN; -}; - -/*** Limit of factory shipment test *******************************************/ -#define TLIMIT_TN_REVISION_09911 "" -#define TLIMIT_NO_RST_WIA1_09911 "1-3" -#define TLIMIT_TN_RST_WIA1_09911 "RST_WIA1" -#define TLIMIT_LO_RST_WIA1_09911 0x48 -#define TLIMIT_HI_RST_WIA1_09911 0x48 -#define TLIMIT_NO_RST_WIA2_09911 "1-4" -#define TLIMIT_TN_RST_WIA2_09911 "RST_WIA2" -#define TLIMIT_LO_RST_WIA2_09911 0x05 -#define TLIMIT_HI_RST_WIA2_09911 0x05 - -#define TLIMIT_NO_ASAX_09911 "1-7" -#define TLIMIT_TN_ASAX_09911 "ASAX" -#define TLIMIT_LO_ASAX_09911 1 -#define TLIMIT_HI_ASAX_09911 254 -#define TLIMIT_NO_ASAY_09911 "1-8" -#define TLIMIT_TN_ASAY_09911 "ASAY" -#define TLIMIT_LO_ASAY_09911 1 -#define TLIMIT_HI_ASAY_09911 254 -#define TLIMIT_NO_ASAZ_09911 "1-9" -#define TLIMIT_TN_ASAZ_09911 "ASAZ" -#define TLIMIT_LO_ASAZ_09911 1 -#define TLIMIT_HI_ASAZ_09911 254 - -#define TLIMIT_NO_SNG_ST1_09911 "2-3" -#define TLIMIT_TN_SNG_ST1_09911 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1_09911 1 -#define TLIMIT_HI_SNG_ST1_09911 1 - -#define TLIMIT_NO_SNG_HX_09911 "2-4" -#define TLIMIT_TN_SNG_HX_09911 "SNG_HX" -#define TLIMIT_LO_SNG_HX_09911 -8189 -#define TLIMIT_HI_SNG_HX_09911 8189 - -#define TLIMIT_NO_SNG_HY_09911 "2-6" -#define TLIMIT_TN_SNG_HY_09911 "SNG_HY" -#define TLIMIT_LO_SNG_HY_09911 -8189 -#define TLIMIT_HI_SNG_HY_09911 8189 - -#define TLIMIT_NO_SNG_HZ_09911 "2-8" -#define TLIMIT_TN_SNG_HZ_09911 "SNG_HZ" -#define TLIMIT_LO_SNG_HZ_09911 -8189 -#define TLIMIT_HI_SNG_HZ_09911 8189 - -#define TLIMIT_NO_SNG_ST2_09911 "2-10" -#define TLIMIT_TN_SNG_ST2_09911 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2_09911 0 -#define TLIMIT_HI_SNG_ST2_09911 0 - -#define TLIMIT_NO_SLF_ST1_09911 "2-13" -#define TLIMIT_TN_SLF_ST1_09911 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1_09911 1 -#define TLIMIT_HI_SLF_ST1_09911 1 - -#define TLIMIT_NO_SLF_RVHX_09911 "2-14" -#define TLIMIT_TN_SLF_RVHX_09911 "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX_09911 -30 -#define TLIMIT_HI_SLF_RVHX_09911 30 - -#define TLIMIT_NO_SLF_RVHY_09911 "2-16" -#define TLIMIT_TN_SLF_RVHY_09911 "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY_09911 -30 -#define TLIMIT_HI_SLF_RVHY_09911 30 - -#define TLIMIT_NO_SLF_RVHZ_09911 "2-18" -#define TLIMIT_TN_SLF_RVHZ_09911 "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ_09911 -400 -#define TLIMIT_HI_SLF_RVHZ_09911 -50 - -#define TLIMIT_NO_SLF_ST2_09911 "2-20" -#define TLIMIT_TN_SLF_ST2_09911 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2_09911 0 -#define TLIMIT_HI_SLF_ST2_09911 0 - -/*** Limit of factory shipment test *******************************************/ - -#define TLIMIT_TN_REVISION "" -#define TLIMIT_NO_RST_WIA "1-3" -#define TLIMIT_TN_RST_WIA "RST_WIA" -#define TLIMIT_LO_RST_WIA 0x48 -#define TLIMIT_HI_RST_WIA 0x48 -#define TLIMIT_NO_RST_INFO "1-4" -#define TLIMIT_TN_RST_INFO "RST_INFO" -#define TLIMIT_LO_RST_INFO 0 -#define TLIMIT_HI_RST_INFO 255 -#define TLIMIT_NO_RST_ST1 "1-5" -#define TLIMIT_TN_RST_ST1 "RST_ST1" -#define TLIMIT_LO_RST_ST1 0 -#define TLIMIT_HI_RST_ST1 0 -#define TLIMIT_NO_RST_HXL "1-6" -#define TLIMIT_TN_RST_HXL "RST_HXL" -#define TLIMIT_LO_RST_HXL 0 -#define TLIMIT_HI_RST_HXL 0 -#define TLIMIT_NO_RST_HXH "1-7" -#define TLIMIT_TN_RST_HXH "RST_HXH" -#define TLIMIT_LO_RST_HXH 0 -#define TLIMIT_HI_RST_HXH 0 -#define TLIMIT_NO_RST_HYL "1-8" -#define TLIMIT_TN_RST_HYL "RST_HYL" -#define TLIMIT_LO_RST_HYL 0 -#define TLIMIT_HI_RST_HYL 0 -#define TLIMIT_NO_RST_HYH "1-9" -#define TLIMIT_TN_RST_HYH "RST_HYH" -#define TLIMIT_LO_RST_HYH 0 -#define TLIMIT_HI_RST_HYH 0 -#define TLIMIT_NO_RST_HZL "1-10" -#define TLIMIT_TN_RST_HZL "RST_HZL" -#define TLIMIT_LO_RST_HZL 0 -#define TLIMIT_HI_RST_HZL 0 -#define TLIMIT_NO_RST_HZH "1-11" -#define TLIMIT_TN_RST_HZH "RST_HZH" -#define TLIMIT_LO_RST_HZH 0 -#define TLIMIT_HI_RST_HZH 0 -#define TLIMIT_NO_RST_ST2 "1-12" -#define TLIMIT_TN_RST_ST2 "RST_ST2" -#define TLIMIT_LO_RST_ST2 0 -#define TLIMIT_HI_RST_ST2 0 -#define TLIMIT_NO_RST_CNTL "1-13" -#define TLIMIT_TN_RST_CNTL "RST_CNTL" -#define TLIMIT_LO_RST_CNTL 0 -#define TLIMIT_HI_RST_CNTL 0 -#define TLIMIT_NO_RST_ASTC "1-14" -#define TLIMIT_TN_RST_ASTC "RST_ASTC" -#define TLIMIT_LO_RST_ASTC 0 -#define TLIMIT_HI_RST_ASTC 0 -#define TLIMIT_NO_RST_I2CDIS "1-15" -#define TLIMIT_TN_RST_I2CDIS "RST_I2CDIS" -#define TLIMIT_LO_RST_I2CDIS_USEI2C 0 -#define TLIMIT_HI_RST_I2CDIS_USEI2C 0 -#define TLIMIT_LO_RST_I2CDIS_USESPI 1 -#define TLIMIT_HI_RST_I2CDIS_USESPI 1 -#define TLIMIT_NO_ASAX "1-17" -#define TLIMIT_TN_ASAX "ASAX" -#define TLIMIT_LO_ASAX 1 -#define TLIMIT_HI_ASAX 254 -#define TLIMIT_NO_ASAY "1-18" -#define TLIMIT_TN_ASAY "ASAY" -#define TLIMIT_LO_ASAY 1 -#define TLIMIT_HI_ASAY 254 -#define TLIMIT_NO_ASAZ "1-19" -#define TLIMIT_TN_ASAZ "ASAZ" -#define TLIMIT_LO_ASAZ 1 -#define TLIMIT_HI_ASAZ 254 -#define TLIMIT_NO_WR_CNTL "1-20" -#define TLIMIT_TN_WR_CNTL "WR_CNTL" -#define TLIMIT_LO_WR_CNTL 0x0F -#define TLIMIT_HI_WR_CNTL 0x0F - -#define TLIMIT_NO_SNG_ST1 "2-3" -#define TLIMIT_TN_SNG_ST1 "SNG_ST1" -#define TLIMIT_LO_SNG_ST1 1 -#define TLIMIT_HI_SNG_ST1 1 - -#define TLIMIT_NO_SNG_HX "2-4" -#define TLIMIT_TN_SNG_HX "SNG_HX" -#define TLIMIT_LO_SNG_HX -32759 -#define TLIMIT_HI_SNG_HX 32759 - -#define TLIMIT_NO_SNG_HY "2-6" -#define TLIMIT_TN_SNG_HY "SNG_HY" -#define TLIMIT_LO_SNG_HY -32759 -#define TLIMIT_HI_SNG_HY 32759 - -#define TLIMIT_NO_SNG_HZ "2-8" -#define TLIMIT_TN_SNG_HZ "SNG_HZ" -#define TLIMIT_LO_SNG_HZ -32759 -#define TLIMIT_HI_SNG_HZ 32759 - -#define TLIMIT_NO_SNG_ST2 "2-10" -#define TLIMIT_TN_SNG_ST2 "SNG_ST2" -#define TLIMIT_LO_SNG_ST2 0 -#define TLIMIT_HI_SNG_ST2 0 - -#define TLIMIT_NO_SLF_ST1 "2-14" -#define TLIMIT_TN_SLF_ST1 "SLF_ST1" -#define TLIMIT_LO_SLF_ST1 1 -#define TLIMIT_HI_SLF_ST1 1 - -#define TLIMIT_NO_SLF_RVHX "2-15" -#define TLIMIT_TN_SLF_RVHX "SLF_REVSHX" -#define TLIMIT_LO_SLF_RVHX -200 -#define TLIMIT_HI_SLF_RVHX 200 - -#define TLIMIT_NO_SLF_RVHY "2-17" -#define TLIMIT_TN_SLF_RVHY "SLF_REVSHY" -#define TLIMIT_LO_SLF_RVHY -200 -#define TLIMIT_HI_SLF_RVHY 200 - -#define TLIMIT_NO_SLF_RVHZ "2-19" -#define TLIMIT_TN_SLF_RVHZ "SLF_REVSHZ" -#define TLIMIT_LO_SLF_RVHZ -3200 -#define TLIMIT_HI_SLF_RVHZ -800 - -#define TLIMIT_NO_SLF_ST2 "2-21" -#define TLIMIT_TN_SLF_ST2 "SLF_ST2" -#define TLIMIT_LO_SLF_ST2 0 -#define TLIMIT_HI_SLF_ST2 0 - - - -#endif - - diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/cust_mag.c b/arch/arm/mach-mt8127/ttab/magnetometer/cust_mag.c deleted file mode 100644 index 1625a638bbc..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/cust_mag.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include - - -static struct mag_hw cust_mag_hw = { - .i2c_num = 2, - .direction = 7, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -static struct mag_hw cust_mag_hw_rotation270 = { - .i2c_num = 2, - .direction = 4, - .power_id = MT65XX_POWER_NONE, /*!< LDO is not used */ - .power_vol= VOL_DEFAULT, /*!< LDO is not used */ -}; -struct mag_hw* get_cust_mag_hw(void) -{ - /*if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) */ - /* return &cust_mag_hw_rotation270;*/ /*for p2[wsvga]*/ - /*else*/ - return &cust_mag_hw; -} diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/inc/cust_mag.h b/arch/arm/mach-mt8127/ttab/magnetometer/inc/cust_mag.h deleted file mode 100644 index 2a9a6f58e94..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/inc/cust_mag.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CUST_MAG_H__ -#define __CUST_MAG_H__ - -#include - -#define M_CUST_I2C_ADDR_NUM 2 - -struct mag_hw { - int i2c_num; - int direction; - int power_id; - int power_vol; - unsigned char i2c_addr[M_CUST_I2C_ADDR_NUM]; /*!< i2c address list,for chips which has different addresses with different HW layout */ - int power_vio_id; - int power_vio_vol; - bool is_batch_supported; -}; - -extern struct mag_hw* get_cust_mag_hw(void); -#endif diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/mag.c b/arch/arm/mach-mt8127/ttab/magnetometer/mag.c deleted file mode 100644 index 11fb199f510..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/mag.c +++ /dev/null @@ -1,1011 +0,0 @@ - -#include "mag.h" -#include "accel.h" - -static struct mag_context *mag_context_obj = NULL; - -static struct mag_init_info* msensor_init_list[MAX_CHOOSE_G_NUM]= {0}; //modified - -static void mag_early_suspend(struct early_suspend *h); -static void mag_late_resume(struct early_suspend *h); - -static void mag_work_func(struct work_struct *work) -{ - - struct mag_context *cxt = NULL; - int out_size; - hwm_sensor_data sensor_data; - int64_t nt; - struct timespec time; - int err, idx; - int i; - - cxt = mag_context_obj; - memset(&sensor_data, 0, sizeof(sensor_data)); - time.tv_sec = time.tv_nsec = 0; - time = get_monotonic_coarse(); - nt = time.tv_sec*1000000000LL+time.tv_nsec; - - for(i = 0; i < MAX_M_V_SENSOR; i++) - { - if (NULL == cxt->drv_obj[i]) - { - //MAG_LOG("%d driver not atteched\n",i); - continue; - } - - if((0 == cxt->drv_obj[i]->polling) || !(cxt->active_data_sensor&(0x01<drv_obj[i]->polling,cxt->active_data_sensor); - continue; - } - - err = cxt->drv_obj[i]->mag_operate(cxt->drv_obj[i]->self,OP_MAG_GET_DATA, NULL, 0, - &sensor_data, sizeof(hwm_sensor_data), &out_size); - - if(err) - { - MAG_ERR("get %d data fails!!\n" ,i); - return; - } - else - { - { - if( 0 == sensor_data.values[0] && 0==sensor_data.values[1] - && 0 == sensor_data.values[2]) - { - MAG_ERR("data is zero.\n" ); - continue; - } - - cxt->drv_data[i].mag_data.values[0] = sensor_data.values[0]; - cxt->drv_data[i].mag_data.values[1] = sensor_data.values[1]; - cxt->drv_data[i].mag_data.values[2] = sensor_data.values[2]; - cxt->drv_data[i].mag_data.status = sensor_data.status; - cxt->drv_data[i].mag_data.time = nt; - } - } - - if(true == cxt->is_first_data_after_enable) - { - cxt->is_first_data_after_enable = false; - //filter -1 value - if(MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[0] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[1] || - MAG_INVALID_VALUE == cxt->drv_data[i].mag_data.values[2]) - { - MAG_LOG(" read invalid data \n"); - continue; - - } - } - - if(ID_M_V_MAGNETIC ==i) - { - mag_data_report(MAGNETIC,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - if(ID_M_V_ORIENTATION ==i) - { - mag_data_report(ORIENTATION,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1], - cxt->drv_data[i].mag_data.values[2], - cxt->drv_data[i].mag_data.status); - - MAG_LOG("mag_type(%d) data[%d,%d,%d] \n" ,i,cxt->drv_data[i].mag_data.values[0], - cxt->drv_data[i].mag_data.values[1],cxt->drv_data[i].mag_data.values[2]); - } - - - } - - //report data to input device - //printk("new mag work run....\n"); - - if(true == cxt->is_polling_run) - { - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - } -} - -static void mag_poll(unsigned long data) -{ - struct mag_context *obj = (struct mag_context *)data; - if(obj != NULL) - { - schedule_work(&obj->report); - } -} - -static struct mag_context *mag_context_alloc_object(void) -{ - - struct mag_context *obj = kzalloc(sizeof(*obj), GFP_KERNEL); - MAG_LOG("mag_context_alloc_object++++\n"); - if(!obj) - { - MAG_ERR("Alloc magel object error!\n"); - return NULL; - } - atomic_set(&obj->delay, 200); /*5Hz*/// set work queue delay time 200ms - atomic_set(&obj->wake, 0); - INIT_WORK(&obj->report, mag_work_func); - init_timer(&obj->timer); - obj->timer.expires = jiffies + atomic_read(&obj->delay)/(1000/HZ); - obj->timer.function = mag_poll; - obj->timer.data = (unsigned long)obj; - obj->is_first_data_after_enable = false; - obj->is_polling_run = false; - obj->active_data_sensor = 0; - obj->active_nodata_sensor = 0; - obj->is_batch_enable = false; - mutex_init(&obj->mag_op_mutex); - MAG_LOG("mag_context_alloc_object----\n"); - return obj; -} -static int mag_enable_data(int handle,int enable) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->drv_obj[handle]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - - if(1 == enable) - { - MAG_LOG("MAG(%d) enable \n",handle); - cxt->is_first_data_after_enable = true; - cxt->active_data_sensor |= 1<mag_ctl.o_enable(1); - cxt->mag_ctl.o_open_report_data(1); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(1); - cxt->mag_ctl.m_open_report_data(1); - } - - if((0!=cxt->active_data_sensor) && (false == cxt->is_polling_run)&&(false == cxt->is_batch_enable)) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) mod timer \n",handle); - mod_timer(&cxt->timer, jiffies + atomic_read(&cxt->delay)/(1000/HZ)); - cxt->is_polling_run = true; - } - } - - - } - if(0 == enable) - { - MAG_LOG("MAG(%d) disable \n",handle); - cxt->active_data_sensor &= ~(1<mag_ctl.o_enable(0); - cxt->mag_ctl.o_open_report_data(0); - } - if(ID_M_V_MAGNETIC == handle) - { - cxt->mag_ctl.m_enable(0); - cxt->mag_ctl.m_open_report_data(0); - } - - if(0 == cxt->active_data_sensor && true == cxt->is_polling_run) - { - if(false == cxt->mag_ctl.is_report_input_direct) - { - MAG_LOG("MAG(%d) del timer \n",handle); - cxt->is_polling_run = false; - del_timer_sync(&cxt->timer); - cancel_work_sync(&cxt->report); - cxt->drv_data[handle].mag_data.values[0] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[1] = MAG_INVALID_VALUE; - cxt->drv_data[handle].mag_data.values[2] = MAG_INVALID_VALUE; - } - - } - - } - //mag_real_enable(handle,enable); - return 0; -} - -static int m_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_MAGNETIC,en); - return err; -} -static int o_enable_data(int en) -{ - int err; - err=mag_enable_data(ID_M_V_ORIENTATION,en); - return err; -} - -/* -static int m_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_MAGNETIC]) - { - MAG_ERR("no real mag driver\n"); - return -1; - } - if(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->mag_operate(mag_context_obj->drv_obj[ID_M_V_MAGNETIC]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag sensor_operate set delay function error \r\n"); - } - - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_delay %d ms\n",m_delay); - return 0; -} - -static int o_set_delay(u64 delay)//ns -{ - int m_delay =0; - m_delay = (int)delay/1000/1000; - - if(NULL == mag_context_obj->drv_obj[ID_M_V_ORIENTATION]) - { - MAG_ERR("no real mag odriver\n"); - return -1; - } - - if(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->mag_operate(mag_context_obj->drv_obj[ID_M_V_ORIENTATION]->self, OP_MAG_DELAY, &m_delay,sizeof(int), NULL, 0, NULL) != 0) - { - MAG_ERR("mag osensor_operate set delay function error \r\n"); - } - atomic_set(&mag_context_obj->delay, m_delay); - MAG_LOG(" mag_odelay %d ms\n",m_delay); - return 0; - -} -*/ - -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_magdev(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - printk("sensor test: mag function!\n"); - return len; -} -/*----------------------------------------------------------------------------*/ - -static ssize_t mag_store_oactive(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_oactive buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o-enable NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,1); - //cxt->mag_ctl.o_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_ORIENTATION,0); - //cxt->mag_ctl.o_enable(0); - } - else - { - MAG_ERR(" mag_store_oactive error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_oactive done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_oactive(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_o; - ACC_LOG("acc mag_dev_data o_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); - -} - -static ssize_t mag_store_active(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_active buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_enable) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl path is NULL\n"); - return count; - } - - if (!strncmp(buf, "1", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,1); - //cxt->mag_ctl.m_enable(1); - } - else if (!strncmp(buf, "0", 1)) - { - mag_enable_data(ID_M_V_MAGNETIC,0); - //cxt->mag_ctl.m_enable(0); - } - else - { - MAG_ERR(" mag_store_active error !!\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_active done\n"); - return count; -} -/*----------------------------------------------------------------------------*/ -static ssize_t mag_show_active(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - cxt = mag_context_obj; - - int div = cxt->mag_dev_data.div_m; - ACC_LOG("acc mag_dev_data m_div value: %d\n", div); - return snprintf(buf, PAGE_SIZE, "%d\n", div); -} - -static ssize_t mag_store_odelay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.o_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl o_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_odelay ++ \n"); - - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.o_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_odelay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_odelay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_delay(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *devobj = (struct mag_context*)dev_get_drvdata(dev); - int delay=0; - int mdelay=0; - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(NULL == cxt->mag_ctl.m_set_delay) - { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG("mag_ctl m_delay NULL\n"); - return count; - } - - MAG_LOG(" mag_delay ++ \n"); - - if (1 != sscanf(buf, "%d", &delay)) { - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_ERR("invalid format!!\n"); - return count; - } - if(false == cxt->mag_ctl.is_report_input_direct) - { - mdelay = (int)delay/1000/1000; - atomic_set(&mag_context_obj->delay, mdelay); - } - cxt->mag_ctl.m_set_delay(delay); - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_delay %d ns done\n",delay); - return count; -} - -static ssize_t mag_show_delay(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_batch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_batch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_batch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_batch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_batch done: %d\n", cxt->is_batch_enable); - return count; -} - - -static ssize_t mag_show_batch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_flush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} -static ssize_t mag_show_sensordevnum(struct device* dev, - struct device_attribute *attr, char *buf) -{ - struct mag_context *cxt = NULL; - char *devname = NULL; - cxt = mag_context_obj; - devname = dev_name(&cxt->idev->dev); - - return snprintf(buf, PAGE_SIZE, "%s\n", devname+5); -} - - -static ssize_t mag_show_flush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_obatch(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - MAG_LOG("mag_store_obatch buf=%s\n",buf); - mutex_lock(&mag_context_obj->mag_op_mutex); - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(cxt->mag_ctl.is_support_batch){ - if (!strncmp(buf, "1", 1)) - { - cxt->is_batch_enable = true; - } - else if (!strncmp(buf, "0", 1)) - { - cxt->is_batch_enable = false; - } - else - { - MAG_ERR(" mag_store_obatch error !!\n"); - } - }else{ - MAG_LOG(" mag_store_obatch not supported\n"); - } - mutex_unlock(&mag_context_obj->mag_op_mutex); - MAG_LOG(" mag_store_obatch done: %d\n", cxt->is_batch_enable); - return count; - -} - - -static ssize_t mag_show_obatch(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - -static ssize_t mag_store_oflush(struct device* dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return count; -} - - -static ssize_t mag_show_oflush(struct device* dev, - struct device_attribute *attr, char *buf) -{ - int len = 0; - MAG_LOG(" not support now\n"); - return len; -} - - -int mag_attach(int sensor,struct mag_drv_obj *obj) -{ - int err = 0; - MAG_FUN(); - //mag_context_obj->drv_obj[sensor] = obj; - mag_context_obj->drv_obj[sensor] = kzalloc(sizeof(struct mag_drv_obj), GFP_KERNEL); - if(mag_context_obj->drv_obj[sensor] == NULL) - { - err = -EPERM; - MAG_ERR(" mag attatch alloc fail \n"); - return err; - } - - memcpy(mag_context_obj->drv_obj[sensor], obj, sizeof(*obj)); - if(NULL == mag_context_obj->drv_obj[sensor]) - { - err =-1; - MAG_ERR(" mag attatch fail \n"); - } - return err; -} -/*----------------------------------------------------------------------------*/ -EXPORT_SYMBOL_GPL(mag_attach); - - -static int msensor_remove(struct platform_device *pdev) -{ - MAG_LOG("msensor_remove\n"); - return 0; -} - -static int msensor_probe(struct platform_device *pdev) -{ - MAG_LOG("msensor_probe\n"); - return 0; -} - -static struct platform_driver msensor_driver = { - .probe = msensor_probe, - .remove = msensor_remove, - .driver = - { - .name = "msensor", - } -}; - -static int mag_real_driver_init(void) -{ - int i =0; - int err=0; - MAG_LOG(" mag_real_driver_init +\n"); - for(i = 0; i < MAX_CHOOSE_G_NUM; i++) - { - MAG_LOG(" i=%d\n",i); - if(0 != msensor_init_list[i]) - { - MAG_LOG(" mag try to init driver %s\n", msensor_init_list[i]->name); - err = msensor_init_list[i]->init(); - if(0 == err) - { - MAG_LOG(" mag real driver %s probe ok\n", msensor_init_list[i]->name); - break; - } - } - } - - if(i == MAX_CHOOSE_G_NUM) - { - MAG_LOG(" mag_real_driver_init fail\n"); - err =-1; - } - return err; -} - - int mag_driver_add(struct mag_init_info* obj) -{ - int err=0; - int i =0; - - MAG_FUN(); - - for(i =0; i < MAX_CHOOSE_G_NUM; i++ ) - { - if(i == 0){ - MAG_LOG("register mensor driver for the first time\n"); - if(platform_driver_register(&msensor_driver)) - { - MAG_ERR("failed to register msensor driver already exist\n"); - } - } - if(NULL == msensor_init_list[i]) - { - obj->platform_diver_addr = &msensor_driver; - msensor_init_list[i] = obj; - break; - } - } - if(NULL==msensor_init_list[i]) - { - MAG_ERR("MAG driver add err \n"); - err =-1; - } - - return err; -} -EXPORT_SYMBOL_GPL(mag_driver_add); - -static int mag_misc_init(struct mag_context *cxt) -{ - - int err=0; - cxt->mdev.minor = MISC_DYNAMIC_MINOR; - cxt->mdev.name = MAG_MISC_DEV_NAME; - - if((err = misc_register(&cxt->mdev))) - { - MAG_ERR("unable to register mag misc device!!\n"); - } - return err; -} - -static void mag_input_destroy(struct mag_context *cxt) -{ - struct input_dev *dev = cxt->idev; - - input_unregister_device(dev); - input_free_device(dev); -} - -static int mag_input_init(struct mag_context *cxt) -{ - struct input_dev *dev; - int err = 0; - - dev = input_allocate_device(); - if (NULL == dev) - return -ENOMEM; - - dev->name = MAG_INPUTDEV_NAME; - - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_MAGEL_STATUS); - - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_X); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Y); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_Z); - input_set_capability(dev, EV_ABS, EVENT_TYPE_O_STATUS); - - input_set_abs_params(dev, EVENT_TYPE_MAGEL_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_MAGEL_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_abs_params(dev, EVENT_TYPE_O_X, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Y, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_Z, MAG_VALUE_MIN, MAG_VALUE_MAX, 0, 0); - input_set_abs_params(dev, EVENT_TYPE_O_STATUS, MAG_STATUS_MIN, MAG_STATUS_MAX, 0, 0); - - input_set_drvdata(dev, cxt); - - err = input_register_device(dev); - if (err < 0) { - input_free_device(dev); - return err; - } - cxt->idev= dev; - - return 0; -} - -DEVICE_ATTR(magdev, S_IWUSR | S_IRUGO, mag_show_magdev, NULL); -DEVICE_ATTR(magactive, S_IWUSR | S_IRUGO, mag_show_active, mag_store_active); -DEVICE_ATTR(magdelay, S_IWUSR | S_IRUGO, mag_show_delay, mag_store_delay); -DEVICE_ATTR(magoactive, S_IWUSR | S_IRUGO, mag_show_oactive, mag_store_oactive); -DEVICE_ATTR(magodelay, S_IWUSR | S_IRUGO, mag_show_odelay, mag_store_odelay); -DEVICE_ATTR(magbatch, S_IWUSR | S_IRUGO, mag_show_batch, mag_store_batch); -DEVICE_ATTR(magflush, S_IWUSR | S_IRUGO, mag_show_flush, mag_store_flush); -DEVICE_ATTR(magobatch, S_IWUSR | S_IRUGO, mag_show_obatch, mag_store_obatch); -DEVICE_ATTR(magoflush, S_IWUSR | S_IRUGO, mag_show_oflush, mag_store_oflush); -DEVICE_ATTR(magdevnum, S_IWUSR | S_IRUGO, mag_show_sensordevnum, NULL); - -static struct attribute *mag_attributes[] = { - &dev_attr_magdev.attr, - &dev_attr_magactive.attr, - &dev_attr_magdelay.attr, - &dev_attr_magbatch.attr, - &dev_attr_magflush.attr, - &dev_attr_magoactive.attr, - &dev_attr_magodelay.attr, - &dev_attr_magobatch.attr, - &dev_attr_magoflush.attr, - &dev_attr_magdevnum.attr, - NULL -}; - -static struct attribute_group mag_attribute_group = { - .attrs = mag_attributes -}; - - -int mag_register_data_path(struct mag_data_path *data) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - cxt->mag_dev_data.div_m = data->div_m; - cxt->mag_dev_data.div_o = data->div_o; - MAG_LOG("mag register data path div_o: %d\n", cxt->mag_dev_data.div_o); - MAG_LOG("mag register data path div_m: %d\n", cxt->mag_dev_data.div_m); - - return 0; -} - -int mag_register_control_path(struct mag_control_path *ctl) -{ - struct mag_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - - cxt->mag_ctl.m_set_delay = ctl->m_set_delay; - cxt->mag_ctl.m_enable= ctl->m_enable; - cxt->mag_ctl.m_open_report_data= ctl->m_open_report_data; - cxt->mag_ctl.o_set_delay = ctl->o_set_delay; - cxt->mag_ctl.o_open_report_data= ctl->o_open_report_data; - cxt->mag_ctl.o_enable= ctl->o_enable; - cxt->mag_ctl.is_report_input_direct = ctl->is_report_input_direct; - cxt->mag_ctl.is_support_batch = ctl->is_support_batch; - - if(NULL==cxt->mag_ctl.m_set_delay || NULL==cxt->mag_ctl.m_enable - || NULL==cxt->mag_ctl.m_open_report_data - || NULL==cxt->mag_ctl.o_set_delay || NULL==cxt->mag_ctl.o_open_report_data - || NULL==cxt->mag_ctl.o_enable) - { - MAG_LOG("mag register control path fail \n"); - return -1; - } - - //add misc dev for sensor hal control cmd - err = mag_misc_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register acc misc device!!\n"); - return -2; - } - err = sysfs_create_group(&mag_context_obj->mdev.this_device->kobj, - &mag_attribute_group); - if (err < 0) - { - MAG_ERR("unable to create acc attribute file\n"); - return -3; - } - - kobject_uevent(&mag_context_obj->mdev.this_device->kobj, KOBJ_ADD); - - return 0; -} - -int mag_data_report(MAG_TYPE type,int x, int y, int z, int status) -{ - //MAG_LOG("update!valus: %d, %d, %d, %d\n" , x, y, z, status); - struct acc_context *cxt = NULL; - int err =0; - cxt = mag_context_obj; - if(MAGNETIC==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_MAGEL_Z, z); - input_sync(cxt->idev); - } - if(ORIENTATION==type) - { - input_report_abs(cxt->idev, EVENT_TYPE_O_STATUS, status); - input_report_abs(cxt->idev, EVENT_TYPE_O_X, x); - input_report_abs(cxt->idev, EVENT_TYPE_O_Y, y); - input_report_abs(cxt->idev, EVENT_TYPE_O_Z, z); - input_sync(cxt->idev); - } - - return 0; -} - -static int mag_probe(struct platform_device *pdev) -{ - - int err; - MAG_LOG("+++++++++++++mag_probe!!\n"); - mag_context_obj = mag_context_alloc_object(); - if (!mag_context_obj) - { - err = -ENOMEM; - MAG_ERR("unable to allocate devobj!\n"); - goto exit_alloc_data_failed; - } - - //init real mageleration driver - err = mag_real_driver_init(); - if(err) - { - goto mag_real_driver_init_fail; - MAG_ERR("mag_real_driver_init fail\n"); - } - //init input dev - err = mag_input_init(mag_context_obj); - if(err) - { - MAG_ERR("unable to register mag input device!\n"); - goto exit_alloc_input_dev_failed; - } - - atomic_set(&(mag_context_obj->early_suspend), 0); - mag_context_obj->early_drv.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1, - mag_context_obj->early_drv.suspend = mag_early_suspend, - mag_context_obj->early_drv.resume = mag_late_resume, - register_early_suspend(&mag_context_obj->early_drv); - - MAG_LOG("----magel_probe OK !!\n"); - return 0; - - exit_hwmsen_create_attr_failed: - exit_misc_register_failed: - - exit_err_sysfs: - - if (err) - { - MAG_ERR("sysfs node creation error \n"); - mag_input_destroy(mag_context_obj); - } - - mag_real_driver_init_fail: - exit_alloc_input_dev_failed: - kfree(mag_context_obj); - - exit_alloc_data_failed: - - MAG_LOG("----magel_probe fail !!!\n"); - return err; -} - - - -static int mag_remove(struct platform_device *pdev) -{ - MAG_FUN(f); - int err=0; - input_unregister_device(mag_context_obj->idev); - sysfs_remove_group(&mag_context_obj->idev->dev.kobj, - &mag_attribute_group); - - if((err = misc_deregister(&mag_context_obj->mdev))) - { - MAG_ERR("misc_deregister fail: %d\n", err); - } - kfree(mag_context_obj); - - return 0; -} - -static void mag_early_suspend(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 1); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} -/*----------------------------------------------------------------------------*/ -static void mag_late_resume(struct early_suspend *h) -{ - atomic_set(&(mag_context_obj->early_suspend), 0); - MAG_LOG(" mag_context_obj ok------->hwm_obj->early_suspend=%d \n",atomic_read(&(mag_context_obj->early_suspend))); - return ; -} - -static int mag_suspend(struct platform_device *dev, pm_message_t state) -{ - return 0; -} -/*----------------------------------------------------------------------------*/ -static int mag_resume(struct platform_device *dev) -{ - return 0; -} - -static struct platform_driver mag_driver = -{ - .probe = mag_probe, - .remove = mag_remove, - .suspend = mag_suspend, - .resume = mag_resume, - .driver = - { - .name = MAG_PL_DEV_NAME, - } -}; - -static int __init mag_init(void) -{ - MAG_FUN(); - - if(platform_driver_register(&mag_driver)) - { - MAG_ERR("failed to register mag driver\n"); - return -ENODEV; - } - - return 0; -} - -static void __exit mag_exit(void) -{ - platform_driver_unregister(&mag_driver); - platform_driver_unregister(&msensor_driver); -} - -module_init(mag_init); -module_exit(mag_exit); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MAGELEROMETER device driver"); -MODULE_AUTHOR("Mediatek"); - diff --git a/arch/arm/mach-mt8127/ttab/magnetometer/mag.h b/arch/arm/mach-mt8127/ttab/magnetometer/mag.h deleted file mode 100644 index e4c4e8367bc..00000000000 --- a/arch/arm/mach-mt8127/ttab/magnetometer/mag.h +++ /dev/null @@ -1,141 +0,0 @@ - -#ifndef __MAG_H__ -#define __MAG_H__ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define MAG_TAG " " -#define MAG_FUN(f) printk(MAG_TAG"%s\n", __func__) -#define MAG_ERR(fmt, args...) printk(MAG_TAG"%s %d : "fmt, __func__, __LINE__, ##args) -#define MAG_LOG(fmt, args...) printk(MAG_TAG fmt, ##args) -#define MAG_VER(fmt, args...) printk(MAG_TAG"%s: "fmt, __func__, ##args) //((void)0) - -#define OP_MAG_DELAY 0X01 -#define OP_MAG_ENABLE 0X02 -#define OP_MAG_GET_DATA 0X04 - - -#define MAG_INVALID_VALUE -1 - -#define EVENT_TYPE_MAGEL_X ABS_X -#define EVENT_TYPE_MAGEL_Y ABS_Y -#define EVENT_TYPE_MAGEL_Z ABS_Z -#define EVENT_DIV_MAGEL ABS_RUDDER -#define EVENT_TYPE_MAGEL_STATUS ABS_WHEEL - -#define EVENT_TYPE_O_X ABS_RX -#define EVENT_TYPE_O_Y ABS_RY -#define EVENT_TYPE_O_Z ABS_RZ -#define EVENT_DIV_O ABS_GAS -#define EVENT_TYPE_O_STATUS ABS_THROTTLE - -#define MAG_DIV_MAX (32767) -#define MAG_DIV_MIN (1) - -#define MAG_VALUE_MAX (32767) -#define MAG_VALUE_MIN (-32768) -#define MAG_STATUS_MIN (0) -#define MAG_STATUS_MAX (64) - -#define MAX_CHOOSE_G_NUM 5 - -#define MAX_M_V_SENSOR 5 - -#define ID_M_V_MAGNETIC 0 -#define ID_M_V_ORIENTATION 1 - -typedef enum mag_type { - MAGNETIC=0, - ORIENTATION=1, -}MAG_TYPE; - -struct mag_data_path -{ - int div_m; - int div_o; - -}; - -struct mag_control_path -{ - int (*m_open_report_data)(int en); - int (*m_set_delay)(u64 delay); - int (*m_enable)(int en); - int (*o_open_report_data)(int en); - int (*o_set_delay)(u64 delay); - int (*o_enable)(int en); - bool is_report_input_direct; - bool is_support_batch; -}; - - -struct mag_init_info -{ - char *name; - int (*init)(void); - int (*uninit)(void); - struct platform_driver* platform_diver_addr; -}; - -struct mag_data{ - hwm_sensor_data mag_data ; - int data_updata; - //struct mutex lock; -}; - -struct mag_drv_obj { - void *self; - int polling; - int (*mag_operate)(void* self, uint32_t command, void* buff_in, int size_in, - void* buff_out, int size_out, int* actualout); -}; - -struct mag_context { - struct input_dev *idev; - struct miscdevice mdev; - struct work_struct report; - struct mutex mag_op_mutex; - atomic_t delay; /*polling period for reporting input event*/ - atomic_t wake; /*user-space request to wake-up, used with stop*/ - struct timer_list timer; /* polling timer */ - atomic_t trace; - - struct early_suspend early_drv; - struct mag_data_path mag_dev_data; - struct mag_control_path mag_ctl; - atomic_t early_suspend; - struct mag_drv_obj* drv_obj[MAX_M_V_SENSOR]; - struct mag_data drv_data[MAX_M_V_SENSOR]; - bool is_first_data_after_enable; - bool is_polling_run; - bool is_batch_enable; - uint32_t active_nodata_sensor; - uint32_t active_data_sensor; - //bool mag_type_enabled[MAX_M_V_SENSOR]; - //uint32_t mag_active_sensor; - -}; - -extern int mag_attach(int sensor,struct mag_drv_obj *obj); - -extern int mag_driver_add(struct mag_init_info* obj) ; -extern int mag_data_report(MAG_TYPE type,int x, int y, int z,int status); -extern int mag_register_control_path(struct mag_control_path *ctl); -extern int mag_register_data_path(struct mag_data_path *ctl); - - - - -#endif diff --git a/arch/arm/mach-mt8127/ttab/power/cust_battery_meter.h b/arch/arm/mach-mt8127/ttab/power/cust_battery_meter.h deleted file mode 100644 index cd9e4ccb7ad..00000000000 --- a/arch/arm/mach-mt8127/ttab/power/cust_battery_meter.h +++ /dev/null @@ -1,144 +0,0 @@ -#ifndef _CUST_BATTERY_METER_H -#define _CUST_BATTERY_METER_H - -#include - -// ============================================================ -// define -// ============================================================ -//#define SOC_BY_AUXADC -#ifdef CONFIG_MTK_PMIC_MT6397 -#define SOC_BY_HW_FG //fg auxadc -#else -#define SOC_BY_SW_FG //oam -#endif - -#define CUST_CAPACITY_OCV2CV_TRANSFORM -//#define CONFIG_DIS_CHECK_BATTERY -//#define FIXED_TBAT_25 - -#if defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) -#define BAT_VOL_USE_ISENSE -#define SWCHR_POWER_PATH -#endif - -#if defined(CONFIG_MTK_FAN5402_SUPPORT) \ - || defined(CONFIG_MTK_FAN5405_SUPPORT) \ - || defined(CONFIG_MTK_BQ24158_SUPPORT) \ - || defined(CONFIG_MTK_BQ24196_SUPPORT) \ - || defined(CONFIG_MTK_BQ24296_SUPPORT) \ - || defined(CONFIG_MTK_NCP1851_SUPPORT) \ - || defined(CONFIG_MTK_NCP1854_SUPPORT) \ - || defined(CONFIG_MTK_BQ24160_SUPPORT) \ - || defined(CONFIG_MTK_BQ24157_SUPPORT) \ - || defined(CONFIG_MTK_BQ24250_SUPPORT) \ - || defined(CONFIG_MTK_BQ24261_SUPPORT) -#define EXTERNAL_SWCHR_SUPPORT -#endif - -/* ADC Channel Number */ -#ifdef CONFIG_MTK_PMIC_MT6397 -#define CUST_TABT_NUMBER 8 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 1 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 0 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 0 -#define ISENSE_CHANNEL_NUMBER 1 -#endif -#define VCHARGER_CHANNEL_NUMBER 2 -#define VBATTEMP_CHANNEL_NUMBER 3 - -#else //6323 - -#define CUST_TABT_NUMBER 17 -#ifdef BAT_VOL_USE_ISENSE -#define VBAT_CHANNEL_NUMBER 6 // w/ powerpath, battery voltage is ISENSE(1) -#define ISENSE_CHANNEL_NUMBER 7 // w/ powerpath, system voltage is VSENSE(0) -#else -#define VBAT_CHANNEL_NUMBER 7 -#define ISENSE_CHANNEL_NUMBER 6 -#endif -#define VCHARGER_CHANNEL_NUMBER 4 -#define VBATTEMP_CHANNEL_NUMBER 5 - -#endif - -/* ADC resistor */ -#define R_BAT_SENSE 4 -#define R_I_SENSE 4 -#define R_CHARGER_1 330 -#define R_CHARGER_2 39 - -#define TEMPERATURE_T0 110 -#define TEMPERATURE_T1 0 -#define TEMPERATURE_T2 25 -#define TEMPERATURE_T3 50 -#define TEMPERATURE_T 255 // This should be fixed, never change the value - -#define FG_METER_RESISTANCE 0 - -/* Qmax for battery */ -#define Q_MAX_POS_50 4060 -#define Q_MAX_POS_25 4060 -#define Q_MAX_POS_0 3400 -#define Q_MAX_NEG_10 2950 - -#define Q_MAX_POS_50_H_CURRENT 4000 -#define Q_MAX_POS_25_H_CURRENT 4020 -#define Q_MAX_POS_0_H_CURRENT 2760 -#define Q_MAX_NEG_10_H_CURRENT 2450 - -/*[BUGFIX]-Add-BEGIN by TCTSZ.pingao.yang, 4/15/2015, pr-975290, change fg integration way */ -/* Discharge Percentage */ -#define OAM_D5 0 // 1 : D5, 0: D2 -/*[BUGFIX]-Add-end by TCTSZ.pingao.yang, 4/15/2015*/ - -/* battery meter parameter */ -#define CUST_TRACKING_POINT 14 -#define CUST_R_SENSE 62 //Fixed sensor resistor according to HW designed. -#define CUST_HW_CC 0 -#define AGING_TUNING_VALUE 100 -#define CUST_R_FG_OFFSET 23 - -#define OCV_BOARD_COMPESATE 0 //mV -#define R_FG_BOARD_BASE 1000 -#define R_FG_BOARD_SLOPE 1000 //slope -#define CAR_TUNE_VALUE 89 - - -/* HW Fuel gague */ -#define CURRENT_DETECT_R_FG (-1) //turn off auto detect for auxadc gauge -#define MinErrorOffset 1000 -#define FG_VBAT_AVERAGE_SIZE 18 -#define R_FG_VALUE 20 // mOhm, base is 20 - -#define CUST_POWERON_DELTA_CAPACITY_TOLRANCE 60 -#define CUST_POWERON_LOW_CAPACITY_TOLRANCE 5 -#define CUST_POWERON_MAX_VBAT_TOLRANCE 70 -#define CUST_POWERON_DELTA_VBAT_TOLRANCE 60 - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define FIXED_TBAT_25 -#endif - -/* Dynamic change wake up period of battery thread when suspend*/ -#define VBAT_NORMAL_WAKEUP 3600 //3.6V -#define VBAT_LOW_POWER_WAKEUP 3500 //3.5v -#define NORMAL_WAKEUP_PERIOD 5400 //90 * 60 = 90 min -#define LOW_POWER_WAKEUP_PERIOD 300 //5 * 60 = 5 min -#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 //30 s - -/*[BUGFIX]-Add-BEGIN by TCTSZ.pingao.yang, 4/15/2015, */ -#define MAX_SUSPEND_CURRENT 420 // 42 mA -#define MIN_SUSPEND_CURRENT 0 // 0 mA -#define DEFAUL_SUSPEND_CURRENT 120 //12mA -#define SUSPEND_CURRENT_SETP 30 //3mA -#define SLEEP_AFTER_FG_DIFF 3 // diff about 3% -#define UI_REDUCE_CURRENT 180 //18mA -#define SLEEP_REDUCE_CURRENT 60 //6mA -/*[BUGFIX]-Add-END by TCTSZ.pingao.yang */ - -#endif //#ifndef _CUST_BATTERY_METER_H diff --git a/arch/arm/mach-mt8127/ttab/power/cust_battery_meter_table.h b/arch/arm/mach-mt8127/ttab/power/cust_battery_meter_table.h deleted file mode 100644 index b0e7df8662b..00000000000 --- a/arch/arm/mach-mt8127/ttab/power/cust_battery_meter_table.h +++ /dev/null @@ -1,1053 +0,0 @@ -#ifndef _CUST_BATTERY_METER_TABLE_H -#define _CUST_BATTERY_METER_TABLE_H - -#include - -// ============================================================ -// define -// ============================================================ -#define BAT_NTC_10 1 -#define BAT_NTC_47 0 -#define BAT_NTC_100 0 - -#ifdef CONFIG_MTK_PMIC_MT6397 -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#define RBAT_PULL_UP_VOLT 1200 - -#else - -#if (BAT_NTC_10 == 1) -#define RBAT_PULL_UP_R 16900 -#define RBAT_PULL_DOWN_R 27000 -#endif -#if (BAT_NTC_47 == 1) -#define RBAT_PULL_UP_R 61900 -#define RBAT_PULL_DOWN_R 100000 -#endif -#if (BAT_NTC_100 == 1) -#define RBAT_PULL_UP_R 24000 -#define RBAT_PULL_DOWN_R 100000000 -#endif -#define RBAT_PULL_UP_VOLT 1800 -#endif - - -// ============================================================ -// ENUM -// ============================================================ - -// ============================================================ -// structure -// ============================================================ - -// ============================================================ -// typedef -// ============================================================ -typedef struct _BATTERY_PROFILE_STRUC { - kal_int32 percentage; - kal_int32 voltage; -} BATTERY_PROFILE_STRUC, *BATTERY_PROFILE_STRUC_P; - -typedef struct _R_PROFILE_STRUC { - kal_int32 resistance; // Ohm - kal_int32 voltage; -} R_PROFILE_STRUC, *R_PROFILE_STRUC_P; - -typedef enum { - T1_0C, - T2_25C, - T3_50C -} PROFILE_TEMPERATURE; - -// ============================================================ -// External Variables -// ============================================================ - -// ============================================================ -// External function -// ============================================================ - -// ============================================================ -// Table -// ============================================================ -#if (BAT_NTC_10 == 1) -BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,65170}, - {-15,52060}, - {-10,42820}, - { -5,34420}, - { 0,27750}, - { 5,22440}, - { 10,17926}, - { 15,14674}, - { 20,12081}, - { 25,10000}, - { 30,8250}, - { 35,6850}, - { 40,5823}, - { 45,4907}, - { 50,4160}, - { 55,3538}, - { 60,3021} -}; -#endif - -#if (BAT_NTC_47 == 1) -BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,483954}, - {-15,360850}, - {-10,271697}, - { -5,206463}, - { 0,158214}, - { 5,122259}, - { 10,95227}, - { 15,74730}, - { 20,59065}, - { 25,47000}, - { 30,37643}, - { 35,30334}, - { 40,24591}, - { 45,20048}, - { 50,16433}, - { 55,13539}, - { 60,11210} -}; -#endif - -#if (BAT_NTC_100 == 1) -BATT_TEMPERATURE Batt_Temperature_Table[] = { - {-20,1151037}, - {-15,846579}, - {-10,628988}, - { -5,471632}, - { 0,357012}, - { 5,272500}, - { 10,209710}, - { 15,162651}, - { 20,127080}, - { 25,100000}, - { 30,79222}, - { 35,63167}, - { 40,50677}, - { 45,40904}, - { 50,33195}, - { 55,27091}, - { 60,22224} -}; -#endif -// T0 -10C -BATTERY_PROFILE_STRUC battery_profile_t0[] = { - {0, 4333}, - {1, 4314}, - {3, 4296}, - {4, 4280}, - {6, 4263}, - {7, 4247}, - {9, 4231}, - {10, 4215}, - {12, 4199}, - {13, 4183}, - {15, 4168}, - {16, 4153}, - {18, 4137}, - {19, 4123}, - {20, 4107}, - {22, 4093}, - {23, 4079}, - {25, 4068}, - {26, 4058}, - {28, 4040}, - {29, 4020}, - {31, 4004}, - {32, 3993}, - {34, 3984}, - {35, 3974}, - {37, 3963}, - {38, 3951}, - {39, 3938}, - {41, 3923}, - {42, 3906}, - {44, 3891}, - {45, 3879}, - {47, 3868}, - {48, 3860}, - {50, 3851}, - {51, 3844}, - {53, 3837}, - {54, 3830}, - {56, 3824}, - {57, 3818}, - {58, 3812}, - {60, 3807}, - {61, 3803}, - {63, 3797}, - {64, 3793}, - {66, 3790}, - {67, 3786}, - {69, 3782}, - {70, 3778}, - {72, 3774}, - {73, 3769}, - {75, 3765}, - {76, 3760}, - {77, 3754}, - {79, 3747}, - {80, 3742}, - {82, 3734}, - {83, 3724}, - {85, 3715}, - {86, 3702}, - {88, 3693}, - {89, 3691}, - {91, 3689}, - {92, 3687}, - {94, 3685}, - {95, 3677}, - {96, 3638}, - {98, 3567}, - {99, 3464}, - {100, 3359}, - {101, 3333}, - {101, 3319}, - {101, 3312}, - {101, 3307}, - {101, 3304}, - {101, 3300}, - {101, 3295}, - {101, 3292}, - {101, 3291}, - {101, 3290}, - {101, 3290}, - {101, 3289}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, -}; - -// T1 0C -BATTERY_PROFILE_STRUC battery_profile_t1[] = { - {0, 4333}, - {1, 4314}, - {3, 4296}, - {4, 4280}, - {6, 4263}, - {7, 4247}, - {9, 4231}, - {10, 4215}, - {12, 4199}, - {13, 4183}, - {15, 4168}, - {16, 4153}, - {18, 4137}, - {19, 4123}, - {20, 4107}, - {22, 4093}, - {23, 4092}, - {25, 4081}, - {26, 4072}, - {28, 4047}, - {29, 4027}, - {31, 4005}, - {32, 3985}, - {34, 3957}, - {35, 3948}, - {37, 3940}, - {38, 3932}, - {39, 3923}, - {41, 3913}, - {42, 3903}, - {44, 3886}, - {45, 3878}, - {47, 3869}, - {48, 3862}, - {50, 3851}, - {51, 3842}, - {53, 3837}, - {54, 3830}, - {56, 3820}, - {57, 3815}, - {58, 3812}, - {60, 3807}, - {61, 3803}, - {63, 3793}, - {64, 3790}, - {66, 3786}, - {67, 3783}, - {69, 3780}, - {70, 3778}, - {72, 3771}, - {73, 3769}, - {75, 3766}, - {76, 3762}, - {77, 3759}, - {79, 3751}, - {80, 3746}, - {82, 3740}, - {83, 3732}, - {85, 3717}, - {86, 3709}, - {88, 3703}, - {89, 3698}, - {91, 3696}, - {92, 3693}, - {94, 3685}, - {95, 3672}, - {96, 3643}, - {98, 3589}, - {99, 3507}, - {100, 3384}, - {101, 3333}, - {101, 3319}, - {101, 3312}, - {101, 3307}, - {101, 3304}, - {101, 3300}, - {101, 3295}, - {101, 3292}, - {101, 3291}, - {101, 3290}, - {101, 3290}, - {101, 3289}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, -}; - -// T2 25C -BATTERY_PROFILE_STRUC battery_profile_t2[] = { - {0, 4333}, - {1, 4328}, - {3, 4316}, - {4, 4303}, - {6, 4274}, - {7, 4260}, - {9, 4247}, - {10, 4232}, - {12, 4220}, - {13, 4193}, - {15, 4182}, - {16, 4167}, - {18, 4141}, - {19, 4130}, - {20, 4116}, - {22, 4106}, - {23, 4091}, - {25, 4080}, - {26, 4068}, - {28, 4051}, - {29, 4037}, - {31, 4023}, - {32, 4006}, - {34, 3984}, - {35, 3975}, - {37, 3965}, - {38, 3954}, - {39, 3942}, - {41, 3940}, - {42, 3928}, - {44, 3924}, - {45, 3920}, - {47, 3888}, - {48, 3882}, - {50, 3880}, - {51, 3872}, - {53, 3868}, - {54, 3862}, - {56, 3850}, - {57, 3836}, - {58, 3832}, - {60, 3830}, - {61, 3824}, - {63, 3818}, - {64, 3812}, - {66, 3801}, - {67, 3791}, - {69, 3786}, - {70, 3780}, - {72, 3779}, - {73, 3775}, - {75, 3769}, - {76, 3765}, - {77, 3762}, - {79, 3753}, - {80, 3745}, - {82, 3734}, - {83, 3724}, - {85, 3720}, - {86, 3717}, - {88, 3710}, - {89, 3704}, - {91, 3698}, - {92, 3692}, - {94, 3692}, - {95, 3690}, - {96, 3684}, - {98, 3655}, - {99, 3626}, - {100, 3588}, - {101, 3582}, - {101, 3576}, - {101, 3576}, - {101, 3574}, - {101, 3569}, - {101, 3569}, - {101, 3569}, - {101, 3569}, - {101, 3569}, - {101, 3576}, - {101, 3574}, - {101, 3569}, - {101, 3569}, - {101, 3569}, - {101, 3569}, - {101, 3569}, -}; - -// T3 50C -BATTERY_PROFILE_STRUC battery_profile_t3[] = { - {0, 4333}, - {1, 4314}, - {3, 4296}, - {4, 4280}, - {6, 4263}, - {7, 4247}, - {9, 4231}, - {10, 4215}, - {12, 4199}, - {13, 4183}, - {15, 4168}, - {16, 4153}, - {18, 4137}, - {19, 4123}, - {20, 4107}, - {22, 4093}, - {23, 4079}, - {25, 4068}, - {26, 4058}, - {28, 4040}, - {29, 4020}, - {31, 4004}, - {32, 3993}, - {34, 3984}, - {35, 3974}, - {37, 3963}, - {38, 3951}, - {39, 3938}, - {41, 3923}, - {42, 3906}, - {44, 3891}, - {45, 3879}, - {47, 3868}, - {48, 3860}, - {50, 3851}, - {51, 3844}, - {53, 3837}, - {54, 3830}, - {56, 3824}, - {57, 3818}, - {58, 3812}, - {60, 3807}, - {61, 3803}, - {63, 3797}, - {64, 3793}, - {66, 3790}, - {67, 3786}, - {69, 3782}, - {70, 3778}, - {72, 3774}, - {73, 3769}, - {75, 3765}, - {76, 3760}, - {77, 3754}, - {79, 3747}, - {80, 3742}, - {82, 3734}, - {83, 3724}, - {85, 3715}, - {86, 3702}, - {88, 3693}, - {89, 3691}, - {91, 3689}, - {92, 3687}, - {94, 3685}, - {95, 3677}, - {96, 3638}, - {98, 3567}, - {99, 3464}, - {100, 3359}, - {101, 3333}, - {101, 3319}, - {101, 3312}, - {101, 3307}, - {101, 3304}, - {101, 3300}, - {101, 3295}, - {101, 3292}, - {101, 3291}, - {101, 3290}, - {101, 3290}, - {101, 3289}, - {101, 3288}, - {101, 3285}, - {101, 3285}, - {101, 3284}, -}; - -// battery profile for actual temperature. The size should be the same as T1, T2 and T3 -BATTERY_PROFILE_STRUC battery_profile_temperature[] = { - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - - -// ============================================================ -// Table -// ============================================================ -// T0 -10C -R_PROFILE_STRUC r_profile_t0[] = { - {813, 4333}, - {813, 4314}, - {814, 4296}, - {806, 4280}, - {801, 4263}, - {793, 4247}, - {788, 4231}, - {781, 4215}, - {775, 4199}, - {771, 4183}, - {768, 4168}, - {762, 4153}, - {761, 4137}, - {745, 4123}, - {751, 4107}, - {745, 4093}, - {745, 4079}, - {733, 4068}, - {732, 4058}, - {737, 4040}, - {739, 4020}, - {736, 4004}, - {732, 3993}, - {722, 3984}, - {718, 3974}, - {709, 3963}, - {707, 3951}, - {708, 3938}, - {711, 3923}, - {716, 3906}, - {718, 3891}, - {724, 3879}, - {728, 3868}, - {733, 3860}, - {737, 3851}, - {746, 3844}, - {748, 3837}, - {761, 3830}, - {770, 3824}, - {783, 3818}, - {798, 3812}, - {811, 3807}, - {823, 3803}, - {836, 3797}, - {852, 3793}, - {869, 3790}, - {889, 3786}, - {904, 3782}, - {921, 3778}, - {945, 3774}, - {962, 3769}, - {986, 3765}, - {1005, 3760}, - {1024, 3754}, - {1049, 3747}, - {1067, 3742}, - {1085, 3734}, - {1110, 3724}, - {1131, 3715}, - {1155, 3702}, - {1182, 3693}, - {1215, 3691}, - {1242, 3689}, - {1277, 3687}, - {1314, 3685}, - {1350, 3677}, - {1397, 3638}, - {1450, 3567}, - {1498, 3464}, - {1552, 3359}, - {1606, 3333}, - {1654, 3319}, - {1699, 3312}, - {1737, 3307}, - {1783, 3304}, - {1826, 3300}, - {1889, 3295}, - {1967, 3292}, - {1968, 3291}, - {1968, 3290}, - {1968, 3290}, - {1970, 3289}, - {1970, 3288}, - {1970, 3285}, - {1970, 3285}, - {1977, 3284}, -}; - -// T1 0C -R_PROFILE_STRUC r_profile_t1[] = { - {409, 4333}, - {409, 4314}, - {407, 4296}, - {401, 4280}, - {404, 4263}, - {394, 4247}, - {396, 4231}, - {390, 4215}, - {384, 4199}, - {387, 4183}, - {384, 4168}, - {383, 4153}, - {387, 4137}, - {383, 4123}, - {380, 4107}, - {384, 4093}, - {379, 4079}, - {382, 4068}, - {384, 4058}, - {384, 4040}, - {387, 4020}, - {388, 4004}, - {393, 3993}, - {392, 3984}, - {387, 3974}, - {373, 3963}, - {369, 3951}, - {366, 3938}, - {360, 3923}, - {360, 3906}, - {358, 3891}, - {357, 3879}, - {353, 3868}, - {350, 3860}, - {346, 3851}, - {344, 3844}, - {347, 3837}, - {350, 3830}, - {351, 3824}, - {353, 3818}, - {354, 3812}, - {360, 3807}, - {364, 3803}, - {367, 3797}, - {372, 3793}, - {382, 3790}, - {388, 3786}, - {392, 3782}, - {405, 3778}, - {407, 3774}, - {417, 3769}, - {426, 3765}, - {432, 3760}, - {443, 3754}, - {449, 3747}, - {462, 3742}, - {473, 3734}, - {481, 3724}, - {485, 3715}, - {494, 3702}, - {505, 3693}, - {519, 3691}, - {528, 3689}, - {539, 3687}, - {553, 3685}, - {565, 3677}, - {579, 3638}, - {597, 3567}, - {608, 3464}, - {629, 3359}, - {654, 3333}, - {678, 3319}, - {702, 3312}, - {734, 3307}, - {778, 3304}, - {829, 3300}, - {896, 3295}, - {977, 3292}, - {978, 3291}, - {978, 3290}, - {977, 3290}, - {980, 3289}, - {980, 3288}, - {980, 3285}, - {980, 3285}, - {981, 3284}, -}; - -// T2 25C -R_PROFILE_STRUC r_profile_t2[] = { - {120, 4333}, - {120, 4314}, - {123, 4296}, - {125, 4280}, - {125, 4263}, - {125, 4247}, - {125, 4231}, - {125, 4215}, - {125, 4199}, - {125, 4183}, - {127, 4168}, - {127, 4153}, - {127, 4137}, - {130, 4123}, - {128, 4107}, - {132, 4093}, - {132, 4079}, - {133, 4068}, - {138, 4058}, - {138, 4040}, - {138, 4020}, - {138, 4004}, - {142, 3993}, - {143, 3984}, - {147, 3974}, - {147, 3963}, - {148, 3951}, - {147, 3938}, - {143, 3923}, - {135, 3906}, - {130, 3891}, - {125, 3879}, - {123, 3868}, - {125, 3860}, - {123, 3851}, - {125, 3844}, - {125, 3837}, - {127, 3830}, - {128, 3824}, - {128, 3818}, - {130, 3812}, - {132, 3807}, - {135, 3803}, - {135, 3797}, - {137, 3793}, - {140, 3790}, - {148, 3786}, - {152, 3782}, - {155, 3778}, - {157, 3774}, - {152, 3769}, - {153, 3765}, - {153, 3760}, - {155, 3754}, - {152, 3747}, - {155, 3742}, - {157, 3734}, - {157, 3724}, - {162, 3715}, - {162, 3702}, - {163, 3693}, - {163, 3691}, - {168, 3689}, - {178, 3687}, - {188, 3685}, - {203, 3677}, - {205, 3638}, - {228, 3567}, - {253, 3464}, - {265, 3359}, - {223, 3333}, - {200, 3319}, - {188, 3312}, - {182, 3307}, - {173, 3304}, - {170, 3300}, - {160, 3295}, - {157, 3292}, - {153, 3291}, - {153, 3290}, - {153, 3290}, - {153, 3289}, - {152, 3288}, - {153, 3285}, - {147, 3285}, - {145, 3284}, -}; - -// T3 50C -R_PROFILE_STRUC r_profile_t3[] = { - {120, 4333}, - {120, 4314}, - {123, 4296}, - {125, 4280}, - {125, 4263}, - {125, 4247}, - {125, 4231}, - {125, 4215}, - {125, 4199}, - {125, 4183}, - {127, 4168}, - {127, 4153}, - {127, 4137}, - {130, 4123}, - {128, 4107}, - {132, 4093}, - {132, 4079}, - {133, 4068}, - {138, 4058}, - {138, 4040}, - {138, 4020}, - {138, 4004}, - {142, 3993}, - {143, 3984}, - {147, 3974}, - {147, 3963}, - {148, 3951}, - {147, 3938}, - {143, 3923}, - {135, 3906}, - {130, 3891}, - {125, 3879}, - {123, 3868}, - {125, 3860}, - {123, 3851}, - {125, 3844}, - {125, 3837}, - {127, 3830}, - {128, 3824}, - {128, 3818}, - {130, 3812}, - {132, 3807}, - {135, 3803}, - {135, 3797}, - {137, 3793}, - {140, 3790}, - {148, 3786}, - {152, 3782}, - {155, 3778}, - {157, 3774}, - {152, 3769}, - {153, 3765}, - {153, 3760}, - {155, 3754}, - {152, 3747}, - {155, 3742}, - {157, 3734}, - {157, 3724}, - {162, 3715}, - {162, 3702}, - {163, 3693}, - {163, 3691}, - {168, 3689}, - {178, 3687}, - {188, 3685}, - {203, 3677}, - {205, 3638}, - {228, 3567}, - {253, 3464}, - {265, 3359}, - {223, 3333}, - {200, 3319}, - {188, 3312}, - {182, 3307}, - {173, 3304}, - {170, 3300}, - {160, 3295}, - {157, 3292}, - {153, 3291}, - {153, 3290}, - {153, 3290}, - {153, 3289}, - {152, 3288}, - {153, 3285}, - {147, 3285}, - {145, 3284}, -}; - -// r-table profile for actual temperature. The size should be the same as T1, T2 and T3 -R_PROFILE_STRUC r_profile_temperature[] = { - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, - {0, 0}, -}; - -// ============================================================ -// function prototype -// ============================================================ -int fgauge_get_saddles(void); -BATTERY_PROFILE_STRUC_P fgauge_get_profile(kal_uint32 temperature); - -int fgauge_get_saddles_r_table(void); -R_PROFILE_STRUC_P fgauge_get_profile_r_table(kal_uint32 temperature); - -#endif //#ifndef _CUST_BATTERY_METER_TABLE_H - diff --git a/arch/arm/mach-mt8127/ttab/power/cust_charging.h b/arch/arm/mach-mt8127/ttab/power/cust_charging.h deleted file mode 100644 index a0f3764733d..00000000000 --- a/arch/arm/mach-mt8127/ttab/power/cust_charging.h +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _CUST_BAT_H_ -#define _CUST_BAT_H_ - -/* stop charging while in talking mode */ -#define STOP_CHARGING_IN_TAKLING -#define TALKING_RECHARGE_VOLTAGE 3800 -#define TALKING_SYNC_TIME 60 - -/* Battery Temperature Protection */ -#define MTK_TEMPERATURE_RECHARGE_SUPPORT -#define MAX_CHARGE_TEMPERATURE 55 -#define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 50 //47 Fixed to 50 degree for according to standard -#define MIN_CHARGE_TEMPERATURE 2 -#define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 4 //6 Fixed to 2 degree accoding to TCL standard -#define MAX_LIMIT_CHARGE_TEMPERATURE 45 -#define MIN_LIMIT_CHARGE_TEMPERATURE 43 -/* [PLATFORM]-ADD-BEGIN by TCTSZ leo.guo, 06/09/2015, BATTERY Notify for NTC*/ -#define MAX_RAISING_CHARGE_TEMPERATURE 58 -#define MIN_DROPPING_CHARGE_TEMPERATURE -18 -/* [PLATFORM]-ADD-END by TCTSZ leo.guo*/ -#define ERR_CHARGE_TEMPERATURE 0xFF - -/* Linear Charging Threshold */ -#define V_PRE2CC_THRES 3400 //mV -#define V_CC2TOPOFF_THRES 4050 -#define RECHARGING_VOLTAGE 4110 -#define CHARGING_FULL_CURRENT 150 //mA - -/* Charging Current Setting */ -//#define CONFIG_USB_IF -#define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF -#define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA -#define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA - -#define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA -#define AC_CHARGER_CURRENT CHARGE_CURRENT_1200_00_MA -#define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA -#define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA -#define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA - - -/* Precise Tunning */ -#define BATTERY_AVERAGE_DATA_NUMBER 3 -#define BATTERY_AVERAGE_SIZE 30 - -/* charger error check */ -/* [PLATFORM]-Add-BEGIN by TCTSZ.leo.guo, 04/15/2015, modify ntc temperature function */ -#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE -/* [PLATFORM]-Add-END by TCTSZ.leo.guo */ -#define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF -#define V_CHARGER_MAX 6500 // 6.5 V -#define V_CHARGER_MIN 4400 // 4.4 V - -/* Tracking TIME */ -#define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second -#define NPERCENT_TRACKING_TIME 20 // 20 second -#define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second -#define V_0PERCENT_TRACKING 3400 //3400mV - -/* Battery Notify */ -#define BATTERY_NOTIFY_CASE_0001_VCHARGER -#define BATTERY_NOTIFY_CASE_0002_VBATTEMP -//#define BATTERY_NOTIFY_CASE_0003_ICHARGING -//#define BATTERY_NOTIFY_CASE_0004_VBAT -//#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME - -/* JEITA parameter */ -//#define MTK_JEITA_STANDARD_SUPPORT -#define CUST_SOC_JEITA_SYNC_TIME 30 -#define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging -#define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V -#define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V -#define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V -#define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V - -/* For JEITA Linear Charging only */ -#define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA -#define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 -#define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 -#define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 -#define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 -#define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 - - -#ifdef CONFIG_MTK_FAN5405_SUPPORT -#define FAN5405_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24158_SUPPORT -#define BQ24158_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24296_SUPPORT -#define BQ24296_BUSNUM 1 -#endif - -#ifdef CONFIG_MTK_BQ24297_SUPPORT -#define BQ24297_BUSNUM 1 -#endif - -/* High battery support */ -#define HIGH_BATTERY_VOLTAGE_SUPPORT - -/* Disable Battery check for HQA */ -#ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION -#define CONFIG_DIS_CHECK_BATTERY -#endif - - -//#define MTK_WIRELESS_CHARGER_SUPPORT 1 -/* [PLATFORM]-Add-BEGIN by TCTSZ.leo.guo, 04/15/2015, modify ntc temperature function */ -#define MTK_BATTERY_PROTECT_FEATURE -/* [PLATFORM]-Add-END by TCTSZ.leo.guo */ -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT -#define TA_START_VCHR_TUNUNG_VOLTAGE 3400 -#define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 9500 // 9.5 V -#else -#define V_CHARGER_MAX 6000 // 6.0 V -#endif -#endif - -#endif /* _CUST_BAT_H_ */ diff --git a/arch/arm/mach-mt8127/ttab/power/cust_diso.h b/arch/arm/mach-mt8127/ttab/power/cust_diso.h deleted file mode 100644 index 56b87830f24..00000000000 --- a/arch/arm/mach-mt8127/ttab/power/cust_diso.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CUST_DISO_H_ -#define _CUST_DISO_H_ - -#define MTK_AUXADC_IRQ_SUPPORT - -#define MTK_LOAD_SWITCH_FPF3040 -//#define MTK_DISCRETE_SWITCH -//#define MTK_DSC_USE_EINT - -#ifdef MTK_LOAD_SWITCH_FPF3040 -#define VIN_SEL_FLAG -#define VIN_SEL_FLAG_DEFAULT_LOW - -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#define CUST_GPIO_VIN_SEL 18 - -#elif defined(MTK_DISCRETE_SWITCH) -#ifdef MTK_DSC_USE_EINT -#define VIN_SEL_FLAG -#endif - -#define CUST_GPIO_VIN_SEL 20 -#define CUST_EINT_VDC_NUM 42 -#define CUST_EINT_VUSB_NUM 43 -#define CUST_EINT_VDC_DEBOUNCE_CN 1 -#define CUST_EINT_VUSB_DEBOUNCE_CN 1 -#define AP_AUXADC_DISO_VDC_CHANNEL 0 -#define AP_AUXADC_DISO_VUSB_CHANNEL 1 -#define R_DISO_DC_PULL_UP 10000 -#define R_DISO_DC_PULL_DOWN 1000 -#define R_DISO_VBUS_PULL_UP 5100 -#define R_DISO_VBUS_PULL_DOWN 1000 -#define VDC_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VDC_MAX_VOLTAGE BATTERY_VOLT_10_500000_V -#define VBUS_MIN_VOLTAGE BATTERY_VOLT_04_440000_V //FPF3040 min value is 4000, set larger for PMIC detect -#define VBUS_MAX_VOLTAGE BATTERY_VOLT_07_000000_V -#define SWITCH_RISING_TIMING 105 -#define SWITCH_FALLING_TIMING 105 -#define LOAD_SWITCH_TIMING_MARGIN 30 -#define AUXADC_CHANNEL_DEBOUNCE 0x2 -#define AUXADC_CHANNEL_DELAY_PERIOD 0x5 -#endif - -#endif diff --git a/arch/arm/mach-mt8127/ttab/power/cust_pe.h b/arch/arm/mach-mt8127/ttab/power/cust_pe.h deleted file mode 100644 index 46b6c15a94c..00000000000 --- a/arch/arm/mach-mt8127/ttab/power/cust_pe.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _CUST_PE_H_ -#define _CUST_PE_H_ - -/* Pump Express support (fast charging) */ -#ifdef CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT -#define TA_START_BATTERY_SOC 1 -#define TA_STOP_BATTERY_SOC 95 -#define TA_AC_9V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_7V_INPUT_CURRENT CHARGE_CURRENT_1500_00_MA -#define TA_AC_CHARGING_CURRENT CHARGE_CURRENT_2500_00_MA -#define TA_9V_SUPPORT - -#undef V_CHARGER_MAX -#ifdef TA_9V_SUPPORT -#define V_CHARGER_MAX 10500 // 10.5 V -#else -#define V_CHARGER_MAX 7500 // 7.5 V -#endif -#endif - -#endif /* _CUST_PE_H_ */ diff --git a/arch/arm/mach-mt8127/ttab/power/cust_pmic.h b/arch/arm/mach-mt8127/ttab/power/cust_pmic.h deleted file mode 100644 index f78148a577b..00000000000 --- a/arch/arm/mach-mt8127/ttab/power/cust_pmic.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _CUST_PMIC_H_ -#define _CUST_PMIC_H_ - - -#endif /* _CUST_PMIC_H_ */ diff --git a/arch/arm/mach-mt8127/ttab/rtc/rtc-mt.h b/arch/arm/mach-mt8127/ttab/rtc/rtc-mt.h deleted file mode 100644 index dfcd287af38..00000000000 --- a/arch/arm/mach-mt8127/ttab/rtc/rtc-mt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 MediaTek, Inc. - * - * Author: Terry Chang - * - * 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 _RTC_MT_H_ -#define _RTC_MT_H_ - -#define RTC_YES 1 -#define RTC_NO 0 - -/* - * Reset to default date if RTC time is over 2038/1/19 3:14:7 - * Year (YEA) : 1970 ~ 2037 - * Month (MTH) : 1 ~ 12 - * Day of Month (DOM): 1 ~ 31 - */ -#define RTC_OVER_TIME_RESET RTC_YES -#define RTC_DEFAULT_YEA 2010 -#define RTC_DEFAULT_MTH 1 -#define RTC_DEFAULT_DOM 1 - -#endif diff --git a/arch/arm/mach-mt8127/ttab/sound/Makefile b/arch/arm/mach-mt8127/ttab/sound/Makefile deleted file mode 100755 index 01a5017a842..00000000000 --- a/arch/arm/mach-mt8127/ttab/sound/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := yusu_android_speaker.o - diff --git a/arch/arm/mach-mt8127/ttab/sound/inc/external_codec_driver.h b/arch/arm/mach-mt8127/ttab/sound/inc/external_codec_driver.h deleted file mode 100644 index 90793b5bc36..00000000000 --- a/arch/arm/mach-mt8127/ttab/sound/inc/external_codec_driver.h +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * external_codec_driver.h - * - * Project: - * -------- - * MT6592_phone_v1 - * - * Description: - * ------------ - * external codec control - * - * Author: - * ------- - * Stephen Chen - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * * - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _EXTERNAL_CODEC_DRIVER_H_ -#define _EXTERNAL_CODEC_DRIVER_H_ - -/* CS4398 registers addresses */ -#define CS4398_CHIPID 0x01 /* Chip ID */ -#define CS4398_MODE 0x02 /* Mode Control */ -#define CS4398_MIXING 0x03 -#define CS4398_MUTE 0x04 /* Mute Control */ -#define CS4398_VOLA 0x05 /* DAC Channel A Volume Control */ -#define CS4398_VOLB 0x06 /* DAC Channel B Volume Control */ -#define CS4398_RAMP 0x07 -#define CS4398_MISC1 0x08 -#define CS4398_MISC2 0x09 - -#define CS4398_FIRSTREG 0x01 -#define CS4398_LASTREG 0x09 -#define CS4398_NUMREGS (CS4398_LASTREG - CS4398_FIRSTREG + 1) - -typedef enum -{ - DIF_LEFT_JUSTIFIED, - DIF_I2S, - DIF_RIGHT_JUSTIFIED_16BIT, - DIF_RIGHT_JUSTIFIED_24BIT, - DIF_RIGHT_JUSTIFIED_20BIT, - DIF_RIGHT_JUSTIFIED_18BIT, - NUM_OF_DIF -} DIGITAL_INTERFACE_FORMAT; - - -enum ECODEC_CONTROL_SUBCOMMAND -{ - ECODEC_GETREGISTER_VALUE, - ECODEC_SETREGISTER_VALUE, -}; - -enum AUDIO_ECODEC_CONTROL_COMMAND -{ - NUM_AUD_ECODEC_COMMAND, -}; - -typedef struct -{ - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -} ECODEC_Control; - -void ExtCodec_Init(void); -void ExtCodec_PowerOn(void); -void ExtCodec_PowerOff(void); -bool ExtCodec_Register(void); -void ExtCodec_Mute(void); -void ExtCodec_SetGain(u8 leftright, u8 gain); -u8 ExtCodec_ReadReg(u8 addr); -void ExtCodec_DumpReg(void); -void ExtCodecDevice_Suspend(void); -void ExtCodecDevice_Resume(void); -void cust_extcodec_gpio_on(void); -void cust_extcodec_gpio_off(void); -void cust_extHPAmp_gpio_on(void); -void cust_extHPAmp_gpio_off(void); -void cust_extPLL_gpio_config(void); -#endif diff --git a/arch/arm/mach-mt8127/ttab/sound/inc/yusu_android_speaker.h b/arch/arm/mach-mt8127/ttab/sound/inc/yusu_android_speaker.h deleted file mode 100644 index 2bb04c61690..00000000000 --- a/arch/arm/mach-mt8127/ttab/sound/inc/yusu_android_speaker.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - * - * Filename: - * --------- - * Yusu_android_speaker.h - * - * Project: - * -------- - * Yusu - * - * Description: - * ------------ - * speaker select - * - * Author: - * ------- - * ChiPeng Chang (mtk02308) - * - * - *------------------------------------------------------------------------------ - * $Revision$ - * $Modtime:$ - * $Log:$ - * - * 06 17 2012 weiguo.li - * [ALPS00302429] [Need Patch] [Volunteer Patch]modify speaker driver - * . - * - * 12 14 2011 weiguo.li - * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h - * . - * - * 11 10 2011 weiguo.li - * [ALPS00091610] [Need Patch] [Volunteer Patch]chang yusu_android_speaker.c function name and modules use it - * . - * - * 09 28 2011 weiguo.li - * [ALPS00076254] [Need Patch] [Volunteer Patch]LGE audio driver using Voicebuffer for incall - * . - * - * 07 08 2011 weiguo.li - * [ALPS00059378] poring lge code to alps(audio) - * . - * - * 07 23 2010 chipeng.chang - * [ALPS00122386][Music]The playing music is no sound after below steps. - * when mode change , record deivce for volume setting. - * - * 07 03 2010 chipeng.chang - * [ALPS00002838][Need Patch] [Volunteer Patch] for speech volume step - * modify for headset customization. - * - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _YUSU_ANDROID_SPEAKER_H_ -#define _YUSU_ANDROID_SPEAKER_H_ - - enum EAMP_CONTROL_SUBCOMMAND - { - EAMP_SPEAKER_CLOSE =0, - EAMP_SPEAKER_OPEN, - EAMP_HEADPHONE_OPEN, - EAMP_HEADPHONE_CLOSE, - EAMP_EARPIECE_OPEN, - EAMP_EARPIECE_CLOSE, - EAMP_GETREGISTER_VALUE, - EAMP_SETREGISTER_VALUE, - EAMP_SETAMP_GAIN, - EAMP_GETAMP_GAIN, - EAMP_GET_CTRP_NUM , - EAMP_GET_CTRP_BITS, - EAMP_GET_CTRP_TABLE, - EAMP_SETMODE, - }; - -enum AUDIO_AMP_CONTROL_COMMAND{ - AUD_AMP_GET_CTRP_NUM , - AUD_AMP_GET_CTRP_BITS, - AUD_AMP_GET_CTRP_TABLE, - AUD_AMP_GET_REGISTER, - AUD_AMP_SET_REGISTER, - AUD_AMP_SET_AMPGAIN, // gain is use for low 24bits as external amp , device should base on control point set to AMPLL_CON0_REG - AUD_AMP_GET_AMPGAIN, - AUD_AMP_SET_MODE, - NUM_AUD_AMP_COMMAND -}; - -typedef struct { - unsigned long int command; - unsigned long int param1; - unsigned long int param2; -}AMP_Control; - -enum SPEAKER_CHANNEL -{ - Channel_None = 0 , - Channel_Right, - Channel_Left, - Channel_Stereo -}; - -bool Speaker_Init(void); -bool Speaker_DeInit(void); -bool Speaker_Register(void); -int ExternalAmp(void); - -void Sound_Speaker_Turnon(int channel); -void Sound_Speaker_Turnoff(int channel); -void Sound_Speaker_SetVolLevel(int level); - -void Sound_Headset_Turnon(void); -void Sound_Headset_Turnoff(void); - -//now for kernal use -void AudioAMPDevice_Suspend(void); -void AudioAMPDevice_Resume(void); -// used for AEE beep sound -void AudioAMPDevice_SpeakerLouderOpen(void); //some times kernal need to force speaker for notification -void AudioAMPDevice_SpeakerLouderClose(void); -void AudioAMPDevice_mute(void); - - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count); - - - - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size); - - -#endif - - diff --git a/arch/arm/mach-mt8127/ttab/sound/yusu_android_speaker.c b/arch/arm/mach-mt8127/ttab/sound/yusu_android_speaker.c deleted file mode 100644 index 492b9b663f3..00000000000 --- a/arch/arm/mach-mt8127/ttab/sound/yusu_android_speaker.c +++ /dev/null @@ -1,258 +0,0 @@ -/***************************************************************************** -* E X T E R N A L R E F E R E N C E S -****************************************************************************** -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "yusu_android_speaker.h" - -/***************************************************************************** -* C O M P I L E R F L A G S -****************************************************************************** -*/ -//#define CONFIG_DEBUG_MSG -#ifdef CONFIG_DEBUG_MSG -#define PRINTK(format, args...) printk( KERN_EMERG format,##args ) -#else -#define PRINTK(format, args...) -#endif - -#define AMP_CLASS_AB -//#define AMP_CLASS_D -//#define ENABLE_2_IN_1_SPK - -#if !defined(AMP_CLASS_AB) && !defined(AMP_CLASS_D) -#error "MT6323 SPK AMP TYPE does not be defined!!!" -#endif -/***************************************************************************** -* C O N S T A N T S -****************************************************************************** -*/ - -#define SPK_WARM_UP_TIME (55) //unit is ms -#define SPK_AMP_GAIN (4) //4:15dB -#define RCV_AMP_GAIN (1) //1:-3dB -#define SPK_R_ENABLE (1) -#define SPK_L_ENABLE (1) -/***************************************************************************** -* D A T A T Y P E S -****************************************************************************** -*/ -static int Speaker_Volume=0; -static bool gsk_on=false; // speaker is open? -static bool gsk_resume=false; -static bool gsk_forceon=false; -/***************************************************************************** -* F U N C T I O N D E F I N I T I O N -****************************************************************************** -*/ -extern void Yusu_Sound_AMP_Switch(BOOL enable); - -bool Speaker_Init(void) -{ - PRINTK("+Speaker_Init Success"); -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - - PRINTK("-Speaker_Init Success"); - return true; -} - -bool Speaker_Register(void) -{ - return false; -} - -int ExternalAmp(void) -{ - return 0; -} - -bool Speaker_DeInit(void) -{ - return false; -} - -void Sound_SpeakerL_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerL_SetVolLevel level=%d\n",level); -} - -void Sound_SpeakerR_SetVolLevel(int level) -{ - PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); -} - -void Sound_Speaker_Turnon(int channel) -{ - PRINTK("Sound_Speaker_Turnon channel = %d\n",channel); - if(gsk_on) - return; -#if defined(ENABLE_2_IN_1_SPK) -#if defined(AMP_CLASS_D) - -#endif -#endif -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - //msleep(SPK_WARM_UP_TIME); - gsk_on = true; -} - -void Sound_Speaker_Turnoff(int channel) -{ - PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel); - if(!gsk_on) - return; -#if defined(AMP_CLASS_AB) - -#elif defined(AMP_CLASS_D) - -#endif - gsk_on = false; -} - -void Sound_Speaker_SetVolLevel(int level) -{ - Speaker_Volume =level; -} - -void Sound_Headset_Turnon(void) -{ -} - -void Sound_Headset_Turnoff(void) -{ -} - -void Sound_Earpiece_Turnon(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -void Sound_Earpiece_Turnoff(void) -{ -#if defined(ENABLE_2_IN_1_SPK) - -#if defined(AMP_CLASS_D) - -#endif - -#endif -} - -//kernal use -void AudioAMPDevice_Suspend(void) -{ - PRINTK("AudioDevice_Suspend\n"); - if(gsk_on) - { - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_resume = true; - } - -} -void AudioAMPDevice_Resume(void) -{ - PRINTK("AudioDevice_Resume\n"); - if(gsk_resume) - Sound_Speaker_Turnon(Channel_Stereo); - gsk_resume = false; -} -void AudioAMPDevice_SpeakerLouderOpen(void) -{ - PRINTK("AudioDevice_SpeakerLouderOpen\n"); - gsk_forceon = false; - if(gsk_on) - return; - Sound_Speaker_Turnon(Channel_Stereo); - gsk_forceon = true; - return ; - -} -void AudioAMPDevice_SpeakerLouderClose(void) -{ - PRINTK("AudioDevice_SpeakerLouderClose\n"); - - if(gsk_forceon) - Sound_Speaker_Turnoff(Channel_Stereo); - gsk_forceon = false; - -} -void AudioAMPDevice_mute(void) -{ - PRINTK("AudioDevice_mute\n"); - if(gsk_on) - Sound_Speaker_Turnoff(Channel_Stereo); -} - -int Audio_eamp_command(unsigned int type, unsigned long args, unsigned int count) -{ - return 0; -} -static char *ExtFunArray[] = -{ - "InfoMATVAudioStart", - "InfoMATVAudioStop", - "End", -}; - -kal_int32 Sound_ExtFunction(const char* name, void* param, int param_size) -{ - int i = 0; - int funNum = -1; - - //Search the supported function defined in ExtFunArray - while(strcmp("End",ExtFunArray[i]) != 0 ) { //while function not equal to "End" - - if (strcmp(name,ExtFunArray[i]) == 0 ) { //When function name equal to table, break - funNum = i; - break; - } - i++; - } - - switch (funNum) { - case 0: //InfoMATVAudioStart - printk("RunExtFunction InfoMATVAudioStart \n"); - break; - - case 1: //InfoMATVAudioStop - printk("RunExtFunction InfoMATVAudioStop \n"); - break; - - default: - break; - } - - return 1; -} - - diff --git a/arch/arm/mach-mt8127/ttab/ssw/Makefile b/arch/arm/mach-mt8127/ttab/ssw/Makefile deleted file mode 100755 index ae302a83ac3..00000000000 --- a/arch/arm/mach-mt8127/ttab/ssw/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := sim_switch.o - diff --git a/arch/arm/mach-mt8127/ttab/ssw/inc/ssw.h b/arch/arm/mach-mt8127/ttab/ssw/inc/ssw.h deleted file mode 100644 index ac41b969a67..00000000000 --- a/arch/arm/mach-mt8127/ttab/ssw/inc/ssw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __SSW_H__ -#define __SSW_H__ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*-------------------------debug log define--------------------------------*/ -static int dbg_en = 1; -#define SSW_DBG(format, args...) do{ \ - if(dbg_en) \ - {\ - printk(KERN_ERR "[SSW] "format,##args);\ - }\ -}while(0) - - -/*-------------------------variable define----------------------------------*/ -#if 0 -#ifndef SSW_DUAL_TALK -#define SSW_DUAL_TALK 0 -#endif - -#ifndef SSW_SING_TALK -#define SSW_SING_TALK 1 -#endif -#endif - -/*------------------------Error Code---------------------------------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - -enum { - SSW_INVALID = 0xFFFFFFFF, - SSW_INTERN = 0, - SSW_EXT_FXLA2203 = 1, - SSW_EXT_SINGLE_COMMON = 2, -}; - -#endif - - diff --git a/arch/arm/mach-mt8127/ttab/ssw/sim_switch.c b/arch/arm/mach-mt8127/ttab/ssw/sim_switch.c deleted file mode 100644 index e5f8ba4c996..00000000000 --- a/arch/arm/mach-mt8127/ttab/ssw/sim_switch.c +++ /dev/null @@ -1,349 +0,0 @@ - -#include - -/*--------------Feature option---------------*/ -#define __ENABLE_SSW_SYSFS 1 - - -/*--------------SIM mode list----------------*/ -#define SINGLE_TALK_MDSYS (0x1) -#define SINGLE_TALK_MDSYS_LITE (0x2) -#define DUAL_TALK (0x3) -#define DUAL_TALK_SWAP (0x4) - -/*----------------Error Code-----------------*/ -#define SSW_SUCCESS (0) -#define SSW_INVALID_PARA (-1) - - -/*--------------Global varible---------------*/ -unsigned int sim_mode_curr = SINGLE_TALK_MDSYS; - -unsigned int get_sim_switch_type(void) -{ - printk("[ccci/ssw]SSW_GENERIC\n"); - return SSW_INTERN; -} -EXPORT_SYMBOL(get_sim_switch_type); - -struct mutex sim_switch_mutex; - - -static inline void sim_switch_writel(void *addr, unsigned offset, u32 data) -{ - *((volatile unsigned int*)(addr + offset)) = data; -} - -static inline u32 sim_switch_readl(const void *addr, unsigned offset) -{ - - u32 rc = 0; - rc = *((volatile unsigned int*)(addr + offset)); - return rc; -} - -static int set_sim_gpio(unsigned int mode); -static int get_current_ssw_mode(void); - -/*---------------------------------------------------------------------------*/ -/*define sysfs entry for configuring debug level and sysrq*/ -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer); -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size); -ssize_t ssw_mode_show(struct kobject *kobj, char *page); -ssize_t ssw_mode_store(struct kobject *kobj, const char *page, size_t size); - -struct sysfs_ops ssw_sysfs_ops = { - .show = ssw_attr_show, - .store = ssw_attr_store, -}; - -struct ssw_sys_entry { - struct attribute attr; - ssize_t (*show)(struct kobject *kobj, char *page); - ssize_t (*store)(struct kobject *kobj, const char *page, size_t size); -}; - -static struct ssw_sys_entry mode_entry = { - { .name = "mode", .mode = S_IRUGO | S_IWUSR }, // remove .owner = NULL, - ssw_mode_show, - ssw_mode_store, -}; - -struct attribute *ssw_attributes[] = { - &mode_entry.attr, - NULL, -}; - -struct kobj_type ssw_ktype = { - .sysfs_ops = &ssw_sysfs_ops, - .default_attrs = ssw_attributes, -}; - -static struct ssw_sysobj_t { - struct kobject kobj; -} ssw_sysobj; - - -int ssw_sysfs_init(void) -{ - struct ssw_sysobj_t *obj = &ssw_sysobj; - - memset(&obj->kobj, 0x00, sizeof(obj->kobj)); - - obj->kobj.parent = kernel_kobj; - if (kobject_init_and_add(&obj->kobj, &ssw_ktype, NULL, "mtk_ssw")) { - kobject_put(&obj->kobj); - return -ENOMEM; - } - kobject_uevent(&obj->kobj, KOBJ_ADD); - - return 0; -} - -ssize_t ssw_attr_show(struct kobject *kobj, struct attribute *attr, char *buffer) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->show(kobj, buffer); -} - -ssize_t ssw_attr_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t size) -{ - struct ssw_sys_entry *entry = container_of(attr, struct ssw_sys_entry, attr); - return entry->store(kobj, buffer, size); -} - -ssize_t ssw_mode_show(struct kobject *kobj, char *buffer) -{ - int remain = PAGE_SIZE; - int len; - char *ptr = buffer; - - len = scnprintf(ptr, remain, "0x%x\n", get_current_ssw_mode()); - ptr += len; - remain -= len; - SSW_DBG("ssw_mode_show\n"); - - return (PAGE_SIZE-remain); -} - -ssize_t ssw_mode_store(struct kobject *kobj, const char *buffer, size_t size) -{ - int mode; - int res = sscanf(buffer, "%x", &mode); - - if (res != 1) - { - printk("%s: expect 1 numbers\n", __FUNCTION__); - } - else - { - SSW_DBG("ssw_mode_store %d\n", mode); - //Switch sim mode - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - } - return size; -} -/*---------------------------------------------------------------------------*/ - - - -int get_current_ssw_mode(void) -{ - return sim_mode_curr; -} - - -static int set_sim_gpio(unsigned int mode) -{ - SSW_DBG("set_sim_gpio %d\n", mode); - - switch(mode) - { - case SINGLE_TALK_MDSYS: - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - mt_set_gpio_mode(GPIO_SIM1_SCLK, 1); //SIM1_SCLK - mt_set_gpio_mode(GPIO_SIM1_SIO, 1); //SIM1_SIO - mt_set_gpio_mode(GPIO_SIM2_SCLK, 1); //SIM2_SCLK - mt_set_gpio_mode(GPIO_SIM2_SIO, 1); //SIM2_SIO - //mt_set_gpio_mode(GPIO_SIM1_SRST, 4); //SIM1_SRST, 6582 not use reset pin - //mt_set_gpio_mode(GPIO_SIM2_SRST, 4); //SIM2_SRST, 6582 not use reset pin - #endif - break; - - default: - SSW_DBG("Mode(%d) not supported!!!", mode); - return SSW_INVALID_PARA; - } - -#if 0 - SSW_DBG("Current sim mode(%d), GPIO0_MODE(%d, %d), GPIO1_MODE(%d, %d), GPIO2_MODE(%d, %d), GPIO3_MODE(%d, %d), GPIO89_MODE(%d, %d), GPIO90_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO0), mt_get_gpio_dir(GPIO0), mt_get_gpio_mode(GPIO1), mt_get_gpio_dir(GPIO1), \ - mt_get_gpio_mode(GPIO2), mt_get_gpio_dir(GPIO2), mt_get_gpio_mode(GPIO3), mt_get_gpio_dir(GPIO3), \ - mt_get_gpio_mode(GPIO89), mt_get_gpio_dir(GPIO89), mt_get_gpio_mode(GPIO90), mt_get_gpio_dir(GPIO90)); -#else - #if defined(GPIO_SIM1_SCLK) && defined(GPIO_SIM1_SIO) && defined(GPIO_SIM2_SCLK) && defined(GPIO_SIM2_SIO) - SSW_DBG("Current sim mode(%d), GPIO_SIM1_SCLK_MODE(%d, %d), GPIO_SIM1_SIO_MODE(%d, %d), GPIO_SIM2_SCLK_MODE(%d, %d), GPIO_SIM2_SIO_MODE(%d, %d)\n", \ - mode, mt_get_gpio_mode(GPIO_SIM1_SCLK), mt_get_gpio_dir(GPIO_SIM1_SCLK), mt_get_gpio_mode(GPIO_SIM1_SIO), mt_get_gpio_dir(GPIO_SIM1_SIO), \ - mt_get_gpio_mode(GPIO_SIM2_SCLK), mt_get_gpio_dir(GPIO_SIM2_SCLK), mt_get_gpio_mode(GPIO_SIM2_SIO), mt_get_gpio_dir(GPIO_SIM2_SIO)); - #endif -#endif - - return SSW_SUCCESS; -} - - -int switch_sim_mode(int id, char *buf, unsigned int len) -{ - unsigned int mode = *((unsigned int *)buf); - - SSW_DBG("sim switch: %d(%d)\n", mode, sim_mode_curr); - - mutex_lock(&sim_switch_mutex); - - if ((sim_mode_curr != mode) && (SSW_SUCCESS == set_sim_gpio(mode))) - { - sim_mode_curr = mode; - } - - mutex_unlock(&sim_switch_mutex); - - SSW_DBG("sim switch(%d) OK\n", sim_mode_curr); - - return 0; - -} -EXPORT_SYMBOL(switch_sim_mode); - -//To decide sim mode according to compile option -static int get_sim_mode_init(void) -{ - unsigned int sim_mode = 0; - unsigned int md1_enable, md2_enable = 0; - - md1_enable = get_modem_is_enabled(MD_SYS1); - md2_enable = get_modem_is_enabled(MD_SYS2); - - if (md1_enable){ - sim_mode = SINGLE_TALK_MDSYS; - if (md2_enable) - sim_mode = DUAL_TALK; - } - else if (md2_enable) - sim_mode = SINGLE_TALK_MDSYS_LITE; - - return sim_mode; -} - -//sim switch hardware initial -static int sim_switch_init(void) -{ - SSW_DBG("sim_switch_init\n"); - - //better to set pull_en and pull_sel first, then mode - //if GPIO in sim mode, no need to set direction, because hw has done this when setting mode - /* - mt_set_gpio_dir(GPIO_SIM1_SCLK, GPIO_DIR_OUT); //GPIO0->SIM2_CLK, out - mt_set_gpio_dir(GPIO_SIM1_SIO, GPIO_DIR_IN); //GPIO1->SIM2_SIO, in - mt_set_gpio_dir(GPIO_SIM2_SCLK, GPIO_DIR_OUT); //GPIO2->SIM1_CLK, out - mt_set_gpio_dir(GPIO_SIM2_SIO, GPIO_DIR_IN); //GPIO3->SIM1_SIO, in - */ - //mt_set_gpio_dir(GPIO89, GPIO_DIR_OUT); //GPIO89->SIM1_SRST, out, 6572 not use reset pin - //mt_set_gpio_dir(GPIO90, GPIO_DIR_OUT); //GPIO90->SIM2_SRST, out, 6572 not use reset pin - - sim_mode_curr = get_sim_mode_init(); - if (SSW_SUCCESS != set_sim_gpio(sim_mode_curr)) - { - SSW_DBG("sim_switch_init fail \n"); - return SSW_INVALID_PARA; - } - - return 0; -} - - -static int sim_switch_probe(struct platform_device *dev) -{ - SSW_DBG("Enter sim_switch_probe\n"); - - //sim_switch_init(); - - mutex_init(&sim_switch_mutex); - - //register_ccci_kern_func(ID_SSW_SWITCH_MODE, switch_sim_mode); - - return 0; -} - -static int sim_switch_remove(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_remove \n"); - return 0; -} - -static void sim_switch_shutdown(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_shutdown \n"); -} - -static int sim_switch_suspend(struct platform_device *dev, pm_message_t state) -{ - //SSW_DBG("sim_switch_suspend \n"); - return 0; -} - -static int sim_switch_resume(struct platform_device *dev) -{ - //SSW_DBG("sim_switch_resume \n"); - return 0; -} - - -static struct platform_driver sim_switch_driver = -{ - .driver = { - .name = "sim-switch", - }, - .probe = sim_switch_probe, - .remove = sim_switch_remove, - .shutdown = sim_switch_shutdown, - .suspend = sim_switch_suspend, - .resume = sim_switch_resume, -}; - - -static int __init sim_switch_driver_init(void) -{ - int ret = 0; - - SSW_DBG("sim_switch_driver_init\n"); - ret = platform_driver_register(&sim_switch_driver); - if (ret) { - SSW_DBG("ssw_driver register fail(%d)\n", ret); - return ret; - } -#if __ENABLE_SSW_SYSFS - ssw_sysfs_init(); -#endif - - sim_switch_init(); - - return ret; -} - - -static void __exit sim_switch_driver_exit(void) -{ - return; -} - - -module_init(sim_switch_driver_init); -module_exit(sim_switch_driver_exit); - - -MODULE_DESCRIPTION("MTK SIM Switch Driver"); -MODULE_AUTHOR("Anny "); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/Makefile b/arch/arm/mach-mt8127/ttab/touchpanel/Makefile deleted file mode 100755 index 2972a54d654..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := goodix_tool.o -obj-y += gt9xx_driver.o -obj-y += gt9xx_update.o -obj-y += mtk_tpd.o -obj-y += tpd_button.o -obj-y += tpd_calibrate.o -obj-y += tpd_debug.o -obj-y += tpd_default.o -obj-y += tpd_init.o -obj-y += tpd_misc.o -obj-y += tpd_setting.o - diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/goodix_tool.c b/arch/arm/mach-mt8127/ttab/touchpanel/goodix_tool.c deleted file mode 100644 index d38808f13e7..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/goodix_tool.c +++ /dev/null @@ -1,620 +0,0 @@ -/* drivers/input/touchscreen/goodix_tool.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * V2.2 - * V1.0:2012/05/01,create file. - * V1.2:2012/10/17,reset_guitar etc. - * V1.4: 2013/06/08, new proc name - * V2.2:2014/01/14, compatible with Linux 3.10 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - * V2.2.7 - * Special edition for GT910 flashless - * 1. modified to support gesture wakeup module - */ - -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include - -#include "tpd_custom_gt9xx.h" -extern int gtp_autotool_setting; - -#pragma pack(1) -typedef struct -{ - u8 wr; //write read flag£¬0:R 1:W 2:PID 3: - u8 flag; //0:no need flag/int 1: need flag 2:need int - u8 flag_addr[2]; //flag address - u8 flag_val; //flag val - u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:< - u16 circle; //polling cycle - u8 times; //plling times - u8 retry; //I2C retry times - u16 delay; //delay befor read or after write - u16 data_len; //data length - u8 addr_len; //address length - u8 addr[2]; //address - u8 res[3]; //reserved - u8 *data; //data pointer -} st_cmd_head; -#pragma pack() -st_cmd_head cmd_head; - -#define UPDATE_FUNCTIONS -#define DATA_LENGTH_UINT 512 -#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*)) -static char procname[20] = {0}; -extern struct i2c_client *i2c_client_point; -static struct i2c_client *gt_client = NULL; - -#ifdef UPDATE_FUNCTIONS -extern s32 gup_enter_update_mode(struct i2c_client *client); -extern void gup_leave_update_mode(void); -extern s32 gup_update_proc(void *dir); -#endif - -static struct proc_dir_entry *goodix_proc_entry; - -static ssize_t goodix_tool_read(struct file *, char __user *, size_t, loff_t *); -static ssize_t goodix_tool_write(struct file *, const char __user *, size_t, loff_t *); -static const struct file_operations tool_ops = { - .owner = THIS_MODULE, - .read = goodix_tool_read, - .write = goodix_tool_write, -}; - -//static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data); -//static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data ); -static s32(*tool_i2c_read)(u8 *, u16); -static s32(*tool_i2c_write)(u8 *, u16); - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -s32 DATA_LENGTH = 0; -s8 IC_TYPE[16] = "GT9XX"; -static void tool_set_proc_name(char * procname) -{ - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - char date[20] = {0}; - char month[4] = {0}; - int i = 0, n_month = 1, n_day = 0, n_year = 0; - - sprintf(date, "%s", __DATE__); - - //GTP_DEBUG("compile date: %s", date); - - sscanf(date, "%s %d %d", month, &n_day, &n_year); - - for (i = 0; i < 12; ++i) - { - if (!memcmp(months[i], month, 3)) - { - n_month = i+1; - break; - } - } - - sprintf(procname, "gmnode"); - //sprintf(procname, "gmnode%04d%02d%02d", n_year, n_month, n_day); - //memset(procname, 0, 20); - //sprintf(procname, "goodix_tool"); - //GTP_DEBUG("procname = %s", procname); -} -static s32 tool_i2c_read_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_read(gt_client, buf, len + GTP_ADDR_LENGTH); - return ret; -} - -static s32 tool_i2c_write_no_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - - ret = gtp_i2c_write(gt_client, buf, len); - return ret; -} - -static s32 tool_i2c_read_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_read_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static s32 tool_i2c_write_with_extra(u8 *buf, u16 len) -{ - s32 ret = -1; - u8 pre[2] = {0x0f, 0xff}; - u8 end[2] = {0x80, 0x00}; - - tool_i2c_write_no_extra(pre, 2); - ret = tool_i2c_write_no_extra(buf, len); - tool_i2c_write_no_extra(end, 2); - - return ret; -} - -static void register_i2c_func(void) -{ -// if (!strncmp(IC_TYPE, "GT818", 5) || !strncmp(IC_TYPE, "GT816", 5) -// || !strncmp(IC_TYPE, "GT811", 5) || !strncmp(IC_TYPE, "GT818F", 6) -// || !strncmp(IC_TYPE, "GT827", 5) || !strncmp(IC_TYPE,"GT828", 5) -// || !strncmp(IC_TYPE, "GT813", 5)) - if (strncmp(IC_TYPE, "GT8110", 6) && strncmp(IC_TYPE, "GT8105", 6) - && strncmp(IC_TYPE, "GT801", 5) && strncmp(IC_TYPE, "GT800", 5) - && strncmp(IC_TYPE, "GT801PLUS", 9) && strncmp(IC_TYPE, "GT811", 5) - && strncmp(IC_TYPE, "GTxxx", 5) && strncmp(IC_TYPE, "GT9XX", 5)) - { - tool_i2c_read = tool_i2c_read_with_extra; - tool_i2c_write = tool_i2c_write_with_extra; - GTP_DEBUG("I2C function: with pre and end cmd!"); - } - else - { - tool_i2c_read = tool_i2c_read_no_extra; - tool_i2c_write = tool_i2c_write_no_extra; - GTP_INFO("I2C function: without pre and end cmd!"); - } -} - -static void unregister_i2c_func(void) -{ - tool_i2c_read = NULL; - tool_i2c_write = NULL; - GTP_INFO("I2C function: unregister i2c transfer function!"); -} - - -s32 init_wr_node(struct i2c_client *client) -{ - s32 i; - - gt_client = i2c_client_point; - - memset(&cmd_head, 0, sizeof(cmd_head)); - cmd_head.data = NULL; - - i = 5; - - while ((!cmd_head.data) && i) - { - cmd_head.data = kzalloc(i * DATA_LENGTH_UINT, GFP_KERNEL); - - if (NULL != cmd_head.data) - { - break; - } - - i--; - } - - if (i) - { - DATA_LENGTH = i * DATA_LENGTH_UINT + GTP_ADDR_LENGTH; - GTP_INFO("Applied memory size:%d.", DATA_LENGTH); - } - else - { - GTP_ERROR("Apply for memory failed."); - return FAIL; - } - - cmd_head.addr_len = 2; - cmd_head.retry = 5; - - register_i2c_func(); - - tool_set_proc_name(procname); - //goodix_proc_entry = create_proc_entry(procname, 0666, NULL); - goodix_proc_entry = proc_create(procname, 0666, NULL, &tool_ops); - if (goodix_proc_entry == NULL) - { - GTP_ERROR("Couldn't create proc entry!"); - return FAIL; - } - else - { - GTP_INFO("Create proc entry success!"); - //goodix_proc_entry->write_proc = goodix_tool_write; - //goodix_proc_entry->read_proc = goodix_tool_read; - } - - return SUCCESS; -} - -void uninit_wr_node(void) -{ - kfree(cmd_head.data); - cmd_head.data = NULL; - unregister_i2c_func(); - remove_proc_entry(procname, NULL); -} - -static u8 relation(u8 src, u8 dst, u8 rlt) -{ - u8 ret = 0; - - switch (rlt) - { - case 0: - ret = (src != dst) ? true : false; - break; - - case 1: - ret = (src == dst) ? true : false; - GTP_DEBUG("equal:src:0x%02x dst:0x%02x ret:%d.", src, dst, (s32)ret); - break; - - case 2: - ret = (src > dst) ? true : false; - break; - - case 3: - ret = (src < dst) ? true : false; - break; - - case 4: - ret = (src & dst) ? true : false; - break; - - case 5: - ret = (!(src | dst)) ? true : false; - break; - - default: - ret = false; - break; - } - - return ret; -} - -/******************************************************* -Function: - Comfirm function. -Input: - None. -Output: - Return write length. -********************************************************/ -static u8 comfirm(void) -{ - s32 i = 0; - u8 buf[32]; - -// memcpy(&buf[GTP_ADDR_LENGTH - cmd_head.addr_len], &cmd_head.flag_addr, cmd_head.addr_len); -// memcpy(buf, &cmd_head.flag_addr, cmd_head.addr_len);//Modified by Scott, 2012-02-17 - memcpy(buf, cmd_head.flag_addr, cmd_head.addr_len); - - for (i = 0; i < cmd_head.times; i++) - { - if (tool_i2c_read(buf, 1) <= 0) - { - GTP_ERROR("Read flag data failed!"); - return FAIL; - } - - if (true == relation(buf[GTP_ADDR_LENGTH], cmd_head.flag_val, cmd_head.flag_relation)) - { - GTP_DEBUG("value at flag addr:0x%02x.", buf[GTP_ADDR_LENGTH]); - GTP_DEBUG("flag value:0x%02x.", cmd_head.flag_val); - break; - } - - msleep(cmd_head.circle); - } - - if (i >= cmd_head.times) - { - GTP_ERROR("Didn't get the flag to continue!"); - return FAIL; - } - - return SUCCESS; -} - -/******************************************************* -Function: - Goodix tool write function. -Input: - standard proc write function param. -Output: - Return write length. -********************************************************/ -//static s32 goodix_tool_write(struct file *filp, const char __user *buff, unsigned long len, void *data) -ssize_t goodix_tool_write(struct file *filp, const char __user *buff, size_t len, loff_t *off) -{ - u64 ret = 0; - GTP_DEBUG_FUNC(); - GTP_DEBUG_ARRAY((u8 *)buff, len); - - ret = copy_from_user(&cmd_head, buff, CMD_HEAD_LENGTH); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - - GTP_DEBUG("[Operation]wr: %02X", cmd_head.wr); - GTP_DEBUG("[Flag]flag: %02X, addr: %02X%02X, value: %02X, relation: %02X", cmd_head.flag, cmd_head.flag_addr[0], - cmd_head.flag_addr[1], cmd_head.flag_val, cmd_head.flag_relation); - GTP_DEBUG("[Retry]circle: %d, times: %d, retry: %d, delay: %d", (s32)cmd_head.circle, (s32)cmd_head.times, - (s32)cmd_head.retry, (s32)cmd_head.delay); - GTP_DEBUG("[Data]data len: %d, addr len: %d, addr: %02X%02X, buffer len: %d, data[0]: %02X", (s32)cmd_head.data_len, - (s32)cmd_head.addr_len, cmd_head.addr[0], cmd_head.addr[1], (s32)len, buff[CMD_HEAD_LENGTH]); - - if (1 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - - memcpy(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG_ARRAY(cmd_head.data, cmd_head.data_len + cmd_head.addr_len); - GTP_DEBUG_ARRAY((u8 *)&buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[WRITE]Comfirm fail!"); - return -EPERM; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - if (tool_i2c_write(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], - cmd_head.data_len + cmd_head.addr_len) <= 0) - { - GTP_ERROR("[WRITE]Write data failed!"); - return -EPERM; - } - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH - cmd_head.addr_len], cmd_head.data_len + cmd_head.addr_len); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - } - else if (3 == cmd_head.wr) //Write ic type - { - gtp_autotool_setting = 1; - ret = copy_from_user(&cmd_head.data[0], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if(ret) - { - GTP_ERROR("copy_from_user failed."); - return -EPERM; - } - memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - register_i2c_func(); - } - else if (5 == cmd_head.wr) - { - //memcpy(IC_TYPE, cmd_head.data, cmd_head.data_len); - } - else if (7 == cmd_head.wr)//disable irq! - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - else if (9 == cmd_head.wr) //enable irq! - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - else if (17 == cmd_head.wr) - { - ret = copy_from_user(&cmd_head.data[GTP_ADDR_LENGTH], &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - - if (ret) - { - GTP_DEBUG("copy_from_user failed."); - return -EPERM; - } - - if (cmd_head.data[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("gtp enter rawdiff."); - gtp_rawdiff_mode = true; - } - else - { - gtp_rawdiff_mode = false; - GTP_DEBUG("gtp leave rawdiff."); - } - } -#ifdef UPDATE_FUNCTIONS - else if (11 == cmd_head.wr) //Enter update mode! - { - if (FAIL == gup_enter_update_mode(gt_client)) - { - return -EPERM; - } - } - else if (13 == cmd_head.wr)//Leave update mode! - { - gup_leave_update_mode(); - } - else if (15 == cmd_head.wr) //Update firmware! - { - show_len = 0; - total_len = 0; - memset(cmd_head.data, 0, cmd_head.data_len + 1); - memcpy(cmd_head.data, &buff[CMD_HEAD_LENGTH], cmd_head.data_len); - if (FAIL == gup_update_proc((void *)cmd_head.data)) - { - return -EPERM; - } - } - -#endif - - return len; -} - -/******************************************************* -Function: - Goodix tool read function. -Input: - standard proc read function param. -Output: - Return read length. -********************************************************/ -//static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data ) -ssize_t goodix_tool_read(struct file *file, char __user *page, size_t size, loff_t *ppos) -{ - s32 ret = 0; - - GTP_DEBUG_FUNC(); - - if (*ppos) // ADB call again - { - //GTP_DEBUG("[HEAD]wr: %d", cmd_head.wr); - //GTP_DEBUG("[PARAM]size: %d, *ppos: %d", size, (int)*ppos); - //GTP_DEBUG("[TOOL_READ]ADB call again, return it."); - return 0; - } - - if (cmd_head.wr % 2) - { - return -EPERM; - } - else if (!cmd_head.wr) - { - u16 len = 0; - s16 data_len = 0; - u16 loc = 0; - - if (1 == cmd_head.flag) - { - if (FAIL == comfirm()) - { - GTP_ERROR("[READ]Comfirm fail!"); - return -EPERM; - } - } - else if (2 == cmd_head.flag) - { - //Need interrupt! - } - - memcpy(cmd_head.data, cmd_head.addr, cmd_head.addr_len); - - GTP_DEBUG("[CMD HEAD DATA] ADDR:0x%02x%02x.", cmd_head.data[0], cmd_head.data[1]); - GTP_DEBUG("[CMD HEAD ADDR] ADDR:0x%02x%02x.", cmd_head.addr[0], cmd_head.addr[1]); - - if (cmd_head.delay) - { - msleep(cmd_head.delay); - } - - data_len = cmd_head.data_len; - - while (data_len > 0) - { - if (data_len > DATA_LENGTH) - { - len = DATA_LENGTH; - } - else - { - len = data_len; - } - - data_len -= len; - - if (tool_i2c_read(cmd_head.data, len) <= 0) - { - GTP_ERROR("[READ]Read data failed!"); - return -EPERM; - } - - //memcpy(&page[loc], &cmd_head.data[GTP_ADDR_LENGTH], len); - ret = simple_read_from_buffer(&page[loc], size, ppos, &cmd_head.data[GTP_ADDR_LENGTH], len); - if (ret < 0) - { - return ret; - } - loc += len; - - GTP_DEBUG_ARRAY(&cmd_head.data[GTP_ADDR_LENGTH], len); - GTP_DEBUG_ARRAY(page, len); - } - return cmd_head.data_len; - } - else if (2 == cmd_head.wr) - { - ret = simple_read_from_buffer(page, size, ppos, IC_TYPE, sizeof(IC_TYPE)); - return ret; - } - else if (4 == cmd_head.wr) - { - u8 progress_buf[4]; - progress_buf[0] = show_len >> 8; - progress_buf[1] = show_len & 0xff; - progress_buf[2] = total_len >> 8; - progress_buf[3] = total_len & 0xff; - - ret = simple_read_from_buffer(page, size, ppos, progress_buf, 4); - return ret; - } - else if (6 == cmd_head.wr) - { - //Read error code! - } - else if (8 == cmd_head.wr) //Read driver version - { - ret = simple_read_from_buffer(page, size, ppos, GTP_DRIVER_VERSION, strlen(GTP_DRIVER_VERSION)); - return ret; - } - - return -EPERM; -} diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_driver.c b/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_driver.c deleted file mode 100644 index 516e05fdb93..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_driver.c +++ /dev/null @@ -1,4058 +0,0 @@ -/* Copyright Statement: - * - * This software/firmware and related documentation ("MediaTek Software") are - * protected under relevant copyright laws. The information contained herein - * is confidential and proprietary to MediaTek Inc. and/or its licensors. - * Without the prior written permission of MediaTek inc. and/or its licensors, - * any reproduction, modification, use or disclosure of MediaTek Software, - * and information contained herein, in whole or in part, shall be strictly prohibited. - * - * MediaTek Inc. (C) 2012. All rights reserved. - * - * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES - * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") - * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON - * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE - * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR - * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH - * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES - * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES - * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK - * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR - * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND - * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, - * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, - * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO - * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. - * - * The following software/firmware and/or related documentation ("MediaTek Software") - * have been modified by MediaTek Inc. All revisions are subject to any receiver's - * applicable license agreements with MediaTek Inc. - */ - -/* - * Version: V2.0 - * Release Date: 2013/08/28 - * Contact: andrew@goodix.com, meta@goodix.com - * Revision Record: - * V1.4: - * 1. New Heartbeat/ESD-protect Mechanism(external watchdog) - * 2. doze mode, sliding wakeup - * 3. config length verification & 3 more config groups(GT9 Sensor_ID: 0 ~ 5) - * 4. charger status switch - * By Meta, 2013/03/11 - * V1.6: - * 1. pen/stylus support - * 2. slide wakeup, new esd optimization - * By Meta, 2013/04/18 - * V1.8: - * 1. read double check & fixed config support - * 2. other optimizations - * By Meta, 2013/06/08 - * V2.0: - * 1. compatible with GT9XXF - * 2. I2C DMA support - * By Meta, 2013/08/28 - * V2.2: - * 1. update gt9xx_config to compatible with Linux 3.10 - * 2. gesture wakeup - * 3. pen separate input device, active-pen button support - * 4. coordinates & keys optimization - * 5. no longer support GT915S - * By Meta, 2014/01/14 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - * V2.2.7 - * Special edition for GT910 flashless - * 1. modified to support gesture wakeup module - */ - -#include "tpd.h" -#include "tpd_custom_gt9xx.h" -#include - -#ifndef TPD_NO_GPIO -#include "cust_gpio_usage.h" -#endif -#ifdef TPD_PROXIMITY -#include -#include -#include -#endif - -#if GTP_SUPPORT_I2C_DMA - #include -#endif - -extern int gesture_value; -extern char tpd_firmware_version_val[5]; -extern int tpd_config_version; -extern int tpd_x_line; -extern int tpd_y_line; -extern u8 tpd_sensor_id; - -int gtp_autotool_setting; -EXPORT_SYMBOL(gtp_autotool_setting); -extern struct tpd_device *tpd; - -static int tpd_sleep_flag = 0; -static int tpd_flag = 0; -int tpd_halt = 0; -static struct task_struct *thread = NULL; -static DECLARE_WAIT_QUEUE_HEAD(waiter); - -#ifdef TPD_HAVE_BUTTON -static int tpd_keys_local[TPD_KEY_COUNT] = TPD_KEYS; -static int tpd_keys_dim_local[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -#endif - -typedef enum -{ - DOZE_DISABLED = 0, - DOZE_ENABLED = 1, - DOZE_WAKEUP = 2, -}DOZE_T; -static DOZE_T doze_status = DOZE_DISABLED; -static s8 gtp_enter_doze(struct i2c_client *client); - -#if GTP_CHARGER_SWITCH - #ifdef MT6573 - #define CHR_CON0 (0xF7000000+0x2FA00) - #else - extern kal_bool upmu_is_chr_det(void); - #endif - static void gtp_charger_switch(s32 dir_update); -#endif - -#if GTP_HAVE_TOUCH_KEY -const u16 touch_key_array[] = GTP_KEY_TAB; -#define GTP_MAX_KEY_NUM ( sizeof( touch_key_array )/sizeof( touch_key_array[0] ) ) -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -static int tpd_wb_start_local[TPD_WARP_CNT] = TPD_WARP_START; -static int tpd_wb_end_local[TPD_WARP_CNT] = TPD_WARP_END; -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -//static int tpd_calmat_local[8] = TPD_CALIBRATION_MATRIX; -static int tpd_def_calmat_local[8] = TPD_CALIBRATION_MATRIX; -#endif - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len); -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len); - -static u8 *gpDMABuf_va = NULL; -static u32 gpDMABuf_pa = 0; -#endif - -s32 gtp_send_cfg(struct i2c_client *client); -void gtp_reset_guitar(struct i2c_client *client, s32 ms); -static void tpd_eint_interrupt_handler(void); -static int touch_event_handler(void *unused); -static int tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id); -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info); -static int tpd_i2c_remove(struct i2c_client *client); -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); - -#if GTP_CREATE_WR_NODE -extern s32 init_wr_node(struct i2c_client *); -extern void uninit_wr_node(void); -#endif - -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -static s32 force_reset_guitar(s32); -#endif - -#if GTP_ESD_PROTECT -static int clk_tick_cnt = 200; -u8 esd_running = 0; -spinlock_t esd_lock; -extern unsigned char gtp_default_FW_fl[]; -static struct delayed_work gtp_esd_check_work; -static struct workqueue_struct *gtp_esd_check_workqueue = NULL; -static s32 gtp_init_ext_watchdog(struct i2c_client *client); -static void gtp_esd_check_func(struct work_struct *); -void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#ifdef TPD_PROXIMITY -#define TPD_PROXIMITY_VALID_REG 0x814E -#define TPD_PROXIMITY_ENABLE_REG 0x8042 -static u8 tpd_proximity_flag = 0; -static u8 tpd_proximity_detect = 1;//0-->close ; 1--> far away -#endif - -struct i2c_client *i2c_client_point = NULL; -static const struct i2c_device_id tpd_i2c_id[] = {{"gt9xx", 0}, {}}; -static unsigned short force[] = {0, 0xBA, I2C_CLIENT_END, I2C_CLIENT_END}; -static const unsigned short *const forces[] = { force, NULL }; -//static struct i2c_client_address_data addr_data = { .forces = forces,}; -static struct i2c_board_info __initdata i2c_tpd = { I2C_BOARD_INFO("gt9xx", (0xBA >> 1))}; -static struct i2c_driver tpd_i2c_driver = -{ - .probe = tpd_i2c_probe, - .remove = tpd_i2c_remove, - .detect = tpd_i2c_detect, - .driver.name = "gt9xx", - .id_table = tpd_i2c_id, - .address_list = (const unsigned short *) forces, -}; - -static u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH] - = {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff}; - -#pragma pack(1) -typedef struct -{ - u16 pid; //product id // - u16 vid; //version id // -} st_tpd_info; -#pragma pack() - -st_tpd_info tpd_info; -u8 int_type = 0; -u32 abs_x_max = 0; -u32 abs_y_max = 0; -u8 gtp_rawdiff_mode = 0; -u8 cfg_len = 0; -u8 grp_cfg_version = 0; -u8 fixed_config = 0; -u8 pnl_init_error = 0; - -#if GTP_WITH_PEN -struct input_dev *pen_dev; -#endif - -#if GTP_COMPATIBLE_MODE -u8 driver_num = 0; -u8 sensor_num = 0; -/*[PLATFORM]-Add-BEGIN by falin.luo@tcl.com 2015/4/29*/ -/*change counter data type to u16, because GTP_CHK_FS_MNT_MAX is 300 */ -u16 gtp_ref_retries = 0; -u16 gtp_clk_retries = 0; -/*[PLATFORM]-Add-NED by falin.luo@tcl.com 2015/4/29*/ -CHIP_TYPE_T gtp_chip_type = CHIP_TYPE_GT9; -u8 rqst_processing = 0; -u8 is_950 = 0; -u8 after_912_1020 = 0; - - -//add by caoyang for ·À¶¶ -//static struct timer_list buttons_timer; -//static DECLARE_WAIT_QUEUE_HEAD(button_waitq); -//end - -extern u8 gup_check_fs_mounted(char *path_name); -extern u8 gup_clk_calibration(void); -extern int gup_reload_fw_dsp(void *dir, u8 dwn_mode); -extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode); -void gtp_get_chip_type(struct i2c_client *client); -u8 gtp_fw_startup(struct i2c_client *client); -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode); -static u8 gtp_main_clk_proc(struct i2c_client *client); -static void gtp_recovery_reset(struct i2c_client *client); - -#if GTP_COMPATIBLE_MODE -u8 gtp_hopping_buf[16] = {0}; -#endif - -#if GTP_FL_LITTLE_SYSTEM -u8 power_is_down = 0; -u8 little_fw_mode = 0; -u8 fw_block = 0; // 0: not started, 1 ~ 11/12 ss51 seg a/b each 2K, 13: ss51 seg b, 10K/12K -u8 block_section = 1; // 1 ~ 8, 2K total, 256 Bytes each - -char symbolic_state1[][20] = {"OTHERS", "BUFFER_FULL", "CHECK_COMPLETE", "CHECK_ERROR", "WAIT_CHECK", "OTHERS", "OTHERS", "OTHERS"}; -char symbolic_state2[][20] = {"OTHERS", "IS_A_SEG", "IS_B_SEG_FIRST", "IS_B_SEG_OTHER", "IS_B_SEG_LAST", "OTHERS", "OTHERS", "OTHERS"}; - -static void tpd_up(s32 x, s32 y, s32 id); -extern u8 gup_burn_ss51_block(struct i2c_client *client, s32 block_section, s32 fw_block, u16 *fw_chksum); -extern u8 gup_burn_ss51_seg_b(struct i2c_client *client, s32 size, u16 *fw_chksum); -#endif - -#endif - -/* proc file system */ -s32 i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -s32 i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); - -static ssize_t gt91xx_config_read_proc(struct file *, char __user *, size_t, loff_t *); -static ssize_t gt91xx_config_write_proc(struct file *, const char __user *, size_t, loff_t *); - -static struct proc_dir_entry *gt91xx_config_proc = NULL; -static const struct file_operations config_proc_ops = { - .owner = THIS_MODULE, - .read = gt91xx_config_read_proc, - .write = gt91xx_config_write_proc, -}; - -#define VELOCITY_CUSTOM -#ifdef VELOCITY_CUSTOM -#include -#include -#include - -#ifndef TPD_VELOCITY_CUSTOM_X -#define TPD_VELOCITY_CUSTOM_X 10 -#endif -#ifndef TPD_VELOCITY_CUSTOM_Y -#define TPD_VELOCITY_CUSTOM_Y 10 -#endif - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) - -int g_v_magnify_x = TPD_VELOCITY_CUSTOM_X; -int g_v_magnify_y = TPD_VELOCITY_CUSTOM_Y; -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &g_v_magnify_x, sizeof(g_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &g_v_magnify_y, sizeof(g_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "gt9xx_touch", - .fops = &tpd_fops, -}; - -//********************************************** -#endif - -static int tpd_i2c_detect(struct i2c_client *client, struct i2c_board_info *info) -{ - strcpy(info->type, "mtk-tpd"); - return 0; -} - -#ifdef TPD_PROXIMITY -static s32 tpd_get_ps_value(void) -{ - return tpd_proximity_detect; -} - -static s32 tpd_enable_ps(s32 enable) -{ - u8 state; - s32 ret = -1; - - if (enable) - { - state = 1; - tpd_proximity_flag = 1; - GTP_INFO("TPD proximity function to be on."); - } - else - { - state = 0; - tpd_proximity_flag = 0; - GTP_INFO("TPD proximity function to be off."); - } - - ret = i2c_write_bytes(i2c_client_point, TPD_PROXIMITY_ENABLE_REG, &state, 1); - - if (ret < 0) - { - GTP_ERROR("TPD %s proximity cmd failed.", state ? "enable" : "disable"); - return ret; - } - - GTP_INFO("TPD proximity function %s success.", state ? "enable" : "disable"); - return 0; -} - -s32 tpd_ps_operate(void *self, u32 command, void *buff_in, s32 size_in, - void *buff_out, s32 size_out, s32 *actualout) -{ - s32 err = 0; - s32 value; - hwm_sensor_data *sensor_data; - - switch (command) - { - case SENSOR_DELAY: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Set delay parameter error!"); - err = -EINVAL; - } - - // Do nothing - break; - - case SENSOR_ENABLE: - if ((buff_in == NULL) || (size_in < sizeof(int))) - { - GTP_ERROR("Enable sensor parameter error!"); - err = -EINVAL; - } - else - { - value = *(int *)buff_in; - err = tpd_enable_ps(value); - } - - break; - - case SENSOR_GET_DATA: - if ((buff_out == NULL) || (size_out < sizeof(hwm_sensor_data))) - { - GTP_ERROR("Get sensor data parameter error!"); - err = -EINVAL; - } - else - { - sensor_data = (hwm_sensor_data *)buff_out; - sensor_data->values[0] = tpd_get_ps_value(); - sensor_data->value_divide = 1; - sensor_data->status = SENSOR_STATUS_ACCURACY_MEDIUM; - } - - break; - - default: - GTP_ERROR("proxmy sensor operate function no this parameter %d!\n", command); - err = -1; - break; - } - - return err; -} -#endif - - -static ssize_t gt91xx_config_read_proc(struct file *file, char __user *page, size_t size, loff_t *ppos) -{ - char *ptr = page; - char temp_data[GTP_CONFIG_MAX_LENGTH + 2] = {0}; - int i; - - if (*ppos) // CMD call again - { - return 0; - } - - ptr += sprintf(ptr, "==== GT9XX config init value====\n"); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", config[i + 2]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - - ptr += sprintf(ptr, "\n"); - - ptr += sprintf(ptr, "==== GT9XX config real value====\n"); - i2c_read_bytes(i2c_client_point, GTP_REG_CONFIG_DATA, temp_data, GTP_CONFIG_MAX_LENGTH); - - for (i = 0 ; i < GTP_CONFIG_MAX_LENGTH ; i++) - { - ptr += sprintf(ptr, "0x%02X ", temp_data[i]); - - if (i % 8 == 7) - ptr += sprintf(ptr, "\n"); - } - *ppos += ptr - page; - return (ptr - page); -} - -static ssize_t gt91xx_config_write_proc(struct file *filp, const char __user *buffer, size_t count, loff_t *off) -{ - s32 ret = 0; - - GTP_DEBUG("write count %d\n", count); - - if (count > GTP_CONFIG_MAX_LENGTH) - { - GTP_ERROR("size not match [%d:%d]\n", GTP_CONFIG_MAX_LENGTH, count); - return -EFAULT; - } - - if (copy_from_user(&config[2], buffer, count)) - { - GTP_ERROR("copy from user fail\n"); - return -EFAULT; - } - - ret = gtp_send_cfg(i2c_client_point); - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - - if (ret < 0) - { - GTP_ERROR("send config failed."); - } - - return count; -} - -#if GTP_SUPPORT_I2C_DMA -s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 buffer[2]; - - struct i2c_msg msg[2] = - { - { - .addr = (client->addr & I2C_MASK_FLAG), - .flags = 0, - .buf = buffer, - .len = 2, - .timing = I2C_MASTER_CLOCK - }, - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = I2C_M_RD, - .buf = (u8*)gpDMABuf_pa, - .len = len, - .timing = I2C_MASTER_CLOCK - }, - }; - - buffer[0] = (addr >> 8) & 0xFF; - buffer[1] = addr & 0xFF; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c read: 0x%04X, %d bytes(s)", addr, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg[0], 2); - if (ret < 0) - { - continue; - } - memcpy(rxbuf, gpDMABuf_va, len); - return 0; - } - GTP_ERROR("Dma I2C Read Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - - -s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - int ret; - s32 retry = 0; - u8 *wr_buf = gpDMABuf_va; - - struct i2c_msg msg = - { - .addr = (client->addr & I2C_MASK_FLAG), - .ext_flag = (client->ext_flag | I2C_ENEXT_FLAG | I2C_DMA_FLAG), - .flags = 0, - .buf = (u8*)gpDMABuf_pa, - .len = 2 + len, - .timing = I2C_MASTER_CLOCK - }; - - wr_buf[0] = (u8)((addr >> 8) & 0xFF); - wr_buf[1] = (u8)(addr & 0xFF); - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("dma i2c write: 0x%04X, %d bytes(s)", addr, len); - memcpy(wr_buf+2, txbuf, len); - for (retry = 0; retry < 5; ++retry) - { - ret = i2c_transfer(client->adapter, &msg, 1); - if (ret < 0) - { - continue; - } - return 0; - } - GTP_ERROR("Dma I2C Write Error: 0x%04X, %d byte(s), err-code: %d", addr, len, ret); - return ret; -} - -s32 i2c_read_bytes_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len) -{ - s32 left = len; - s32 read_len = 0; - u8 *rd_buf = rxbuf; - s32 ret = 0; - - //GTP_DEBUG("Read bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_TRANSACTION_LENGTH) - { - read_len = GTP_DMA_MAX_TRANSACTION_LENGTH; - } - else - { - read_len = left; - } - ret = i2c_dma_read(client, addr, rd_buf, read_len); - if (ret < 0) - { - GTP_ERROR("dma read failed"); - return -1; - } - - left -= read_len; - addr += read_len; - rd_buf += read_len; - } - return 0; -} - -s32 i2c_write_bytes_dma(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len) -{ - - s32 ret = 0; - s32 write_len = 0; - s32 left = len; - u8 *wr_buf = txbuf; - - //GTP_DEBUG("Write bytes dma: 0x%04X, %d byte(s)", addr, len); - while (left > 0) - { - if (left > GTP_DMA_MAX_I2C_TRANSFER_SIZE) - { - write_len = GTP_DMA_MAX_I2C_TRANSFER_SIZE; - } - else - { - write_len = left; - } - ret = i2c_dma_write(client, addr, wr_buf, write_len); - - if (ret < 0) - { - GTP_ERROR("dma i2c write failed!"); - return -1; - } - - left -= write_len; - addr += write_len; - wr_buf += write_len; - } - return 0; -} -#endif - - -int i2c_read_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buffer[GTP_ADDR_LENGTH]; - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg[2] = - { - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .len = GTP_ADDR_LENGTH, - .timing = I2C_MASTER_CLOCK - }, - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }, - }; - - if (rxbuf == NULL) - return -1; - - //GTP_DEBUG("i2c_read_bytes to device %02X address %04X len %d\n", client->addr, addr, len); - - while (left > 0) - { - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - msg[1].buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg[1].len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg[1].len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg[0], 2) != 2) - { - retry++; - - //if (retry == 20) - if (retry == 5) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", addr + offset, len); - return -1; - } - } - } - - return 0; -} - - -int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_read_bytes_dma(client, addr, rxbuf, len); -#else - return i2c_read_bytes_non_dma(client, addr, rxbuf, len); -#endif -} - -s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - return ret; - } - //#endif - } - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - if (little_fw_mode) - { - // do nothing - GTP_INFO("Little fw enabled, no esd reset."); - } - else - #endif - { - gtp_recovery_reset(client); - } - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - -s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len) -{ - u8 buf[16] = {0}; - u8 confirm_buf[16] = {0}; - u8 retry = 0; - - while (retry++ < 3) - { - memset(buf, 0xAA, 16); - buf[0] = (u8)(addr >> 8); - buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, buf, len + 2); - - memset(confirm_buf, 0xAB, 16); - confirm_buf[0] = (u8)(addr >> 8); - confirm_buf[1] = (u8)(addr & 0xFF); - gtp_i2c_read(client, confirm_buf, len + 2); - - if (!memcmp(buf, confirm_buf, len+2)) - { - memcpy(rxbuf, confirm_buf+2, len); - return SUCCESS; - } - } - GTP_ERROR("i2c read 0x%04X, %d bytes, double check failed!", addr, len); - return FAIL; -} - -int i2c_write_bytes_non_dma(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ - u8 buffer[MAX_TRANSACTION_LENGTH]; - u16 left = len; - u16 offset = 0; - u8 retry = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = 0, - .buf = buffer, - .timing = I2C_MASTER_CLOCK, - }; - - - if (txbuf == NULL) - return -1; - - //GTP_DEBUG("i2c_write_bytes to device %02X address %04X len %d\n", client->addr, addr, len); - - while (left > 0) - { - retry = 0; - - buffer[0] = ((addr + offset) >> 8) & 0xFF; - buffer[1] = (addr + offset) & 0xFF; - - if (left > MAX_I2C_TRANSFER_SIZE) - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], MAX_I2C_TRANSFER_SIZE); - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_I2C_TRANSFER_SIZE; - offset += MAX_I2C_TRANSFER_SIZE; - } - else - { - memcpy(&buffer[GTP_ADDR_LENGTH], &txbuf[offset], left); - msg.len = left + GTP_ADDR_LENGTH; - left = 0; - } - - //GTP_DEBUG("byte left %d offset %d\n", left, offset); - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - //if (retry == 20) - if (retry == 5) - { - //dump_stack(); - GTP_ERROR("I2C write 0x%X%X length=%d failed\n", buffer[0], buffer[1], len); - return -1; - } - } - } - - return 0; -} - -int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len) -{ -#if GTP_SUPPORT_I2C_DMA - return i2c_write_bytes_dma(client, addr, txbuf, len); -#else - return i2c_write_bytes_non_dma(client, addr, txbuf, len); -#endif -} - -s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes_non_dma(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - return ret; - } - //#endif - } - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - if (little_fw_mode) - { - // do nothing - GTP_INFO("Little fw enabled, no esd reset."); - } - else - #endif - { - gtp_recovery_reset(client); - } - } - else - #endif - { - gtp_reset_guitar(client, 20); - } - return ret; - } -} - - - -/******************************************************* -Function: - Send config Function. - -Input: - client: i2c client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -s32 gtp_send_cfg(struct i2c_client *client) -{ - s32 ret = 1; - -#if GTP_DRIVER_SEND_CFG - s32 retry = 0; - if (fixed_config) - { - GTP_INFO("Ic fixed config, no config sent!"); - return 0; - } - else if (pnl_init_error) - { - GTP_INFO("Error occurred in init_panel, no config sent!"); - return 0; - } - - GTP_INFO("Driver Send Config"); - for (retry = 0; retry < 5; retry++) - { - ret = gtp_i2c_write(client, config, GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH); - - if (ret > 0) - { - break; - } - } -#endif - return ret; -} - - -/******************************************************* -Function: - Read goodix touchscreen version function. - -Input: - client: i2c client struct. - version:address to store version info - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -s32 gtp_read_version(struct i2c_client *client, u16 *version) -{ - s32 ret = -1; - s32 i; - u8 buf[8] = {GTP_REG_VERSION >> 8, GTP_REG_VERSION & 0xff}; - - GTP_DEBUG_FUNC(); - - ret = gtp_i2c_read(client, buf, sizeof(buf)); - - if (ret < 0) - { - GTP_ERROR("GTP read version failed"); - return ret; - } - - if (version) - { - *version = (buf[7] << 8) | buf[6]; - } - - tpd_info.vid = *version; - tpd_info.pid = 0x00; - - for (i = 0; i < 4; i++) - { - if (buf[i + 2] < 0x30)break; - - tpd_info.pid |= ((buf[i + 2] - 0x30) << ((3 - i) * 4)); - } - - if (buf[5] == 0x00) - { - GTP_INFO("IC VERSION: %c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[7], buf[6]); - } - else - { - GTP_INFO("IC VERSION:%c%c%c%c_%02x%02x", - buf[2], buf[3], buf[4], buf[5], buf[7], buf[6]); - } - sprintf(tpd_firmware_version_val,"%02x%02x",buf[7], buf[6]); - tpd_firmware_version_val[4] = '\0'; - printk(KERN_ERR"caoyang test tpd_firmware_version_val:%s",tpd_firmware_version_val); - return ret; -} - -#if GTP_DRIVER_SEND_CFG -/******************************************************* -Function: - Get information from ic, such as resolution and - int trigger type -Input: - client: i2c client private struct. - -Output: - FAIL: i2c failed, SUCCESS: i2c ok -*******************************************************/ -static s32 gtp_get_info(struct i2c_client *client) -{ - u8 opr_buf[6] = {0}; - s32 ret = 0; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+1) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+1) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 6); - if (ret < 0) - { - return FAIL; - } - - abs_x_max = (opr_buf[3] << 8) + opr_buf[2]; - abs_y_max = (opr_buf[5] << 8) + opr_buf[4]; - - opr_buf[0] = (u8)((GTP_REG_CONFIG_DATA+6) >> 8); - opr_buf[1] = (u8)((GTP_REG_CONFIG_DATA+6) & 0xFF); - - ret = gtp_i2c_read(client, opr_buf, 3); - if (ret < 0) - { - return FAIL; - } - int_type = opr_buf[2] & 0x03; - - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max, int_type); - - return SUCCESS; -} -#endif - - -/******************************************************* -Function: - GTP initialize function. - -Input: - client: i2c client private struct. - -Output: - Executive outcomes.0---succeed. -*******************************************************/ -static s32 gtp_init_panel(struct i2c_client *client) -{ - s32 ret = 0; - -#if GTP_DRIVER_SEND_CFG - s32 i; - u8 check_sum = 0; - u8 opr_buf[16]; - u8 sensor_id = 0; - - u8 cfg_info_group1[] = CTP_CFG_GROUP1; - u8 cfg_info_group2[] = CTP_CFG_GROUP2; - u8 cfg_info_group3[] = CTP_CFG_GROUP3; - u8 cfg_info_group4[] = CTP_CFG_GROUP4; - u8 cfg_info_group5[] = CTP_CFG_GROUP5; - u8 cfg_info_group6[] = CTP_CFG_GROUP6; - u8 *send_cfg_buf[] = {cfg_info_group1, cfg_info_group2, cfg_info_group3, - cfg_info_group4, cfg_info_group5, cfg_info_group6}; - u8 cfg_info_len[] = { CFG_GROUP_LEN(cfg_info_group1), - CFG_GROUP_LEN(cfg_info_group2), - CFG_GROUP_LEN(cfg_info_group3), - CFG_GROUP_LEN(cfg_info_group4), - CFG_GROUP_LEN(cfg_info_group5), - CFG_GROUP_LEN(cfg_info_group6)}; - - GTP_DEBUG("Config Groups\' Lengths: %d, %d, %d, %d, %d, %d", - cfg_info_len[0], cfg_info_len[1], cfg_info_len[2], cfg_info_len[3], - cfg_info_len[4], cfg_info_len[5]); - - if ((!cfg_info_len[1]) && (!cfg_info_len[2]) && - (!cfg_info_len[3]) && (!cfg_info_len[4]) && - (!cfg_info_len[5])) - { - sensor_id = 0; - } - else - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - msleep(50); - } - #endif - ret = gtp_i2c_read_dbl_check(client, GTP_REG_SENSOR_ID, &sensor_id, 1); - if (SUCCESS == ret) - { - if (sensor_id >= 0x06) - { - GTP_ERROR("Invalid sensor_id(0x%02X), No Config Sent!", sensor_id); - pnl_init_error = 1; - return -1; - } - } - else - { - GTP_ERROR("Failed to get sensor_id, No config sent!"); - pnl_init_error = 1; - return -1; - } - GTP_INFO("Sensor_ID: %d", sensor_id); - } - - cfg_len = cfg_info_len[sensor_id]; - tpd_config_version= send_cfg_buf[sensor_id][0]; - tpd_sensor_id = sensor_id; - GTP_INFO("CTP_CONFIG_GROUP%d used, config length: %d", sensor_id + 1, cfg_len); - - if (cfg_len < GTP_CONFIG_MIN_LENGTH) - { - GTP_ERROR("CTP_CONFIG_GROUP%d is INVALID CONFIG GROUP! NO Config Sent! You need to check you header file CFG_GROUP section!", sensor_id+1); - pnl_init_error = 1; - return -1; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - fixed_config = 0; - } - else -#endif - { - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CONFIG_DATA, &opr_buf[0], 1); - - if (ret == SUCCESS) - { - GTP_DEBUG("CFG_CONFIG_GROUP%d Config Version: %d, 0x%02X; IC Config Version: %d, 0x%02X", sensor_id+1, - send_cfg_buf[sensor_id][0], send_cfg_buf[sensor_id][0], opr_buf[0], opr_buf[0]); - - if (opr_buf[0] < 90) - { - grp_cfg_version = send_cfg_buf[sensor_id][0]; // backup group config version - send_cfg_buf[sensor_id][0] = 0x00; - fixed_config = 0; - } - else // treated as fixed config, not send config - { - GTP_INFO("Ic fixed config with config version(%d)", opr_buf[0]); - fixed_config = 1; - gtp_get_info(client); - return 0; - } - } - else - { - GTP_ERROR("Failed to get ic config version!No config sent!"); - return -1; - } - } - - memset(&config[GTP_ADDR_LENGTH], 0, GTP_CONFIG_MAX_LENGTH); - memcpy(&config[GTP_ADDR_LENGTH], send_cfg_buf[sensor_id], cfg_len); - -#if GTP_CUSTOM_CFG - config[RESOLUTION_LOC] = (u8)GTP_MAX_WIDTH; - config[RESOLUTION_LOC + 1] = (u8)(GTP_MAX_WIDTH>>8); - config[RESOLUTION_LOC + 2] = (u8)GTP_MAX_HEIGHT; - config[RESOLUTION_LOC + 3] = (u8)(GTP_MAX_HEIGHT>>8); - - if (GTP_INT_TRIGGER == 0) //RISING - { - config[TRIGGER_LOC] &= 0xfe; - } - else if (GTP_INT_TRIGGER == 1) //FALLING - { - config[TRIGGER_LOC] |= 0x01; - } -#endif // GTP_CUSTOM_CFG - - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - -#else // DRIVER NOT SEND CONFIG - cfg_len = GTP_CONFIG_MAX_LENGTH; - ret = gtp_i2c_read(client, config, cfg_len + GTP_ADDR_LENGTH); - if (ret < 0) - { - GTP_ERROR("Read Config Failed, Using DEFAULT Resolution & INT Trigger!"); - abs_x_max = GTP_MAX_WIDTH; - abs_y_max = GTP_MAX_HEIGHT; - int_type = GTP_INT_TRIGGER; - } -#endif // GTP_DRIVER_SEND_CFG - - GTP_DEBUG_FUNC(); - if ((abs_x_max == 0) && (abs_y_max == 0)) - { - abs_x_max = (config[RESOLUTION_LOC + 1] << 8) + config[RESOLUTION_LOC]; - abs_y_max = (config[RESOLUTION_LOC + 3] << 8) + config[RESOLUTION_LOC + 2]; - int_type = (config[TRIGGER_LOC]) & 0x03; - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 have_key = 0; - if (is_950) - { - driver_num = config[GTP_REG_MATRIX_DRVNUM - GTP_REG_CONFIG_DATA + 2]; - sensor_num = config[GTP_REG_MATRIX_SENNUM - GTP_REG_CONFIG_DATA + 2]; - } - else - { - driver_num = (config[CFG_LOC_DRVA_NUM]&0x1F) + (config[CFG_LOC_DRVB_NUM]&0x1F); - sensor_num = (config[CFG_LOC_SENS_NUM]&0x0F) + ((config[CFG_LOC_SENS_NUM]>>4)&0x0F); - } - - have_key = config[GTP_REG_HAVE_KEY - GTP_REG_CONFIG_DATA + 2] & 0x01; // have key or not - if (1 == have_key) - { - driver_num--; - } - - if ((cfg_len == 186) && after_912_1020) - { - GTP_DEBUG("Firmware after 912_1020, set config length to 228."); - - cfg_len = 228; - - config[GTP_ADDR_LENGTH + 226] = config[GTP_ADDR_LENGTH + 184]; - - memset(&config[GTP_ADDR_LENGTH + 184], 0x00, 228 - 186); - - config[GTP_ADDR_LENGTH + 227] = 0x01; - - } - tpd_x_line = driver_num; - tpd_y_line = sensor_num; - GTP_INFO("Driver * Sensor: %d * %d(Key: %d), X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - driver_num, sensor_num, have_key, abs_x_max,abs_y_max,int_type); - } - else -#endif - { - #if GTP_DRIVER_SEND_CFG - ret = gtp_send_cfg(client); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - // set config version to CTP_CFG_GROUP - // for resume to send config - config[GTP_ADDR_LENGTH] = grp_cfg_version; - check_sum = 0; - for (i = GTP_ADDR_LENGTH; i < cfg_len; i++) - { - check_sum += config[i]; - } - config[cfg_len] = (~check_sum) + 1; - #endif - GTP_INFO("X_MAX = %d, Y_MAX = %d, TRIGGER = 0x%02x", - abs_x_max,abs_y_max,int_type); - } - - msleep(10); - return 0; -} - -static s8 gtp_i2c_test(struct i2c_client *client) -{ - - u8 retry = 0; - s8 ret = -1; - u32 hw_info = 0; - - GTP_DEBUG_FUNC(); - - while (retry++ < 5) - { - ret = i2c_read_bytes(client, GTP_REG_HW_INFO, (u8 *)&hw_info, sizeof(hw_info)); - - if ((!ret) && (hw_info == 0x00900600)) //20121212 - { - return ret; - } - - GTP_ERROR("GTP_REG_HW_INFO : %08X", hw_info); - GTP_ERROR("GTP i2c test failed time %d.", retry); - msleep(10); - } - - return -1; -} - - - -/******************************************************* -Function: - Set INT pin as input for FW sync. - -Note: - If the INT is high, It means there is pull up resistor attached on the INT pin. - Pull low the INT pin manaully for FW sync. -*******************************************************/ -void gtp_int_sync(s32 ms) -{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(ms); - GTP_GPIO_AS_INT(GTP_INT_PORT); -} - -void gtp_reset_guitar(struct i2c_client *client, s32 ms) -{ - GTP_INFO("GTP RESET!\n"); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(ms); - GTP_GPIO_OUTPUT(GTP_INT_PORT, client->addr == 0x14); - - msleep(2); - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(6); //must >= 6ms - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return; - } -#endif - - gtp_int_sync(50); -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); -#endif -} - -static int tpd_power_on(struct i2c_client *client) -{ - int ret = 0; - int reset_count = 0; - -reset_proc: - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - -#ifdef MT6573 - // power on CTP - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ONE); - -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - #ifdef TPD_POWER_SOURCE_1800 - hwPowerOn(TPD_POWER_SOURCE_1800, VOL_1800, "TP"); - #endif - -#endif - - gtp_reset_guitar(client, 20); - -#if GTP_COMPATIBLE_MODE - gtp_get_chip_type(client); - - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - ret = gup_fw_download_proc(NULL, GTP_FL_FW_BURN); - - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Download fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return -1; - } - } - - ret = gtp_fw_startup(client); - if(FAIL == ret) - { - GTP_ERROR("[tpd_power_on]Startup fw failed."); - if(reset_count++ < TPD_MAX_RESET_COUNT) - { - goto reset_proc; - } - else - { - return -1; - } - } - } - else -#endif - { - ret = gtp_i2c_test(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - - if (reset_count < TPD_MAX_RESET_COUNT) - { - reset_count++; - goto reset_proc; - } - } - } - return ret; -} - -//**************** For GT9XXF Start ********************// -#if GTP_COMPATIBLE_MODE - - -void gtp_get_chip_type(struct i2c_client *client) -{ - u8 opr_buf[10] = {0x00}; - s32 ret = 0; - - msleep(10); - - ret = gtp_i2c_read_dbl_check(client, GTP_REG_CHIP_TYPE, opr_buf, 10); - - if (FAIL == ret) - { - GTP_ERROR("Failed to get chip-type, set chip type default: GOODIX_GT9"); - gtp_chip_type = CHIP_TYPE_GT9; - return; - } - - if (!memcmp(opr_buf, "GOODIX_GT9", 10)) - { - gtp_chip_type = CHIP_TYPE_GT9; - } - else // GT9XXF - { - gtp_chip_type = CHIP_TYPE_GT9F; - } - GTP_INFO("Chip Type: %s", (gtp_chip_type == CHIP_TYPE_GT9) ? "GOODIX_GT9" : "GOODIX_GT9F"); -} - -static u8 gtp_bak_ref_proc(struct i2c_client *client, u8 mode) -{ - s32 i = 0; - s32 j = 0; - s32 ret = 0; - struct file *flp = NULL; - u8 *refp = NULL; - u32 ref_len = 0; - u32 ref_seg_len = 0; - s32 ref_grps = 0; - s32 ref_chksum = 0; - u16 tmp = 0; - - GTP_DEBUG("[gtp_bak_ref_proc]Driver:%d,Sensor:%d.", driver_num, sensor_num); - - //check file-system mounted - GTP_DEBUG("[gtp_bak_ref_proc]Waiting for FS %d", gtp_ref_retries); - if (gup_check_fs_mounted("/cache") == FAIL)/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - { - GTP_DEBUG("[gtp_bak_ref_proc]/cache not mounted"); - if(gtp_ref_retries++ < GTP_CHK_FS_MNT_MAX) - { - msleep(100);/*[PLATFORM]-ADD by falin.luo@tcl.com 2015/4/29*/ - return FAIL; - } - } - else - { - GTP_DEBUG("[gtp_bak_ref_proc]/cache mounted !!!!"); - } - - if (is_950) - { - ref_seg_len = (driver_num * (sensor_num - 1) + 2) * 2; - ref_grps = 6; - ref_len = ref_seg_len * 6; // for GT950, backup-reference for six segments - } - else - { - ref_len = driver_num*(sensor_num-2)*2 + 4; - ref_seg_len = ref_len; - ref_grps = 1; - } - - refp = (u8 *)kzalloc(ref_len, GFP_KERNEL); - if(refp == NULL) - { - GTP_ERROR("Failed to allocate memory for reference buffer!"); - return FAIL; - } - memset(refp, 0, ref_len); - - //get ref file data - flp = filp_open(GTP_BAK_REF_PATH, O_RDWR | O_CREAT, 0666); - if (IS_ERR(flp)) - { - GTP_ERROR("Failed to open/create %s.", GTP_BAK_REF_PATH); - if (GTP_BAK_REF_SEND == mode) - { - goto default_bak_ref; - } - else - { - goto exit_ref_proc; - } - } - - switch (mode) - { - case GTP_BAK_REF_SEND: - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)refp, ref_len, &flp->f_pos); - if(ret < 0) - { - GTP_ERROR("Read ref file failed, send default bak ref."); - goto default_bak_ref; - } - //checksum ref file - for (j = 0; j < ref_grps; ++j) - { - ref_chksum = 0; - for(i=0; if_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)refp, ref_len, &flp->f_pos); - } - break; - - default: - GTP_ERROR("Invalid Argument(%d) for backup reference", mode); - ret = FAIL; - goto exit_ref_proc; - } - - ret = SUCCESS; - goto exit_ref_proc; - -default_bak_ref: - for (j = 0; j < ref_grps; ++j) - { - memset(&refp[j * ref_seg_len], 0, ref_seg_len); - refp[j * ref_seg_len + ref_seg_len - 1] = 0x01; // checksum = 1 - } - ret = i2c_write_bytes(client, GTP_REG_BAK_REF, refp, ref_len); - if (flp && !IS_ERR(flp)) - { - GTP_INFO("Write backup-reference data into %s", GTP_BAK_REF_PATH); - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char*)refp, ref_len, &flp->f_pos); - } - if (ret < 0) - { - GTP_ERROR("Failed to load the default backup reference"); - ret = FAIL; - } - else - { - ret = SUCCESS; - } -exit_ref_proc: - if (refp) - { - kfree(refp); - } - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -u8 gtp_fw_startup(struct i2c_client *client) -{ - u8 wr_buf[4]; - s32 ret = 0; - - //init sw WDT - wr_buf[0] = 0xAA; - ret = i2c_write_bytes(client, 0x8041, wr_buf, 1); - if (ret < 0) - { - GTP_ERROR("I2C error to firmware startup."); - return FAIL; - } - //release SS51 & DSP - wr_buf[0] = 0x00; - i2c_write_bytes(client, 0x4180, wr_buf, 1); - - //int sync - gtp_int_sync(25); - - //check fw run status - i2c_read_bytes(client, 0x8041, wr_buf, 1); - if(0xAA == wr_buf[0]) - { - GTP_ERROR("IC works abnormally,startup failed."); - return FAIL; - } - else - { - GTP_DEBUG("IC works normally,Startup success."); - wr_buf[0] = 0xAA; - i2c_write_bytes(client, 0x8041, wr_buf, 1); - return SUCCESS; - } -} - - -static void gtp_recovery_reset(struct i2c_client *client) -{ -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - force_reset_guitar(0); -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif -} - -static u8 gtp_check_clk_legality(u8 *p_clk_buf) -{ - u8 i = 0; - u8 clk_chksum = p_clk_buf[5]; - - for(i = 0; i < 5; i++) - { - if((p_clk_buf[i] < 50) || (p_clk_buf[i] > 120) || - (p_clk_buf[i] != p_clk_buf[0])) - { - break; - } - clk_chksum += p_clk_buf[i]; - } - - if((i == 5) && (clk_chksum == 0)) - { - GTP_DEBUG("Valid main clock data."); - return SUCCESS; - } - GTP_ERROR("Invalid main clock data."); - return FAIL; -} - -static u8 gtp_main_clk_proc(struct i2c_client *client) -{ - s32 ret = 0; - u8 i = 0; - u8 clk_cal_result = 0; - u8 clk_chksum = 0; - u8 gtp_clk_buf[6] = {0}; - struct file *flp = NULL; - - GTP_DEBUG("[gtp_main_clk_proc]Waiting for FS %d", gtp_clk_retries);/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - if (gup_check_fs_mounted("/cache") == FAIL)/*[PLATFORM]-MOD by falin.luo@tcl.com 2015/4/29*/ - { - GTP_DEBUG("[gtp_main_clk_proc]/cache not mounted"); - if(gtp_clk_retries++ < GTP_CHK_FS_MNT_MAX) - { - msleep(100);/*[PLATFORM]-ADD by falin.luo@tcl.com 2015/4/29*/ - return FAIL; - } - else - { - GTP_ERROR("[gtp_main_clk_proc]Wait for file system timeout,need cal clk"); - } - } - else - { - GTP_DEBUG("[gtp_main_clk_proc]/cache mounted !!!!"); - flp = filp_open(GTP_MAIN_CLK_PATH, O_RDWR | O_CREAT, 0666); - if (!IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - ret = flp->f_op->read(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - if(ret > 0) - { - ret = gtp_check_clk_legality(gtp_clk_buf); - if(SUCCESS == ret) - { - GTP_DEBUG("[gtp_main_clk_proc]Open & read & check clk file success."); - goto send_main_clk; - } - } - } - GTP_ERROR("[gtp_main_clk_proc]Check clk file failed,need cal clk"); - } - - //cal clk -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); -#endif - clk_cal_result = gup_clk_calibration(); - force_reset_guitar(0); - GTP_DEBUG("&&&&&&&&&&clk cal result:%d", clk_cal_result); - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - if(clk_cal_result < 50 || clk_cal_result > 120) - { - GTP_ERROR("Invalid main clock: %d", clk_cal_result); - ret = FAIL; - goto exit_clk_proc; - } - - for(i = 0;i < 5; i++) - { - gtp_clk_buf[i] = clk_cal_result; - clk_chksum += gtp_clk_buf[i]; - } - gtp_clk_buf[5] = 0 - clk_chksum; - -send_main_clk: - - ret = i2c_write_bytes(client, 0x8020, gtp_clk_buf, 6); - - if (flp && !IS_ERR(flp)) - { - flp->f_op->llseek(flp, 0, SEEK_SET); - flp->f_op->write(flp, (char *)gtp_clk_buf, 6, &flp->f_pos); - } - - if(-1 == ret) - { - GTP_ERROR("[gtp_main_clk_proc]send main clk i2c error!"); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - -exit_clk_proc: - if (flp && !IS_ERR(flp)) - { - filp_close(flp, NULL); - } - return ret; -} - -u8 gtp_verify_hopping_buf(struct i2c_client *client) -{ - u16 checksum = 0; - s32 i = 0; - - for (i = 0; i < 6; i += 2) - { - checksum += (gtp_hopping_buf[i] << 8) + gtp_hopping_buf[i+1]; - } - if ((checksum + ((u16)(gtp_hopping_buf[6] << 8) + (u16)gtp_hopping_buf[7])) & 0xFFFF) - { - GTP_ERROR("Wrong checksum for hopping buffer, get hopping data from config instead!"); - goto get_config_hopping; - } - - for (i = 0; i < 8; i++) - { - if (gtp_hopping_buf[i] != gtp_hopping_buf[i+8]) - { - GTP_ERROR("Hopping buffer is not identical, get data from config instead!"); - goto get_config_hopping; - } - } - GTP_DEBUG("Hopping buffer is okay"); - return SUCCESS; - -get_config_hopping: - memcpy(gtp_hopping_buf, &config[2 + 0x8065 - GTP_REG_CONFIG_DATA], 4); - gtp_hopping_buf[4] = 0xAA; - gtp_hopping_buf[5] = 0x55; - - checksum = 0; - for (i = 0; i < 6; i += 2) - { - checksum += (gtp_hopping_buf[i] << 8) + gtp_hopping_buf[i+1]; - } - checksum = 0 - checksum; - gtp_hopping_buf[6] = (u8)(checksum >> 8); - gtp_hopping_buf[7] = (u8)(checksum & 0xFF); - - for (i = 0; i < 8; i++) - { - gtp_hopping_buf[i+8] = gtp_hopping_buf[i]; - } - return SUCCESS; -} - -u8 gtp_hopping_proc(struct i2c_client *client, s32 mode) -{ - s32 ret = 0; - - GTP_DEBUG("Store hopping data, wait for /cache mounted."); - /*[PLATFORM]-MOD-BEGIN by falin.luo@tcl.com 2015/4/29*/ - ret = gup_check_fs_mounted("/cache"); - /*[PLATFORM]-MOD-END by falin.luo@tcl.com 2015/4/29*/ - - if (FAIL == ret) - { - GTP_DEBUG("/cache not mounted."); - return FAIL; - } - GTP_DEBUG("/cache Mounted!"); - - if (GTP_HOPPING_SEND == mode) - { - gtp_verify_hopping_buf(client); - - ret = i2c_write_bytes(client, 0x8030, gtp_hopping_buf, 16); - if (ret < 0) - { - return FAIL; - } - else - { - return SUCCESS; - } - } - else - { - ret = i2c_read_bytes(client, 0x8030, gtp_hopping_buf, 16); - - if (ret < 0) - { - GTP_ERROR("Failed to read hopping data from hopping buffer, get from config instead."); - return FAIL; - } - return gtp_verify_hopping_buf(client); - } -} - -#if GTP_FL_LITTLE_SYSTEM -s32 gtp_resume_timeout(void *none) -{ - s32 timeout = 0; - GTP_DEBUG("Resume timeout thread kicks off."); - - while (timeout++ < (10 * 10)) - { - msleep(100); - if (!little_fw_mode) - { - GTP_DEBUG("Resume timeout thread terminated while counting."); - return 0; - } - } - - if (little_fw_mode) - { - GTP_INFO("Download big ss51 firmware timeout, process esd reset."); - little_fw_mode = 0; - gtp_recovery_reset(i2c_client_point); - } - - return 0; -} - -u8 gtp_get_state1(struct i2c_client *client) -{ - u8 state1 = 0; - s32 ret = 0; - - ret = i2c_read_bytes(client, GTP_REG_STATE1, &state1, 1); - - if (ret < 0) - { - GTP_ERROR("Failed to get state1!"); - return 0xFF; - } - return state1; -} - -u8 gtp_get_state2(struct i2c_client *client) -{ - u8 state2 = 0; - s32 ret = 0; - - ret = i2c_read_bytes(client, GTP_REG_STATE2, &state2, 1); - - if (ret < 0) - { - GTP_ERROR("Failed to get state2!"); - return 0xFF; - } - return state2; -} - -// size: k in unit -u8 gtp_send_check_info(struct i2c_client *client, u16 fw_chksum) -{ - s32 ret = 0; - u8 checksum = 0; - u8 bank = 0; - u8 state1 = 0x00; - u8 state2 = 0x00; - u16 start_addr = 0x0000; - u8 checkinfo_buf[10] = {0}; - - - switch (fw_block) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - bank = 0x01; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = (0xC000 + (fw_block - 1) * 1024 * 2); - break; - - case 9: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = 0xF800; - break; - - case 10: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_A_SEG; - start_addr = 0xF000; - break; - - case 11: - bank = 0x00; - state1 = BUFFER_FULL; - state2 = IS_B_SEG_FIRST; - start_addr = 0xE800; - break; - - case 12: - bank = 0x00; - state1 = WAIT_CHECK; - state2 = IS_B_SEG_LAST; - start_addr = 0xC000; - break; - - default: - GTP_ERROR("Invalid firmware block(%d) for checkinfo.", fw_block); - return FAIL; - } - - checkinfo_buf[3] = bank; - checkinfo_buf[4] = (u8)(start_addr >> 8); - checkinfo_buf[5] = (u8)(start_addr & 0xFF); - checkinfo_buf[7] = state2; - checkinfo_buf[8] = state1; - - GTP_DEBUG("fw_block: %d, fw_chksum: 0x%04X", fw_block, fw_chksum); - if (fw_block == 12) - { - checkinfo_buf[6] = 80; - } - else - { - checkinfo_buf[6] = 16; - } - - checkinfo_buf[0] = (u8)(fw_chksum >> 8); - checkinfo_buf[1] = (u8)(fw_chksum & 0xFF); - - checksum = 0; - for (ret = 0; ret < 6; ret++) - { - checksum += checkinfo_buf[3 + ret]; - } - checkinfo_buf[2] = 1 - checksum; - - ret = i2c_write_bytes(client, GTP_REG_CHECKINFO, checkinfo_buf, 9); - if (ret < 0) - { - GTP_ERROR("Failed to send checkinfo!"); - return FAIL; - } - else - { - GTP_DEBUG("Send checkinfo successfully!"); - } - return SUCCESS; -} - - - -u8 gtp_resume_fw_startup(struct i2c_client *client) -{ - u8 buf; - u32 retry = 0; - s32 ret = 0; - - GTP_INFO("Big ss51 firmware startup."); - - while (retry++ < 10) - { - buf = 0x0C; - ret = i2c_write_bytes(client, 0x4180, &buf, 1); // hold ss51 & dsp - if (ret < 0) - { - GTP_ERROR("Failed to hold ss51 & dsp."); - return FAIL; - } - - buf = 0x00; - ret = i2c_read_bytes(client, 0x4180, &buf, 1); - if (ret < 0) - { - GTP_ERROR("Failed to get hold ss51 & dsp status."); - return FAIL; - } - - if (buf == 0x0C) - { - GTP_DEBUG("SS51 & Dsp confirm hold!"); - break; - } - } - - if (retry >= 10) - { - GTP_ERROR("Hold ss51 & dsp retry exhausted."); - return FAIL; - } - - buf = 0x03; - i2c_write_bytes(client, 0x4048, &buf, 1); // select bank3 - - buf = 0x00; - i2c_write_bytes(client, 0x4049, &buf, 1); - - return gtp_fw_startup(client); -} - -u8 gtp_download_seg_b(struct i2c_client *client) -{ - s32 ret = 0; - u16 fw_chksum = 0; - u8 state1 = 0; - - if (block_section != 10) - { - state1 = 0x00; - i2c_write_bytes(client, 0x4048, &state1, 1); // select bank0 - - ret = gup_burn_ss51_seg_b(client, 10, &fw_chksum); - - if (FAIL == ret) - { - GTP_ERROR("Failed to burn ss51 seg B, process reburn."); - return FAIL; - } - - ret = gtp_send_check_info(i2c_client_point, fw_chksum); - if (FAIL == ret) - { - GTP_ERROR("Send checkinfo failed, process resend."); - return FAIL; - } - } - msleep(1); - - state1 = gtp_get_state1(client); - - if (CHECK_COMPLETE == state1) - { - GTP_INFO("Burn ss51 Block12 successfully"); - } - else if (CHECK_ERROR == state1) - { - GTP_DEBUG("Big SS51 Seg B check error, process reburn!"); - return FAIL; - } - else - { - GTP_ERROR("Big SS51 Seg B check imcomplete(state1:%s), process recheck.", symbolic_state1[state1&0x07]); - block_section = 10; - return FAIL; - } - ret = gtp_resume_fw_startup(client); - - little_fw_mode = 0; - if (FAIL == ret) - { - GTP_ERROR("Big ss51 firmware startup failed, process esd reset."); - if (!tpd_halt) - { - gtp_recovery_reset(i2c_client_point); - } - } - else - { - GTP_INFO("Switch to big ss51 firmware successfully!"); - } -#if GTP_ESD_PROTECT - if (!tpd_halt) - { - gtp_esd_switch(client, SWITCH_ON); - } -#endif - return SUCCESS; -} - - -u8 gtp_download_big_ss51(struct i2c_client *client) -{ - u8 state1, state2; - s32 ret = 0; - s32 i = 0; - static u16 fw_chksum = 0x0000; - - //GTP_DEBUG("Block: %d, Block Section: %d", fw_block, block_section); - if (!little_fw_mode) - { - GTP_ERROR("Download big ss51 timeout!"); - return FAIL; - } - - if (block_section == 10) // one firmware block burned - { - if (fw_block == 11) - { - mdelay(3); - } - - state1 = gtp_get_state1(i2c_client_point); - state2 = gtp_get_state2(i2c_client_point); - - GTP_DEBUG("state1: %02X (%s), state2: %02X (%s)", state1, symbolic_state1[state1&0x07], state2, symbolic_state2[state2&0x07]); - - if (CHECK_COMPLETE == state1) - { - block_section = 1; - GTP_DEBUG("Burn ss51 Block%d successfully!", fw_block); - if (fw_block == 11) - { - #if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_OFF); - #endif - tpd_up(0, 0, 0); // release all - input_sync(tpd->dev); - GTP_DEBUG("Release touch manually."); - fw_block = 12; - for (i = 0; i < 5; i++) - { - if (!little_fw_mode || (fw_block != 12)) - { - GTP_ERROR("Download big ss51 timeout!"); - return FAIL; - } - ret = gtp_download_seg_b(client); - - if (SUCCESS == ret) - { - break; - } - } - return SUCCESS; - } - } - else if (CHECK_ERROR == state1) - { - GTP_ERROR("Block%d check error, process reburn.", fw_block); - block_section = 1; - fw_block--; - } - else - { - GTP_DEBUG("Block%d check incomplete, process recheck.", fw_block); - block_section = 10; - } - } - if (block_section < 9) - { - ret = gup_burn_ss51_block(i2c_client_point, block_section, fw_block+1, &fw_chksum); - if (FAIL == ret) - { - GTP_ERROR("Burn block%d section%d failed, reburn block%d", fw_block+1, block_section, fw_block+1); - } - else - { - block_section++; - } - if (block_section == 9) // one firmware block downloaded - { - fw_block++; - block_section = 10; - ret = gtp_send_check_info(i2c_client_point, fw_chksum); - } - } - return ret; -} -#endif - -#endif -//************* For GT9XXF End **********************// - -#if GTP_WITH_PEN -static void gtp_pen_init(void) -{ - s32 ret = 0; - - pen_dev = input_allocate_device(); - if (pen_dev == NULL) - { - GTP_ERROR("Failed to allocate input device for pen/stylus."); - return; - } - - pen_dev->evbit[0] = BIT_MASK(EV_SYN) | BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) ; - pen_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); - - set_bit(BTN_TOOL_PEN, pen_dev->keybit); - set_bit(INPUT_PROP_DIRECT, pen_dev->propbit); - //set_bit(INPUT_PROP_POINTER, pen_dev->propbit); - -#if GTP_PEN_HAVE_BUTTON - input_set_capability(pen_dev, EV_KEY, BTN_STYLUS); - input_set_capability(pen_dev, EV_KEY, BTN_STYLUS2); -#endif - - input_set_abs_params(pen_dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_PRESSURE, 0, 255, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); - input_set_abs_params(pen_dev, ABS_MT_TRACKING_ID, 0, 255, 0, 0); - - pen_dev->name = "mtk-pen"; - pen_dev->phys = "input/ts"; - pen_dev->id.bustype = BUS_I2C; - - ret = input_register_device(pen_dev); - if (ret) - { - GTP_ERROR("Register %s input device failed", pen_dev->name); - return; - } -} - -static void gtp_pen_down(s32 x, s32 y, s32 size, s32 id) -{ - input_report_key(pen_dev, BTN_TOOL_PEN, 1); - input_report_key(pen_dev, BTN_TOUCH, 1); - input_report_abs(pen_dev, ABS_MT_POSITION_X, x); - input_report_abs(pen_dev, ABS_MT_POSITION_Y, y); - if ((!size) && (!id)) - { - input_report_abs(pen_dev, ABS_MT_PRESSURE, 100); - input_report_abs(pen_dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(pen_dev, ABS_MT_PRESSURE, size); - input_report_abs(pen_dev, ABS_MT_TOUCH_MAJOR, size); - input_report_abs(pen_dev, ABS_MT_TRACKING_ID, id); - } - input_mt_sync(pen_dev); -} - -static void gtp_pen_up(void) -{ - input_report_key(pen_dev, BTN_TOOL_PEN, 0); - input_report_key(pen_dev, BTN_TOUCH, 0); -} -#endif - - -static s32 tpd_i2c_probe_next(struct i2c_client *client) -{ - s32 err = 0; - s32 ret = 0; - - u16 version_info; - - - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } - - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } - -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_ERROR(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif - -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - - return 0; -} - -static struct miscdevice cfg_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "tp_cfg", - // .fops = &tpd_fops, -}; - -#if 0 -static void buttons_timer_function(unsigned long data) -{ - printk(KERN_ERR"caoyang1\n"); - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - tpd_sleep_flag = 1; - -} -#endif - -static s32 tpd_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) -{ - s32 err = 0; -#if 0 - s32 ret = 0; - u16 version_info; -#endif -#if GTP_HAVE_TOUCH_KEY - s32 idx = 0; -#endif -#ifdef TPD_PROXIMITY - struct hwmsen_object obj_ps; -#endif - - i2c_client_point = client; -//add by caoyang for ·À¶¶ -//do not use the timer because it cause bug -#if 0 - init_timer(&buttons_timer); - buttons_timer.function = buttons_timer_function; - add_timer(&buttons_timer); -#endif -#if 0 - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C communication ERROR!"); - } -#endif -#ifdef VELOCITY_CUSTOM - - if ((err = misc_register(&tpd_misc_device))) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - -#endif -#if 0 - ret = gtp_read_version(client, &version_info); - - if (ret < 0) - { - GTP_ERROR("Read version failed."); - } - - ret = gtp_init_panel(client); - - if (ret < 0) - { - GTP_ERROR("GTP init panel failed."); - } -#endif - // Create proc file system - gt91xx_config_proc = proc_create(GT91XX_CONFIG_PROC_FILE, 0666, NULL, &config_proc_ops); - if (gt91xx_config_proc == NULL) - { - GTP_ERROR("create_proc_entry %s failed\n", GT91XX_CONFIG_PROC_FILE); - } - else - { - GTP_INFO("create proc entry %s success", GT91XX_CONFIG_PROC_FILE); - } -#if 0 -#if GTP_CREATE_WR_NODE - init_wr_node(client); -#endif - - thread = kthread_run(touch_event_handler, 0, TPD_DEVICE); - - - if (IS_ERR(thread)) - { - err = PTR_ERR(thread); - GTP_ERROR(TPD_DEVICE " failed to create kernel thread: %d\n", err); - } -#endif - - -#if GTP_HAVE_TOUCH_KEY - - for (idx = 0; idx < GTP_MAX_KEY_NUM; idx++) - { - input_set_capability(tpd->dev, EV_KEY, touch_key_array[idx]); - } - -#endif - input_set_capability(tpd->dev, EV_KEY, KEY_POWER); - -#if GTP_WITH_PEN - gtp_pen_init(); -#endif - // set INT mode - mt_set_gpio_mode(GPIO_CTP_EINT_PIN, GPIO_CTP_EINT_PIN_M_EINT); - mt_set_gpio_dir(GPIO_CTP_EINT_PIN, GPIO_DIR_IN); - mt_set_gpio_pull_enable(GPIO_CTP_EINT_PIN, GPIO_PULL_DISABLE); - - msleep(50); - -#if 1 - if (!int_type) //EINTF_TRIGGER - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_RISING, tpd_eint_interrupt_handler, 1); - } - else - { - mt_eint_registration(CUST_EINT_TOUCH_PANEL_NUM, EINTF_TRIGGER_FALLING, tpd_eint_interrupt_handler, 1); - } - -#endif - -#if 0 - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - -#if GTP_AUTO_UPDATE - ret = gup_init_update_proc(client); - - if (ret < 0) - { - GTP_ERROR("Create update thread error."); - } -#endif -#endif -#ifdef TPD_PROXIMITY - //obj_ps.self = cm3623_obj; - obj_ps.polling = 0; //0--interrupt mode;1--polling mode; - obj_ps.sensor_operate = tpd_ps_operate; - - if ((err = hwmsen_attach(ID_PROXIMITY, &obj_ps))) - { - GTP_ERROR("hwmsen attach fail, return:%d.", err); - } - -#endif -#if 0 -#if GTP_ESD_PROTECT - gtp_esd_switch(client, SWITCH_ON); -#endif - - tpd_load_status = 1; -#endif - misc_register(&cfg_misc_device); - tpd_load_status = 1; - return 0; -} - - -static void tpd_eint_interrupt_handler(void) -{ - TPD_DEBUG_PRINT_INT; - - tpd_flag = 1; - - wake_up_interruptible(&waiter); -} -static int tpd_i2c_remove(struct i2c_client *client) -{ -#if GTP_CREATE_WR_NODE - uninit_wr_node(); -#endif - -#if GTP_ESD_PROTECT - destroy_workqueue(gtp_esd_check_workqueue); -#endif - - return 0; -} -#if (GTP_ESD_PROTECT || GTP_COMPATIBLE_MODE) -static s32 force_reset_guitar(s32 resume) -{ - s32 i = 0; - s32 ret = 0; - - if (!resume) - { - GTP_INFO("Force_reset_guitar"); - } - else - { - GTP_INFO("Download little system."); - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -#ifdef MT6573 - //Power off TP - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ZERO); - msleep(30); - //Power on TP - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ONE); - msleep(30); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - // Power off TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif - msleep(30); - - // Power on TP - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerOn(TPD_POWER_SOURCE_CUSTOM, VOL_2800, "TP"); - #else - hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_2800, "TP"); - #endif - msleep(30); - -#endif - - for (i = 0; i < 5; i++) - { - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - #if GTP_FL_LITTLE_SYSTEM - //check code ram - if (resume) // poweroff resume - { - ret = gup_fw_download_proc(NULL, GTP_FL_PWR_RESUME_BURN); - if (FAIL == ret) - { - GTP_ERROR("Failed to download little system."); - continue; - } - } - else - #endif - { - ret = gup_fw_download_proc(NULL, GTP_FL_ESD_RECOVERY); - } - if(FAIL == ret) - { - GTP_ERROR("[force_reset_guitar]Check & repair fw failed."); - continue; - } - //startup fw - ret = gtp_fw_startup(i2c_client_point); - if(FAIL == ret) - { - if (resume) - { - GTP_ERROR("Failed to startup little system."); - } - else - { - GTP_ERROR("GT9XXF start up failed."); - } - continue; - } - break; - } - else - #endif - { - //Reset Guitar - gtp_reset_guitar(i2c_client_point, 20); - msleep(50); - //Send config - ret = gtp_send_cfg(i2c_client_point); - - if (ret < 0) - { - continue; - } - } - break; - } - - if (i >= 5) - { - if (resume) - { - GTP_ERROR("Failed to download little system."); - } - else - { - GTP_ERROR("Failed to reset guitar."); - } - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return FAIL; - } - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - if (resume) - { - little_fw_mode = 1; - fw_block = 0; - block_section = 1; - - msleep(1); - gtp_main_clk_proc(i2c_client_point); - gtp_hopping_proc(i2c_client_point, GTP_HOPPING_SEND); - gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - } - else - { - little_fw_mode = 0; - fw_block = 0; - block_section = 0; - } - } -#endif - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - return SUCCESS; -} -#endif - -#if GTP_ESD_PROTECT -static s32 gtp_init_ext_watchdog(struct i2c_client *client) -{ - u8 opr_buffer[2] = {0xAA}; - GTP_DEBUG("Init external watchdog."); - return i2c_write_bytes(client, 0x8041, opr_buffer, 1); -} - -void gtp_esd_switch(struct i2c_client *client, s32 on) -{ - spin_lock(&esd_lock); - if (SWITCH_ON == on) // switch on esd - { - if (!esd_running) - { - esd_running = 1; - spin_unlock(&esd_lock); - GTP_INFO("Esd started"); - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - spin_unlock(&esd_lock); - } - } - else // switch off esd - { - if (esd_running) - { - esd_running = 0; - spin_unlock(&esd_lock); - GTP_INFO("Esd cancelled"); - cancel_delayed_work_sync(>p_esd_check_work); - } - else - { - spin_unlock(&esd_lock); - } - } -} - -static s32 gtp_check_fw(void) -{ - u8 versionBuff[4] = {0}; - s32 ret,retry = 0; - - while(retry++ < 3) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8140, versionBuff, sizeof(versionBuff)); - if(ret < 0) - { - continue; - } - if( memcmp(versionBuff, >p_default_FW_fl[4], 4) !=0 ) - { - continue; - } - - return 1; - } - - GTP_ERROR("Check running fw version error!"); - return 0; -} - -static void gtp_esd_check_func(struct work_struct *work) -{ - s32 i = 0; - s32 ret = -1; - u8 esd_buf[3] = {0x00}; - - if (tpd_halt) - { - GTP_INFO("Esd suspended!"); - return; - } - for (i = 0; i < 3; i++) - { - ret = i2c_read_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 2); - - GTP_DEBUG("[Esd]0x8040 = 0x%02X, 0x8041 = 0x%02X", esd_buf[0], esd_buf[1]); - if (ret < 0) - { - // IIC communication problem - continue; - } - else - { - if ((esd_buf[0] == 0xAA) || (esd_buf[1] != 0xAA)) - { - u8 chk_buf[2] = {0x00}; - i2c_read_bytes_non_dma(i2c_client_point, 0x8040, chk_buf, 2); - - GTP_DEBUG("[Check]0x8040 = 0x%02X, 0x8041 = 0x%02X", chk_buf[0], chk_buf[1]); - - if ( (chk_buf[0] == 0xAA) || (chk_buf[1] != 0xAA) ) - { - i = 3; // jump to reset guitar - break; - } - else - { - continue; - } - } - else - { - // IC works normally, Write 0x8040 0xAA, feed the watchdog - esd_buf[0] = 0xAA; - i2c_write_bytes_non_dma(i2c_client_point, 0x8040, esd_buf, 1); - - break; - } - } - } - - if (i >= 3 || !gtp_check_fw()) - { - #if GTP_COMPATIBLE_MODE - if ((CHIP_TYPE_GT9F == gtp_chip_type) && (1 == rqst_processing)) - { - GTP_INFO("Request Processing, no reset guitar."); - } - else - #endif - { - GTP_INFO("IC works abnormally! Process reset guitar."); - esd_buf[0] = 0x01; - esd_buf[1] = 0x01; - esd_buf[2] = 0x01; - i2c_write_bytes(i2c_client_point, 0x4226, esd_buf, 3); - msleep(50); - force_reset_guitar(0); - } - } - - if (!tpd_halt) - { - queue_delayed_work(gtp_esd_check_workqueue, >p_esd_check_work, clk_tick_cnt); - } - else - { - GTP_INFO("Esd suspended!"); - } - - return; -} -#endif - -static void tpd_down(s32 x, s32 y, s32 size, s32 id) -{ - if ((!size) && (!id)) - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, 100); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 100); - } - else - { - input_report_abs(tpd->dev, ABS_MT_PRESSURE, size); - input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, size); - /* track id Start 0 */ - input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, id); - } - - input_report_key(tpd->dev, BTN_TOUCH, 1); - input_report_abs(tpd->dev, ABS_MT_POSITION_X, x); - input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y); - input_mt_sync(tpd->dev); - TPD_EM_PRINT(x, y, x, y, id, 1); - -#if (defined(MT6575)||defined(MT6577)) - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 1); - } - -#endif -} - -static void tpd_up(s32 x, s32 y, s32 id) -{ - input_report_key(tpd->dev, BTN_TOUCH, 0); - input_mt_sync(tpd->dev); - TPD_EM_PRINT(x, y, x, y, id, 0); - -#if (defined(MT6575) || defined(MT6577)) - - if (FACTORY_BOOT == get_boot_mode() || RECOVERY_BOOT == get_boot_mode()) - { - tpd_button(x, y, 0); - } - -#endif -} -#if GTP_CHARGER_SWITCH -static void gtp_charger_switch(s32 dir_update) -{ - u32 chr_status = 0; - u8 chr_cmd[3] = {0x80, 0x40}; - static u8 chr_pluggedin = 0; - int ret = 0; - -#ifdef MT6573 - chr_status = *(volatile u32 *)CHR_CON0; - chr_status &= (1 << 13); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - chr_status = upmu_is_chr_det(); -#endif - - if (chr_status) // charger plugged in - { - if (!chr_pluggedin || dir_update) - { - chr_cmd[2] = 6; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugin"); - } - chr_pluggedin = 1; - } - } - else // charger plugged out - { - if (chr_pluggedin || dir_update) - { - chr_cmd[2] = 7; - ret = gtp_i2c_write(i2c_client_point, chr_cmd, 3); - if (ret > 0) - { - GTP_INFO("Update status for Charger Plugout"); - } - chr_pluggedin = 0; - } - } -} -#endif - -static int touch_event_handler(void *unused) -{ - struct sched_param param = { .sched_priority = RTPM_PRIO_TPD }; - u8 end_cmd[3] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF, 0}; - u8 point_data[2 + 1 + 8 * GTP_MAX_TOUCH + 1] = {GTP_READ_COOR_ADDR >> 8, GTP_READ_COOR_ADDR & 0xFF}; - u8 touch_num = 0; - u8 finger = 0; - static u8 pre_touch = 0; - static u8 pre_key = 0; -#if GTP_WITH_PEN - u8 pen_active = 0; - static u8 pre_pen = 0; -#endif - u8 key_value = 0; - u8 *coor_data = NULL; - s32 input_x = 0; - s32 input_y = 0; - s32 input_w = 0; - s32 id = 0; - s32 i = 0; - s32 ret = -1; - -#if GTP_COMPATIBLE_MODE - u8 rqst_data[3] = {(u8)(GTP_REG_RQST >> 8), (u8)(GTP_REG_RQST & 0xFF), 0}; -#endif - -#ifdef TPD_PROXIMITY - s32 err = 0; - hwm_sensor_data sensor_data; - u8 proximity_status; -#endif - u8 proximity_status; //add by caoyang - u8 doze_buf[3] = {0x81, 0x4B}; - - sched_setscheduler(current, SCHED_RR, ¶m); - do - { - set_current_state(TASK_INTERRUPTIBLE); - - while (tpd_halt) - { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) - { - break; - } - //#endif - } - tpd_flag = 0; - msleep(20); - } - - wait_event_interruptible(waiter, tpd_flag != 0); - tpd_flag = 0; - TPD_DEBUG_SET_TIME; - set_current_state(TASK_RUNNING); - - #if GTP_CHARGER_SWITCH - gtp_charger_switch(0); - #endif - - if(gesture_value > 0){ - //#if GTP_GESTURE_WAKEUP - if (DOZE_ENABLED == doze_status) - { - ret = gtp_i2c_read(i2c_client_point, doze_buf, 3); - GTP_DEBUG("0x814B = 0x%02X", doze_buf[2]); - if (ret > 0) - { - if ((doze_buf[2] == 'a') || (doze_buf[2] == 'b') || (doze_buf[2] == 'c') || - (doze_buf[2] == 'd') || (doze_buf[2] == 'e') || (doze_buf[2] == 'g') || - (doze_buf[2] == 'h') || (doze_buf[2] == 'm') || (doze_buf[2] == 'o') || - (doze_buf[2] == 'q') || (doze_buf[2] == 's') || (doze_buf[2] == 'v') || - (doze_buf[2] == 'w') || (doze_buf[2] == 'y') || (doze_buf[2] == 'z') || - (doze_buf[2] == 0x5E) /* ^ */ - ) - { - if (doze_buf[2] != 0x5E) - { - GTP_INFO("Wakeup by gesture(%c), light up the screen!", doze_buf[2]); - } - else - { - GTP_INFO("Wakeup by gesture(^), light up the screen!"); - } - - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if ( (doze_buf[2] == 0xAA) || (doze_buf[2] == 0xBB) || - (doze_buf[2] == 0xAB) || (doze_buf[2] == 0xBA) ) - { - char *direction[4] = {"Right", "Down", "Up", "Left"}; - u8 type = ((doze_buf[2] & 0x0F) - 0x0A) + (((doze_buf[2] >> 4) & 0x0F) - 0x0A) * 2; - - GTP_INFO("%s slide to light up the screen!", direction[type]); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else if (0xCC == doze_buf[2]) - { - GTP_INFO("Double click to light up the screen!"); - doze_status = DOZE_WAKEUP; - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - } - else - { - // clear 0x814B - doze_buf[2] = 0x00; - gtp_i2c_write(i2c_client_point, doze_buf, 3); - gtp_enter_doze(i2c_client_point); - } - } - continue; - } - //#endif - } - ret = gtp_i2c_read(i2c_client_point, point_data, 12); - if (ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - continue; - } - finger = point_data[GTP_ADDR_LENGTH]; - - #if GTP_COMPATIBLE_MODE - if ((finger == 0x00) && (CHIP_TYPE_GT9F == gtp_chip_type)) - { - ret = gtp_i2c_read(i2c_client_point, rqst_data, 3); - - if(ret < 0) - { - GTP_ERROR("I2C transfer error. errno:%d\n ", ret); - continue; - } - switch (rqst_data[2]) - { - case GTP_RQST_BAK_REF: - GTP_INFO("Request Ref."); - rqst_processing = 1; - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_SEND); - if(SUCCESS == ret) - { - GTP_INFO("Send ref success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - - case GTP_RQST_CONFIG: - GTP_INFO("Request Config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("Send config error."); - } - else - { - GTP_INFO("Send config success."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - - case GTP_RQST_MAIN_CLOCK: - GTP_INFO("Request main clock."); - rqst_processing = 1; - ret = gtp_main_clk_proc(i2c_client_point); - if(SUCCESS == ret) - { - GTP_INFO("Send main clk success."); - #if GTP_POWER_CTRL_SLEEP - { - ret = gtp_hopping_proc(i2c_client_point, GTP_HOPPING_SEND); - if (FAIL == ret) - { - GTP_ERROR("Failed to send hopping data."); - goto exit_work_func; - } - else - { - GTP_INFO("Send hopping data success."); - } - } - #endif - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - rqst_processing = 0; - } - goto exit_work_func; - - case GTP_RQST_RESET: - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_ENABLED == doze_status) { - u8 reg_data[3] = {(u8)(0x801F >> 8), (u8)(0x801F & 0xFF), 0}; - gtp_i2c_write(i2c_client_point, reg_data, 3); - gtp_recovery_reset(i2c_client_point); - gtp_enter_doze(i2c_client_point); - } - }else - //#endif - { - gtp_recovery_reset(i2c_client_point); - } - GTP_INFO("Request Reset."); - goto exit_work_func; - - #if GTP_POWER_CTRL_SLEEP - case GTP_RQST_STORE_HOPPING: - GTP_INFO("Request store hopping data."); - ret = gtp_hopping_proc(i2c_client_point, GTP_HOPPING_STORE); - if (FAIL == ret) - { - GTP_ERROR("Failed to store hopping data."); - } - else - { - GTP_INFO("Hopping data stored."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - - case GTP_RQST_STORE_BAK_REF: - GTP_INFO("Request store backup reference."); - ret = gtp_bak_ref_proc(i2c_client_point, GTP_BAK_REF_STORE); - if (FAIL == ret) - { - GTP_ERROR("Failed to store backup reference data."); - } - else - { - GTP_INFO("Backup reference data stored."); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - } - goto exit_work_func; - #endif - - default: - GTP_INFO("Undefined request code: 0x%02X", rqst_data[2]); - rqst_data[2] = GTP_RQST_RESPONDED; - gtp_i2c_write(i2c_client_point, rqst_data, 3); - break; - } - } - #endif - - if (finger == 0x00) - { - continue; - } - - if ((finger & 0x80) == 0) - { - goto exit_work_func; - } -if((gtp_autotool_setting == 1) && !(point_data[GTP_ADDR_LENGTH] & 0x40)){ - gtp_autotool_setting = 0; -} - //add by caoyang -if(gesture_value > 0){ - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - if(tpd_sleep_flag == 1){ - goto exit_work_func; - } - if (proximity_status & 0x40) //proximity or large touch detect,enable hwm_sensor. - { - printk(KERN_ERR"caoyang0 test for xipin\n"); - //mod_timer(&buttons_timer, jiffies+HZ/50); - if(gtp_autotool_setting == 1){ - gtp_autotool_setting = 0; - goto exit_work_func; - } -#if 1 - input_report_key(tpd->dev, KEY_POWER, 1); - input_sync(tpd->dev); - input_report_key(tpd->dev, KEY_POWER, 0); - input_sync(tpd->dev); - tpd_sleep_flag = 1; -#endif - goto exit_work_func; - } - //end -} - #ifdef TPD_PROXIMITY - if (tpd_proximity_flag == 1) - { - proximity_status = point_data[GTP_ADDR_LENGTH]; - GTP_DEBUG("REG INDEX[0x814E]:0x%02X\n", proximity_status); - - if (proximity_status & 0x60) //proximity or large touch detect,enable hwm_sensor. - { - tpd_proximity_detect = 0; - //sensor_data.values[0] = 0; - } - else - { - tpd_proximity_detect = 1; - //sensor_data.values[0] = 1; - } - - //get raw data - GTP_DEBUG(" ps change\n"); - GTP_DEBUG("PROXIMITY STATUS:0x%02X\n", tpd_proximity_detect); - //map and store data to hwm_sensor_data - sensor_data.values[0] = tpd_get_ps_value(); - sensor_data.value_divide = 1; - sensor_data.status = SENSOR_STATUS_ACCURACY_MEDIUM; - //report to the up-layer - ret = hwmsen_get_interrupt_data(ID_PROXIMITY, &sensor_data); - - if (ret) - { - GTP_ERROR("Call hwmsen_get_interrupt_data fail = %d\n", err); - } - } - - #endif - - touch_num = finger & 0x0f; - - if (touch_num > GTP_MAX_TOUCH) - { - goto exit_work_func; - } - - if (touch_num > 1) - { - u8 buf[8 * GTP_MAX_TOUCH] = {(GTP_READ_COOR_ADDR + 10) >> 8, (GTP_READ_COOR_ADDR + 10) & 0xff}; - - ret = gtp_i2c_read(i2c_client_point, buf, 2 + 8 * (touch_num - 1)); - memcpy(&point_data[12], &buf[2], 8 * (touch_num - 1)); - } - - #if (GTP_HAVE_TOUCH_KEY || GTP_PEN_HAVE_BUTTON) - key_value = point_data[3 + 8 * touch_num]; - - if (key_value || pre_key) - { - #if GTP_PEN_HAVE_BUTTON - if (key_value == 0x40) - { - GTP_DEBUG("BTN_STYLUS & BTN_STYLUS2 Down."); - input_report_key(pen_dev, BTN_STYLUS, 1); - input_report_key(pen_dev, BTN_STYLUS2, 1); - pen_active = 1; - } - else if (key_value == 0x10) - { - GTP_DEBUG("BTN_STYLUS Down, BTN_STYLUS2 Up."); - input_report_key(pen_dev, BTN_STYLUS, 1); - input_report_key(pen_dev, BTN_STYLUS2, 0); - pen_active = 1; - } - else if (key_value == 0x20) - { - GTP_DEBUG("BTN_STYLUS Up, BTN_STYLUS2 Down."); - input_report_key(pen_dev, BTN_STYLUS, 0); - input_report_key(pen_dev, BTN_STYLUS2, 1); - pen_active = 1; - } - else - { - GTP_DEBUG("BTN_STYLUS & BTN_STYLUS2 Up."); - input_report_key(pen_dev, BTN_STYLUS, 0); - input_report_key(pen_dev, BTN_STYLUS2, 0); - if ( (pre_key == 0x40) || (pre_key == 0x20) || - (pre_key == 0x10) - ) - { - pen_active = 1; - } - } - if (pen_active) - { - touch_num = 0; // shield pen point - //pre_touch = 0; // clear last pen status - } - #endif - #if GTP_HAVE_TOUCH_KEY - if (!pre_touch) - { - for (i = 0; i < GTP_MAX_KEY_NUM; i++) - { - input_report_key(tpd->dev, touch_key_array[i], key_value & (0x01 << i)); - } - touch_num = 0; // shiled fingers - } - #endif - } - #endif - pre_key = key_value; - - GTP_DEBUG("pre_touch:%02x, finger:%02x.", pre_touch, finger); - - if (touch_num) - { - for (i = 0; i < touch_num; i++) - { - coor_data = &point_data[i * 8 + 3]; - - id = coor_data[0] & 0x0F; - input_x = coor_data[1] | coor_data[2] << 8; - input_y = coor_data[3] | coor_data[4] << 8; - input_w = coor_data[5] | coor_data[6] << 8; - - #if GTP_WITH_PEN - id = coor_data[0]; - if ((id & 0x80)) // pen/stylus is activated - { - GTP_DEBUG("Pen touch DOWN!"); - pre_pen = 1; - //id &= 0x7F; - id = 0; - GTP_DEBUG("(%d)(%d, %d)[%d]", id, input_x, input_y, input_w); - gtp_pen_down(input_x, input_y, input_w, id); - pen_active = 1; - } - else - #endif - { - GTP_DEBUG(" (%d)(%d, %d)[%d]", id, input_x, input_y, input_w); - tpd_down(input_x, input_y, input_w, id); - } - } - } - else - { - if (pre_touch) - { - #if GTP_WITH_PEN - if (pre_pen) - { - GTP_DEBUG("Pen touch UP!"); - gtp_pen_up(); - pre_pen = 0; - pen_active = 1; - } - else - #endif - { - GTP_DEBUG("Touch Release!"); - tpd_up(0, 0, 0); - } - } - } - pre_touch = touch_num; - - #if GTP_WITH_PEN - if (pen_active) - { - pen_active = 0; - input_sync(pen_dev); - } - else - #endif - { - input_sync(tpd->dev); - } - -exit_work_func: - - if (!gtp_rawdiff_mode) - { - ret = gtp_i2c_write(i2c_client_point, end_cmd, 3); - - if (ret < 0) - { - GTP_ERROR("I2C write end_cmd error!"); - } - } - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - if (little_fw_mode) - { - if ((fw_block == 0) && (block_section == 1)) - { - GTP_INFO("Begin downloading big ss51 firmware"); - } - gtp_download_big_ss51(i2c_client_point); - } - } - #endif - } while (!kthread_should_stop()); - - return 0; -} - -static int tpd_local_init(void) -{ -#if GTP_ESD_PROTECT - clk_tick_cnt = 2 * HZ; // HZ: clock ticks in 1 second generated by system - GTP_DEBUG("Clock ticks for an esd cycle: %d", clk_tick_cnt); - INIT_DELAYED_WORK(>p_esd_check_work, gtp_esd_check_func); - gtp_esd_check_workqueue = create_workqueue("gtp_esd_check"); - spin_lock_init(&esd_lock); // 2.6.39 & later - // esd_lock = SPIN_LOCK_UNLOCKED; // 2.6.39 & before -#endif - -#if GTP_SUPPORT_I2C_DMA - gpDMABuf_va = (u8 *)dma_alloc_coherent(NULL, GTP_DMA_MAX_TRANSACTION_LENGTH, &gpDMABuf_pa, GFP_KERNEL); - if(!gpDMABuf_va){ - GTP_ERROR("[Error] Allocate DMA I2C Buffer failed!\n"); - } - memset(gpDMABuf_va, 0, GTP_DMA_MAX_TRANSACTION_LENGTH); -#endif - if (i2c_add_driver(&tpd_i2c_driver) != 0) - { - GTP_ERROR("unable to add i2c driver.\n"); - return -1; - } - - if (tpd_load_status == 0) //if(tpd_load_status == 0) // disable auto load touch driver for linux3.0 porting - { - GTP_ERROR("add error touch panel driver.\n"); - i2c_del_driver(&tpd_i2c_driver); - return -1; - } - - input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, (GTP_MAX_TOUCH - 1), 0, 0); -#ifdef TPD_HAVE_BUTTON - tpd_button_setting(TPD_KEY_COUNT, tpd_keys_local, tpd_keys_dim_local);// initialize tpd button data -#endif - -#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) - TPD_DO_WARP = 1; - memcpy(tpd_wb_start, tpd_wb_start_local, TPD_WARP_CNT * 4); - memcpy(tpd_wb_end, tpd_wb_start_local, TPD_WARP_CNT * 4); -#endif - -#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) - memcpy(tpd_calmat, tpd_def_calmat_local, 8 * 4); - memcpy(tpd_def_calmat, tpd_def_calmat_local, 8 * 4); -#endif - - // set vendor string - tpd->dev->id.vendor = 0x00; - tpd->dev->id.product = tpd_info.pid; - tpd->dev->id.version = tpd_info.vid; - - GTP_DEBUG("end %s, %d\n", __FUNCTION__, __LINE__); - tpd_type_cap = 1; - - tpd_i2c_probe_next(i2c_client_point); - - return 0; -} - -static s8 gtp_enter_doze(struct i2c_client *client) -{ - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 8}; - - GTP_DEBUG_FUNC(); - - GTP_DEBUG("Entering gesture mode..."); - while(retry++ < 5) - { - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x46; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret < 0) - { - GTP_DEBUG("Failed to set gesture flag into 0x8046, %d", retry); - continue; - } - i2c_control_buf[0] = 0x80; - i2c_control_buf[1] = 0x40; - ret = gtp_i2c_write(client, i2c_control_buf, 3); - if (ret > 0) - { - doze_status = DOZE_ENABLED; - GTP_INFO("Gesture mode enabled."); - return ret; - } - msleep(10); - } - GTP_ERROR("GTP send gesture cmd failed."); - return ret; -} - -/******************************************************* -Function: - Eter sleep function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_enter_sleep(struct i2c_client *client) -{ -#if (GTP_COMPATIBLE_MODE && !GTP_POWER_CTRL_SLEEP) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - u8 i2c_status_buf[3] = {0x80, 0x44, 0x00}; - s32 ret = 0; - - ret = gtp_i2c_read(client, i2c_status_buf, 3); - if(ret <= 0) - { - GTP_ERROR("[gtp_enter_sleep]Read ref status reg error."); - } - - if (i2c_status_buf[2] & 0x80) - { - //Store bak ref - ret = gtp_bak_ref_proc(client, GTP_BAK_REF_STORE); - if(FAIL == ret) - { - GTP_ERROR("[gtp_enter_sleep]Store bak ref failed."); - } - } - } -#endif -#if GTP_POWER_CTRL_SLEEP - - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(10); - -#ifdef MT6573 - mt_set_gpio_mode(GPIO_CTP_EN_PIN, GPIO_CTP_EN_PIN_M_GPIO); - mt_set_gpio_dir(GPIO_CTP_EN_PIN, GPIO_DIR_OUT); - mt_set_gpio_out(GPIO_CTP_EN_PIN, GPIO_OUT_ZERO); - msleep(30); -#else // ( defined(MT6575) || defined(MT6577) || defined(MT6589) ) - - #ifdef TPD_POWER_SOURCE_1800 - hwPowerDown(TPD_POWER_SOURCE_1800, "TP"); - #endif - - #ifdef TPD_POWER_SOURCE_CUSTOM - hwPowerDown(TPD_POWER_SOURCE_CUSTOM, "TP"); - #else - hwPowerDown(MT65XX_POWER_LDO_VGP2, "TP"); - #endif -#endif - - GTP_INFO("GTP enter sleep by poweroff!"); - return 0; - -#else - { - s8 ret = -1; - s8 retry = 0; - u8 i2c_control_buf[3] = {(u8)(GTP_REG_SLEEP >> 8), (u8)GTP_REG_SLEEP, 5}; - - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - msleep(5); - - while (retry++ < 5) - { - ret = gtp_i2c_write(client, i2c_control_buf, 3); - - if (ret > 0) - { - GTP_INFO("GTP enter sleep!"); - - return ret; - } - - msleep(10); - } - - GTP_ERROR("GTP send sleep cmd failed."); - return ret; - } -#endif -} - -/******************************************************* -Function: - Wakeup from sleep mode Function. - -Input: - client:i2c_client. - -Output: - Executive outcomes.0--success,non-0--fail. -*******************************************************/ -static s8 gtp_wakeup_sleep(struct i2c_client *client) -{ - u8 retry = 0; - s8 ret = -1; - - GTP_DEBUG("GTP wakeup begin."); - -#if GTP_POWER_CTRL_SLEEP - #if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - power_is_down = 0; - little_fw_mode = 1; - kthread_run(gtp_resume_timeout, (void*)NULL, "resume_timeout"); - - ret = force_reset_guitar(1); - if (FAIL == ret) - { - little_fw_mode = 0; - gtp_recovery_reset(client); - } - if (!gtp_check_fw()) { - little_fw_mode = 0; - gtp_recovery_reset(client); - } - return 0; - } - #endif // end compatible mode & fl little system - - while (retry++ < 5) - { - ret = tpd_power_on(client); - - if (ret < 0) - { - GTP_ERROR("I2C Power on ERROR!"); - continue; - } - GTP_INFO("Ic wakeup by poweron"); - return 0; - } -#else // esle PowerCtrlSleep - while (retry++ < 5) { - //#if GTP_GESTURE_WAKEUP - if(gesture_value > 0){ - if (DOZE_WAKEUP != doze_status) - { - GTP_INFO("Powerkey wakeup."); - } - else - { - GTP_INFO("Gesture wakeup."); - } - doze_status = DOZE_DISABLED; - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_reset_guitar(client, 20); - ret = gup_reload_fw_dsp(NULL, GTP_FL_READ_REPAIR); - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - if (ret == FAIL) { - GTP_ERROR("[gtp_wakeup_sleep]Reload dsp code failed."); - continue; - } - ret = gtp_fw_startup(client); - if (ret == FAIL) { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - if (!gtp_check_fw()) { - gtp_recovery_reset(client); - } - return 0; // succeed - //#else // else gesture wakeup - }else{ - GTP_GPIO_OUTPUT(GTP_INT_PORT, 1); //wake up by int gpio - msleep(5); - - #if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) { - u8 opr_buf[2] = {0}; - - ret = gtp_i2c_test(client); - if (ret >= 0) { - // Hold ss51 & dsp - opr_buf[0] = 0x0C; - ret = i2c_write_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // Confirm hold - opr_buf[0] = 0x00; - ret = i2c_read_bytes(client, 0x4180, opr_buf, 1); - if (ret < 0) { - GTP_DEBUG("confirm ss51 & dsp hold, I2C error,retry:%d", retry); - continue; - } - if (0x0C != opr_buf[0]) { - GTP_DEBUG("ss51 & dsp not hold, val: %d, retry: %d", opr_buf[0], retry); - continue; - } - GTP_DEBUG("ss51 & dsp has been hold"); - - ret = gtp_fw_startup(client); - if (FAIL == ret) { - GTP_ERROR("[gtp_wakeup_sleep]Startup fw failed."); - continue; - } - GTP_INFO("flashless wakeup sleep success"); - return ret; - } - force_reset_guitar(0); - retry = 0; - break; - } - //#endif // end compatible mode - } - ret = gtp_i2c_test(client); - if (ret >= 0) - { - GTP_INFO("GTP wakeup sleep."); - //#if (!GTP_GESTURE_WAKEUP) - if(!(gesture_value > 0)) - { - gtp_int_sync(25); - } - //#endif - return ret; - } - gtp_reset_guitar(client, 20); - #endif // end gesture wakeup - } - - if (retry >= 5) { - GTP_ERROR("wakeup retry timeout, process esd reset"); - force_reset_guitar(0); - } -#endif // end PowerCtrlSleep - GTP_ERROR("GTP wakeup sleep failed."); - return ret; -} - -/* Function to manage low power suspend */ -static void tpd_suspend(struct early_suspend *h) -{ - s32 ret = -1; - - GTP_INFO("System suspend."); - -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif -#if (GTP_COMPATIBLE_MODE && GTP_FL_LITTLE_SYSTEM) - little_fw_mode = 0; - power_is_down = 1; -#endif - - tpd_halt = 1; -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif -//#if GTP_GESTURE_WAKEUP -if(gesture_value > 0){ - ret = gtp_enter_doze(i2c_client_point); -//#else -}else{ - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - ret = gtp_enter_sleep(i2c_client_point); -//#endif -} - if (ret < 0) - { - GTP_ERROR("GTP early suspend failed."); - } - // to avoid waking up while not sleeping, delay 48 + 10ms to ensure reliability - msleep(58); -} - -/* Function to manage power-on resume */ -static void tpd_resume(struct early_suspend *h) -{ - s32 ret = -1; - - GTP_INFO("System resume."); - -#ifdef TPD_PROXIMITY - - if (tpd_proximity_flag == 1) - { - return ; - } - -#endif - tpd_sleep_flag = 0; - ret = gtp_wakeup_sleep(i2c_client_point); - - if (ret < 0) - { - GTP_ERROR("GTP later resume failed."); - } - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - // do nothing - } - else -#endif - { - gtp_send_cfg(i2c_client_point); - } - -#if GTP_CHARGER_SWITCH - gtp_charger_switch(1); // force update -#endif - - tpd_halt = 0; -//#if GTP_GESTURE_WAKEUP -if(gesture_value > 0){ - doze_status = DOZE_DISABLED; -//#else -}else{ - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); -//#endif -} - -#if GTP_ESD_PROTECT - gtp_init_ext_watchdog(i2c_client_point); - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -} - -static struct tpd_driver_t tpd_device_driver = -{ - .tpd_device_name = "gt9xx", - .tpd_local_init = tpd_local_init, - .suspend = tpd_suspend, - .resume = tpd_resume, -#ifdef TPD_HAVE_BUTTON - .tpd_have_button = 1, -#else - .tpd_have_button = 0, -#endif -}; - -/* called when loaded into kernel */ -static int __init tpd_driver_init(void) -{ - if(g_boot_mode == KERNEL_POWER_OFF_CHARGING_BOOT || g_boot_mode == LOW_POWER_OFF_CHARGING_BOOT) //add by zero - return 0; - GTP_INFO("MediaTek gt91xx touch panel driver init\n"); -#ifdef I2C_BUS_NUMBER - i2c_register_board_info(I2C_BUS_NUMBER, &i2c_tpd, 1); -#else - i2c_register_board_info(0, &i2c_tpd, 1); -#endif - if (tpd_driver_add(&tpd_device_driver) < 0) - GTP_INFO("add generic driver failed\n"); - - return 0; -} - -/* should never be called */ -static void __exit tpd_driver_exit(void) -{ - GTP_INFO("MediaTek gt91xx touch panel driver exit\n"); - tpd_driver_remove(&tpd_device_driver); -} - -module_init(tpd_driver_init); -module_exit(tpd_driver_exit); - diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_firmware.h b/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_firmware.h deleted file mode 100644 index be635126908..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_firmware.h +++ /dev/null @@ -1,2493 +0,0 @@ -/* Copyright Statement: -*This firmware are protected under relevant copyright laws,this information contained -*herein is confidential and proprietary to Goodix. -* -*GOODIX (C) 2013. All rights reserved. -* -*WARNING:The GTP_COMPATIBLE_MODE part of this file was generated by the specialized tools, -*please do not modify it manually! -* -*/ - - -#ifndef _GT9XX_FIRMWARE_H_ -#define _GT9XX_FIRMWARE_H_ - -#if GTP_HEADER_FW_UPDATE -unsigned char gtp_default_FW[] = -{ - //TODO:Puts your update firmware data here! -}; -#endif - -/* -*[HW INFO]00900600 -*[PID]910 -*[VID]1020 -*[GENERATED]2013/09/06 10:03:05 -*/ -#if GTP_COMPATIBLE_MODE -unsigned char gtp_default_FW_fl[] = { - 0x00,0x90,0x06,0x00,0x39,0x31,0x32,0x00,0x00,0x00,0x00,0x00,0x10,0x40,0x80,0x00,0x55,0x40,0xDF,0x4C, - 0x6F,0x00,0x90,0x21,0x40,0xCD,0x53,0x57,0x3F,0x6F,0x88,0xC8,0x62,0x41,0xE8,0x16,0x18,0x2E,0xFC,0x17, - 0x40,0x21,0x1C,0xB0,0x2E,0x24,0x01,0x1D,0x05,0x22,0x41,0xE1,0xD7,0xAF,0xF5,0x06,0x73,0xCF,0x25,0x47, - 0x32,0xBB,0x09,0x0C,0xA7,0x40,0xE9,0x17,0x9C,0xA8,0xE3,0x33,0xC9,0x0C,0xF9,0x37,0x90,0x6E,0xE8,0x44, - 0x87,0x14,0x94,0x88,0x92,0x54,0x94,0xE5,0xC4,0xD5,0x32,0xA4,0x16,0x74,0xB0,0x58,0xA4,0xAA,0x4A,0x27, - 0x26,0x49,0x01,0x52,0xE4,0x08,0x13,0x07,0x00,0x09,0xE9,0x41,0xB1,0x63,0x9F,0xE4,0xF4,0x22,0x31,0x63, - 0x93,0x4B,0x6B,0x55,0xD0,0xC9,0x06,0xB9,0x3B,0x48,0x0D,0xA6,0xB9,0x3C,0xB5,0xE3,0x8B,0x4F,0xBF,0xA9, - 0xD0,0x07,0xD2,0xAC,0x08,0x48,0x7D,0xEE,0xF9,0x4D,0x13,0xF7,0xAB,0x4C,0x98,0x3C,0xFB,0x6E,0x0A,0x18, - 0x09,0x49,0xAA,0x81,0xB8,0xAE,0x63,0xE8,0x05,0xC8,0xE2,0xBE,0x5A,0xAD,0xDE,0x9E,0x88,0x0A,0xFB,0x2A, - 0x3B,0x2C,0x06,0x5B,0x46,0x2F,0xDB,0x3A,0xBB,0xEA,0x9E,0x74,0x89,0x0B,0x81,0x99,0x1B,0x03,0x18,0x73, - 0x44,0x28,0xE3,0xBF,0xDC,0x38,0x1B,0x47,0xED,0xD7,0x72,0x3F,0x30,0x63,0xD6,0x98,0x02,0x03,0xF4,0xB0, - 0x09,0x6A,0x19,0xA1,0xF4,0x4F,0x93,0xB0,0xBC,0x2B,0x10,0x65,0x78,0x36,0x3D,0xF8,0x55,0xE8,0x31,0xB4, - 0xE7,0x75,0xA3,0x4F,0x91,0x23,0x33,0x6B,0x97,0x43,0xF3,0x31,0x7B,0x75,0x94,0xC1,0xFC,0x68,0xEB,0x8D, - 0x3A,0x34,0xA3,0x1F,0x34,0x44,0xE1,0x95,0x37,0x20,0x04,0x80,0x78,0xF8,0x43,0xE6,0xD2,0xB8,0x10,0x27, - 0x41,0xC7,0x12,0x54,0x34,0x7F,0xDE,0xB0,0x26,0xE9,0xB4,0xE4,0x7A,0x38,0x4C,0xC3,0x79,0xDB,0xFC,0xF5, - 0x39,0xFA,0x4F,0x28,0x82,0x11,0x84,0x07,0x5E,0x7A,0xA1,0x5E,0xA3,0xA1,0xF5,0xE4,0xB4,0x7D,0x02,0x1D, - 0x24,0xE6,0x8E,0x17,0x31,0xC1,0xDA,0x4F,0x00,0x35,0x1A,0x57,0x73,0x5B,0x64,0x5D,0x83,0x9D,0x1E,0x84, - 0xB0,0x30,0x1C,0x82,0x21,0xA7,0x8D,0xCC,0xD5,0x79,0x15,0x38,0x33,0x5A,0xD4,0xD8,0x35,0x77,0x22,0x9C, - 0xC2,0xDF,0xE4,0x24,0x2D,0x6E,0xDE,0xA1,0xA6,0x32,0x31,0xA7,0xF1,0xC6,0x43,0x83,0x8A,0x5B,0x01,0x63, - 0xA0,0x13,0x14,0xED,0xC0,0x77,0x1F,0x3C,0x39,0xD8,0x75,0x19,0x47,0x15,0xC8,0x13,0x52,0x32,0xC6,0x75, - 0x1C,0x1E,0xDC,0xF0,0x9B,0x3E,0xA2,0xC8,0x60,0x88,0x94,0x4E,0x7E,0x72,0x04,0x12,0x08,0xE9,0xF6,0x1E, - 0xB9,0xCB,0x26,0xD8,0xD9,0x51,0x1B,0x43,0x8E,0x3B,0x27,0x14,0x09,0x01,0x71,0xC9,0xDB,0xA6,0xB8,0x79, - 0x69,0xFB,0x3A,0xCD,0xA0,0x71,0x6F,0x9B,0xF7,0x16,0xB7,0x2F,0xF8,0x19,0x6E,0xCB,0x67,0x3E,0xC0,0x1E, - 0x18,0x84,0xBE,0x34,0xA2,0xE7,0xF8,0x2E,0x20,0xD3,0x92,0xDA,0xE8,0x58,0xE8,0x6A,0x38,0x19,0x47,0x35, - 0x6B,0x5F,0xEE,0x6E,0x9A,0xB7,0x07,0xD2,0xCC,0xF0,0xE8,0x0A,0x9A,0x66,0xCD,0x31,0x2A,0xA5,0x99,0x11, - 0x99,0x38,0x18,0x8B,0xA9,0xAE,0xEF,0x3D,0xA6,0x65,0x16,0xD9,0xDC,0x3B,0x48,0xBD,0xF3,0x7D,0xC6,0xBE, - 0x29,0x57,0x4D,0x1B,0xC8,0x5A,0x20,0x02,0x04,0xC0,0x1B,0x64,0x57,0x7F,0x1A,0xF2,0x18,0x48,0x8A,0xC4, - 0xF8,0x60,0x28,0x12,0x05,0xC1,0xD0,0x94,0x1C,0x7C,0x3A,0xC0,0x02,0xC5,0x67,0x9B,0x53,0x0A,0xFB,0x32, - 0x84,0x82,0xD9,0x20,0xF7,0x52,0x21,0x69,0x48,0xCA,0xC9,0xA3,0xAB,0xC9,0x29,0x93,0x85,0x83,0x91,0x47, - 0x91,0xAC,0x3D,0x67,0x22,0x3D,0x40,0xC6,0x67,0x73,0xBF,0x01,0x39,0x17,0x86,0xB0,0x94,0xA0,0x72,0x72, - 0xE1,0xC0,0x2B,0xD1,0x29,0x39,0x2B,0xAE,0xE5,0x7E,0x12,0xD4,0x97,0xA2,0xFA,0x32,0x0F,0xDE,0x25,0x3E, - 0x51,0xFE,0x3E,0xBC,0x80,0x7D,0x2D,0x25,0xA5,0xA2,0xF4,0x1C,0x49,0x40,0xAA,0x65,0xAD,0x48,0xDD,0xBE, - 0xDB,0x0A,0xD1,0xA4,0x88,0xAC,0xA4,0x83,0x83,0x88,0xF9,0x8B,0x21,0x1C,0x22,0x0A,0x0C,0xC8,0x98,0x8C, - 0x94,0xF9,0x08,0x28,0x50,0xE8,0x5A,0x04,0xDE,0xE0,0x2A,0x1A,0x0D,0xC9,0xF0,0xE1,0xBE,0xEB,0x2A,0x7A, - 0xCD,0xCF,0x12,0x00,0xDA,0x9C,0x23,0x8A,0x8C,0x8A,0xDB,0x8D,0x14,0xF2,0xB3,0x3B,0xDC,0xC8,0x4B,0xDF, - 0xD4,0xE5,0xF5,0x21,0x8D,0x8B,0xF1,0x28,0x1F,0xAF,0xFC,0xE5,0x2C,0x10,0x53,0x05,0x5F,0xC3,0x1D,0xCE, - 0x71,0x1E,0x63,0xA6,0xD4,0x61,0x2B,0x87,0xEB,0x4C,0xA6,0x96,0xDE,0x57,0xB7,0x47,0xEE,0x32,0x78,0xAD, - 0x00,0xB6,0x50,0xAA,0xEC,0xD6,0xA3,0x7E,0xDD,0xE9,0xB8,0xF5,0xF1,0x97,0x4F,0xCA,0xAD,0xAA,0x2A,0x48, - 0x69,0x83,0x05,0x82,0xFE,0xAC,0xAB,0xA6,0xDD,0x89,0x8B,0xAB,0x9F,0xBF,0xB5,0x9D,0x4D,0xCB,0x63,0x1D, - 0x9C,0x1D,0x7D,0xD7,0xB6,0x99,0xC4,0x85,0x35,0x3B,0xCD,0xD0,0xEA,0xB5,0x4F,0x22,0x4B,0x8B,0xD6,0x58, - 0xDE,0x3A,0xA2,0x74,0x99,0x3A,0x15,0xE1,0xE1,0xCD,0xCE,0x4B,0xFC,0x8A,0xA7,0x6B,0x5B,0x1F,0x2B,0x65, - 0x18,0x39,0x4C,0xD1,0x6A,0xB7,0x25,0xE1,0xCE,0x29,0x1D,0x2D,0xCE,0xE8,0x61,0x75,0x19,0x33,0x94,0xE0, - 0x69,0x8F,0xE4,0x4E,0x0A,0xB1,0xBB,0x9A,0x19,0x1F,0x24,0x72,0xDD,0x6E,0x7C,0xE7,0x0D,0x8D,0x2E,0xE7, - 0x45,0xA2,0x2F,0x56,0x54,0x52,0xCC,0x64,0x96,0x39,0x24,0xF7,0x04,0x55,0xBC,0x1E,0x4F,0xB8,0x5F,0x38, - 0xA0,0x6D,0xBB,0x1F,0x37,0xB0,0xA2,0x0B,0x56,0x9B,0x2F,0xE5,0xD6,0x74,0x0D,0xD1,0xFE,0x9A,0xA7,0xCA, - 0x96,0xA7,0x85,0x1B,0x43,0x9A,0x02,0x1F,0xC7,0xBA,0x51,0x7B,0x5F,0x9D,0xDE,0x0A,0x0A,0xE4,0x4E,0x8D, - 0xFD,0x74,0x69,0x36,0x9D,0xE3,0x0B,0x9A,0x46,0xBD,0x3F,0x1A,0x06,0xB2,0x9A,0xF4,0xB2,0xE4,0x16,0x97, - 0xFA,0x1B,0x79,0x63,0x93,0x31,0x0F,0xB0,0xBA,0x41,0x97,0xE1,0x79,0x76,0x05,0x49,0xEE,0xB5,0xD0,0x9F, - 0xAD,0xEC,0x08,0x6A,0x3F,0xBF,0xD4,0xCC,0x6D,0x0C,0x17,0x32,0x78,0x5B,0xA2,0x4F,0x6D,0x6F,0xDE,0x1E, - 0x9D,0x1D,0x34,0x8A,0x3E,0x5E,0x61,0x08,0x9F,0xE7,0x4E,0x3A,0x8E,0xFF,0x02,0xAD,0x68,0xA6,0x26,0xE7, - 0x04,0xFE,0x04,0x7C,0xFF,0x24,0xA3,0x4D,0xF0,0x98,0xDF,0x30,0x62,0x24,0x6F,0xF7,0x8E,0x9E,0xE2,0x09, - 0xCD,0xA8,0x8F,0xF6,0x0E,0xF3,0x8B,0x49,0x5E,0xAD,0xA4,0xF9,0xED,0x74,0xC7,0x7A,0xF1,0x75,0xC7,0xF3, - 0x37,0x1B,0x47,0x66,0xF2,0xD9,0x06,0x42,0x5A,0x2F,0xAE,0x19,0xDD,0x96,0x4A,0xF6,0x21,0x93,0xC8,0xF2, - 0x22,0x04,0x45,0x2E,0xEE,0x5C,0x7F,0x74,0x0D,0x7A,0x37,0x77,0x7F,0x19,0x43,0xED,0xDF,0xA9,0x2F,0x55, - 0x73,0xCF,0x99,0xB5,0x39,0x61,0x8E,0xD6,0x87,0x61,0xD3,0x14,0x36,0x38,0x0F,0x53,0xDB,0x2C,0xA9,0x43, - 0x2E,0xCE,0x7E,0xE0,0xA5,0x46,0x57,0x02,0x1C,0x22,0x0E,0x82,0x0A,0xC0,0xE8,0x8C,0xD3,0x2B,0x2C,0xD4, - 0x60,0x6D,0x82,0x49,0x91,0xE2,0x38,0x72,0x34,0x48,0x20,0x53,0xF2,0x7E,0xDC,0x35,0x84,0x2C,0xE1,0xDA, - 0x33,0xAA,0x31,0xD6,0x9F,0x49,0x65,0x07,0xE1,0x4A,0x89,0xB4,0xE5,0x01,0x33,0xB7,0x3F,0xAA,0xA6,0x23, - 0x80,0xB7,0xF3,0x93,0x56,0x07,0xB7,0x48,0x40,0xD4,0xC7,0xEA,0x9A,0x2C,0x4B,0xB7,0xED,0x4B,0x05,0xEB, - 0x86,0x62,0xA9,0xF4,0x89,0x59,0xD3,0x2C,0xBE,0x32,0xA2,0x08,0x49,0x06,0x92,0x2D,0x5F,0x92,0x3C,0x57, - 0x08,0x0A,0xB1,0x6F,0xF8,0x8A,0x2B,0x24,0xFB,0x9E,0x95,0x5E,0xFA,0x9C,0x35,0xF5,0x06,0x8D,0x99,0x7B, - 0x66,0x30,0x5A,0x5F,0xAB,0x94,0x01,0x3F,0x95,0x29,0x4A,0xCD,0xAB,0x86,0xBA,0xCE,0x9A,0xDA,0x0B,0xE4, - 0xED,0x01,0x3A,0x53,0x5C,0x97,0xA5,0xBA,0x38,0x8F,0x38,0xB2,0xB8,0x48,0xDE,0x88,0x03,0x02,0x22,0x74, - 0xA6,0x22,0xB4,0xAB,0x2B,0x84,0xFB,0x9D,0xC6,0x28,0xFF,0xFB,0x82,0x44,0x1A,0x85,0xDA,0xB3,0xF3,0xA2, - 0x2F,0x9D,0xF1,0xBF,0x19,0x2B,0x3B,0x7B,0xBC,0x42,0x4B,0x62,0xEB,0xDB,0x5D,0xA9,0x85,0xA1,0x00,0x66, - 0xB2,0x34,0x2B,0xA8,0xC7,0x1C,0xEA,0x99,0xDC,0x7D,0xF4,0x8F,0x4C,0x9C,0x0F,0x34,0x65,0x6B,0x93,0x96, - 0xE3,0x55,0x47,0xB4,0x77,0xEA,0x7B,0xF5,0x93,0xA0,0xDA,0xE7,0x9E,0x74,0xA2,0xE7,0xBA,0x10,0xEB,0x05, - 0x8F,0xFB,0xF2,0x15,0xCE,0x57,0xED,0x97,0xCD,0x3E,0x6B,0xD3,0x63,0xB4,0xBF,0x31,0xFF,0xFB,0xB9,0xFF, - 0x15,0x56,0xA4,0x72,0xD2,0x3B,0x94,0x14,0xF1,0x16,0x14,0x61,0xFE,0x79,0xF6,0x3F,0x10,0xD4,0x92,0x36, - 0xB3,0xB0,0x22,0x74,0x42,0x1E,0xA2,0xD9,0x9A,0x44,0x9A,0x75,0x91,0xB3,0xA5,0xC7,0x16,0x3B,0x87,0xD4, - 0xE4,0xAC,0xAB,0xC9,0x5E,0x7B,0xF5,0xF1,0xE1,0xD7,0x32,0x57,0x55,0x78,0x04,0xC4,0x80,0xA8,0xFB,0x80, - 0x50,0xF2,0x38,0xFC,0xE0,0xF1,0xFC,0x73,0xBA,0x3C,0x1C,0x4A,0xC9,0xA7,0xA8,0x95,0xDF,0x68,0x17,0x6B, - 0x10,0xB1,0x89,0xFE,0x37,0x7F,0x54,0x45,0xCA,0x52,0x2D,0x85,0x7F,0x42,0x7F,0xBB,0x60,0x15,0x14,0xEF, - 0xC5,0x31,0xC3,0x2F,0xF0,0xA7,0xA9,0x91,0x5F,0x85,0x16,0xF9,0xB5,0x75,0x4A,0x3D,0xA7,0xFB,0x9B,0x49, - 0x16,0x54,0x73,0x3F,0xDB,0x4B,0x38,0x0C,0xCB,0xA3,0xF8,0x2E,0x99,0x59,0xAE,0x6A,0x84,0x04,0x29,0x87, - 0x4D,0x7C,0x79,0x34,0xD7,0x46,0x7A,0xBE,0x7B,0x7F,0xBC,0x11,0x07,0x32,0xA6,0x02,0x86,0xDC,0x67,0xD9, - 0x41,0x54,0x78,0x2F,0x38,0x3A,0x6F,0xAE,0xD9,0xE8,0x40,0x12,0x4F,0xDD,0x8F,0x24,0xAE,0x92,0x0F,0x68, - 0x44,0x39,0x9F,0x05,0x5B,0xD2,0xE7,0x02,0x0E,0x1C,0xA5,0x42,0x08,0x2B,0xA5,0xE0,0xF5,0xBB,0xC8,0xA0, - 0xC4,0xF8,0x2F,0x01,0x57,0xA0,0xEC,0x3D,0x04,0x01,0xD0,0xAB,0xF5,0x5E,0x31,0x50,0xBE,0x1C,0xA1,0x54, - 0xA2,0xE7,0xF8,0x0E,0x09,0xC0,0xE4,0xE1,0x69,0x09,0x09,0xDD,0x46,0xC6,0x59,0x8E,0x56,0xE6,0x0E,0xB2, - 0x05,0xC3,0x1A,0xF5,0x93,0xD8,0x60,0xF2,0x62,0x7E,0x99,0x42,0x74,0x5C,0x5A,0xE7,0x35,0xD2,0x03,0x24, - 0x55,0xAB,0x3A,0x7F,0x2E,0xC9,0xE5,0x14,0xED,0xD9,0xD0,0x00,0x29,0xE6,0x63,0xB4,0x95,0xA1,0x80,0xF0, - 0xC7,0xC1,0x32,0x05,0x67,0x41,0xEB,0xBC,0xB5,0x27,0xF3,0x4B,0x14,0x41,0x67,0x01,0xF5,0x37,0x5D,0xF4, - 0xBB,0xEC,0x23,0x11,0xDA,0x78,0xD9,0x35,0x56,0x2D,0x41,0x9B,0x89,0x88,0x67,0x95,0x37,0x18,0x81,0xAB, - 0xE5,0xAB,0x8D,0x8C,0x1D,0x4F,0x33,0xCC,0xCE,0xCC,0x09,0xDD,0x24,0x55,0x7E,0x09,0x3A,0x86,0xA2,0xB1, - 0xFC,0xA6,0x1A,0x76,0xEC,0x76,0xBD,0xBA,0x22,0x20,0x35,0xE7,0xCE,0x25,0xF9,0x0E,0x3F,0xAC,0xBE,0x49, - 0x3B,0xCC,0xCD,0x13,0xFC,0xD9,0x09,0xF3,0x13,0x44,0x03,0x31,0x1F,0xA8,0x80,0xD3,0x86,0x84,0xDB,0x3D, - 0xB4,0xE6,0x5C,0xBF,0x66,0x81,0x65,0xCC,0xF8,0x83,0xCA,0x2D,0x8C,0x9C,0xCF,0x96,0x5E,0x1D,0x50,0xFF, - 0xF8,0x01,0xD2,0x8E,0x43,0x52,0x82,0xF8,0xCF,0x3F,0x01,0x01,0x37,0xE0,0xEC,0xB4,0x2A,0x3E,0x9B,0xCD, - 0x1E,0xAB,0x3B,0x6E,0xAD,0x31,0x0C,0x15,0xB4,0xE1,0xBF,0x8B,0x2E,0x77,0x47,0x2C,0xF2,0x59,0x43,0xC9, - 0xBA,0xAF,0x84,0x01,0xF1,0x70,0x1A,0xEB,0xE6,0x90,0x9C,0xC1,0x3A,0xD2,0x54,0x15,0x25,0xDD,0x8A,0x9B, - 0xD7,0xF3,0x24,0x87,0x5A,0xF1,0x7C,0xF4,0xDE,0x40,0x44,0xC0,0x56,0xF0,0x3B,0xC5,0x57,0xFE,0x1B,0xEB, - 0x66,0xF2,0x45,0x96,0x36,0xB6,0x37,0x21,0x0A,0xFA,0xF7,0xBE,0x76,0xF1,0xED,0xF2,0xAE,0xBB,0x19,0xF5, - 0x5E,0xB0,0xC5,0x5B,0xB5,0x9C,0xDD,0x17,0xAD,0x7E,0x3D,0xFB,0x81,0xD6,0x12,0xD1,0xDF,0xBB,0x2D,0x74, - 0x81,0xCF,0x0F,0x62,0x78,0x20,0xB0,0x50,0xA7,0x0E,0x44,0xE7,0xB2,0xE4,0x25,0xE4,0x80,0xC5,0x01,0x72, - 0x79,0x91,0xBE,0xCD,0x84,0x46,0x9D,0xE0,0x4B,0xB9,0x50,0x15,0xF6,0x19,0xCD,0x09,0x5A,0xFB,0x55,0x81, - 0xA9,0xF5,0xB4,0xD5,0x52,0x48,0x87,0x1B,0x69,0x18,0x44,0x15,0x5B,0x8A,0x6A,0x08,0xAC,0x10,0xC6,0x8C, - 0x0B,0xB5,0x6F,0x84,0xCB,0xDE,0xCE,0xAC,0x38,0x5C,0x10,0xEF,0x9E,0x14,0x96,0x76,0x9D,0x76,0xB9,0x8A, - 0x25,0xC2,0xC8,0x56,0x2B,0x54,0x1F,0xDB,0xBC,0x95,0xFE,0x14,0x5B,0xDF,0x17,0x7F,0x4D,0x50,0x20,0x0F, - 0xFA,0x98,0x72,0x81,0x02,0x86,0xF6,0x04,0x58,0x44,0x2D,0x5D,0x6F,0xDF,0x28,0x59,0xCE,0x09,0x2C,0xCF, - 0x1D,0x9D,0x86,0x70,0xC4,0x31,0xDE,0xCB,0xEB,0x1D,0x8E,0x6A,0x70,0x28,0x37,0x7A,0x88,0xD0,0x8E,0xDC, - 0x68,0xB0,0x81,0x88,0x41,0xB1,0xC0,0xD3,0xDC,0xCD,0x9F,0xA9,0xED,0x6D,0x9F,0xE8,0x43,0xB1,0x49,0xD6, - 0x86,0xDD,0xC9,0xC3,0x5D,0x9B,0x31,0x39,0xA3,0x1A,0xB6,0x60,0x18,0xDA,0xBB,0x84,0xE1,0x70,0xFA,0xFD, - 0x1F,0xBE,0xDB,0x3B,0x7F,0xD8,0x98,0x8D,0xF9,0x23,0x36,0x50,0x78,0xED,0x9C,0x15,0xB9,0x51,0x2E,0x78, - 0x4C,0xA5,0x1F,0xB1,0xE6,0x4D,0x50,0xEC,0xA8,0x70,0x67,0x0A,0xF2,0xCC,0x5A,0xA3,0xFB,0xC3,0x97,0x67, - 0x6F,0x8F,0x04,0xE6,0x0A,0xEB,0xB7,0x50,0x73,0xE7,0x14,0x59,0xBE,0x01,0x36,0xFD,0x51,0xE5,0x3F,0x44, - 0x62,0xC6,0x01,0xD9,0xD1,0x92,0x9B,0x00,0x46,0xA0,0xB2,0x91,0xB3,0xDB,0x90,0xE5,0x70,0x49,0xD0,0x67, - 0x64,0x7F,0x18,0x23,0x61,0xA4,0x59,0xB2,0x15,0x5E,0x96,0x12,0x01,0x4A,0x1A,0x76,0x17,0xE8,0x95,0x7C, - 0x4A,0x85,0xD3,0x5A,0x21,0x8B,0x2F,0x48,0x40,0xC1,0xF0,0x13,0xF3,0x06,0x99,0xA2,0xA5,0xAA,0x5F,0x5C, - 0xBB,0xCD,0x99,0xF4,0x24,0x4F,0x80,0x72,0x34,0x77,0xDB,0x2A,0x0E,0x91,0xC3,0x7A,0x79,0x2C,0xA1,0xCA, - 0x3B,0x48,0xEC,0x10,0xED,0xBB,0x55,0xE7,0x0F,0x82,0xEB,0x5C,0x77,0x47,0x21,0x84,0xA2,0xF8,0x0B,0x4F, - 0x6D,0x07,0x27,0x8D,0x8E,0xBE,0xFA,0x73,0xF9,0x2E,0x05,0x4D,0x23,0x9B,0xED,0x14,0x10,0x23,0x62,0xF4, - 0xE3,0xA0,0xB5,0xBD,0xAA,0xAF,0x3D,0x5D,0xFD,0xE6,0xFD,0x58,0xD8,0x2B,0x96,0xF9,0x20,0xA3,0xA2,0xFE, - 0x55,0x21,0xD2,0x77,0x7E,0xC7,0x28,0x2A,0x7E,0x6A,0xD9,0x2B,0x7F,0x06,0x70,0xC3,0xF0,0x5C,0x64,0x54, - 0xEC,0xB8,0x90,0x61,0x7B,0x60,0x17,0x58,0xBE,0xAE,0x3C,0x0A,0xA9,0xFA,0xF4,0x58,0xF2,0x51,0xF3,0x31, - 0x7B,0xE2,0xCB,0x48,0xF3,0x2E,0x92,0xA8,0x3E,0xB0,0x4E,0xFD,0xF4,0xAE,0x5B,0x3B,0x85,0x69,0x14,0xF2, - 0xA2,0x97,0xCC,0x90,0x12,0xF1,0x4E,0x82,0x66,0x72,0xF3,0x64,0x22,0xFB,0xB6,0x70,0x25,0x38,0x23,0xFF, - 0xEC,0x35,0x22,0x15,0x17,0x8E,0x58,0x14,0xD0,0xD8,0xCB,0x63,0x93,0xC6,0x01,0x01,0x83,0x04,0x94,0x90, - 0x82,0xAD,0xEA,0x94,0x80,0x30,0x4D,0x15,0xAF,0x5E,0x0D,0x68,0xED,0x71,0xA2,0x80,0xC7,0xFC,0x8C,0x55, - 0xA1,0xF8,0x57,0x59,0x24,0x56,0x67,0xB2,0x53,0x14,0x74,0x96,0x1E,0xAB,0x2F,0x61,0x7C,0xFE,0x2A,0xE8, - 0x22,0x95,0x94,0xB6,0x3D,0x57,0xFB,0xD9,0xD0,0x18,0x63,0x71,0xF5,0x04,0x19,0xA3,0x5D,0x78,0x9D,0xF0, - 0x30,0x32,0x6F,0x44,0x15,0xDD,0x02,0x60,0x74,0x84,0xEA,0xE9,0x7B,0x06,0x09,0x05,0xED,0x36,0xB1,0x6E, - 0x16,0x15,0xBD,0xF7,0xBA,0x7A,0xD9,0x5A,0x5F,0xEE,0x5E,0x15,0x20,0x18,0xC6,0xD6,0x02,0x7B,0x9F,0x9D, - 0x08,0x3A,0x73,0x70,0xEF,0xD4,0x2D,0xEA,0xC6,0x04,0x18,0x94,0x21,0x88,0xE6,0xBE,0x39,0xD9,0xC7,0x61, - 0xA8,0x97,0xCA,0xFF,0x03,0x21,0x69,0x08,0xA0,0xCB,0x57,0x5D,0x59,0xFA,0xF0,0xF2,0x24,0xED,0x23,0x02, - 0xB8,0x7B,0x21,0x85,0xCA,0xAC,0x8C,0xBF,0x2E,0xD6,0x79,0x28,0xDF,0xB1,0xFE,0x41,0x09,0xDA,0x12,0x79, - 0x6B,0x6F,0x9C,0x12,0xD9,0x30,0xAC,0x98,0x27,0xB9,0x4A,0x9C,0x7D,0x26,0x60,0xD4,0x00,0x52,0xAC,0x29, - 0xDA,0x76,0xD6,0x0E,0x99,0xB8,0x45,0xBB,0x35,0xB8,0x6D,0x01,0x2E,0x91,0x45,0xAB,0xD2,0x78,0xDE,0xE1, - 0xC8,0xA0,0xEA,0x29,0xA7,0x2F,0xDF,0xCB,0x66,0xF9,0x99,0x15,0x31,0xB2,0xAC,0x3F,0xFC,0xB9,0x42,0x8E, - 0xF1,0x29,0xA1,0xE5,0x8E,0xA9,0xBC,0x07,0x37,0xF1,0xF3,0x30,0x03,0x8A,0xB2,0x14,0x87,0xA9,0x03,0xC2, - 0x10,0x30,0xE2,0x1D,0x3F,0x50,0x12,0x6B,0xFB,0x80,0x81,0xED,0x7D,0x53,0x79,0x9F,0xC2,0xA0,0xA7,0x1B, - 0x3F,0xA6,0xFA,0xFB,0x05,0x4E,0x2F,0xFF,0x19,0x66,0x47,0x35,0xA6,0x76,0xC7,0x30,0x74,0x4C,0x05,0x53, - 0x3E,0xA5,0xE1,0x20,0xED,0xC8,0x2A,0xAA,0x2E,0xD5,0xD0,0x86,0xF7,0x1B,0x84,0x21,0x25,0x03,0x8B,0xAC, - 0x24,0x03,0x6B,0x90,0x41,0xA7,0xE8,0x14,0x53,0xA9,0x3C,0x50,0xA4,0xD7,0xDB,0xDC,0x6D,0x2B,0xB1,0xE6, - 0xF6,0x6B,0x35,0xE2,0x95,0x15,0x96,0x20,0xFB,0x0E,0x53,0xB8,0x18,0xE5,0x28,0x00,0xFF,0xC8,0x6C,0x9F, - 0x43,0x2A,0xDD,0xCD,0xE5,0x4B,0x35,0x06,0xF8,0xAB,0xF2,0xAB,0x3B,0xC0,0xA3,0x5E,0x00,0xE1,0x34,0xAB, - 0x9F,0x81,0xAF,0x5E,0x45,0xB2,0x1C,0x8A,0x6F,0x42,0xA2,0x92,0xBC,0x46,0xC4,0xFB,0x0C,0x95,0x9D,0x37, - 0x13,0x2C,0xB1,0x38,0xE2,0x3B,0xAB,0x5C,0xEC,0x65,0x29,0xF3,0x03,0x40,0x49,0x69,0x5F,0xEB,0x7B,0x06, - 0x26,0x8F,0xA8,0x4C,0xAD,0x87,0x42,0xD8,0x8E,0x84,0xA6,0x16,0x1F,0x9F,0x52,0xA7,0x7D,0x6A,0x30,0xE6, - 0x7D,0xCC,0x55,0x9D,0xCD,0x8D,0xA8,0x5E,0x19,0x8F,0x96,0xE5,0x4C,0xDF,0xBB,0x2A,0x7C,0x2E,0xE7,0xBA, - 0xBA,0x71,0x5C,0x7F,0x96,0xEC,0xC9,0x94,0x27,0x9F,0x31,0x87,0x4A,0x23,0x63,0xAB,0x6E,0x20,0xAD,0x9F, - 0x91,0xB4,0x6B,0x4F,0x9A,0xD4,0x9B,0x7D,0x86,0xE2,0x2C,0x86,0x0C,0x3A,0xB8,0x06,0x5F,0xBF,0x32,0x9B, - 0xE4,0xA7,0xA7,0xDF,0x57,0xF2,0xE8,0xBA,0xC4,0x9E,0xC6,0x65,0xB1,0x1C,0x65,0x21,0x80,0x2E,0x78,0x16, - 0x9C,0xE0,0x7F,0x4B,0x9C,0xD0,0xA7,0xEC,0x54,0x33,0x33,0x8A,0xEC,0xB6,0xEF,0x5C,0x8C,0xB0,0x10,0xA2, - 0x04,0x32,0xD5,0x27,0x6B,0xF1,0xD1,0xC0,0xC7,0x25,0xC5,0x33,0xF3,0xD8,0x72,0xEA,0x20,0xF6,0x3E,0x6C, - 0xB1,0x75,0xA6,0x91,0x0C,0x5D,0x0B,0x21,0x9F,0xFD,0x7E,0x1A,0x21,0xF7,0xE6,0xD7,0x94,0xB1,0x66,0xF0, - 0xF5,0xDF,0xE2,0x2B,0xE5,0xFD,0x35,0xA1,0x4D,0x87,0x85,0xC5,0xFF,0xBB,0x55,0x09,0x0F,0xD9,0x12,0x17, - 0x76,0xE9,0x7C,0xB1,0x58,0x3A,0xEF,0xA5,0x84,0x51,0xF8,0x80,0xD3,0xBB,0xFB,0x85,0x08,0xB5,0x1E,0xBA, - 0xDB,0x37,0xE2,0x5E,0x3A,0xFA,0x6C,0xA8,0xDF,0x71,0xEC,0xAF,0xDF,0x48,0xEE,0x1B,0x6E,0xDB,0xBB,0xED, - 0x05,0xD7,0x00,0x1B,0x4D,0x34,0xFE,0x83,0x96,0xBD,0x87,0xF9,0xCE,0xDD,0x18,0x74,0x74,0x33,0xA0,0x21, - 0xED,0x70,0x77,0x2A,0x0D,0x71,0xEF,0xE4,0x46,0x0A,0xC9,0xEE,0xBC,0xFB,0x77,0x53,0x7D,0x16,0xE5,0x9D, - 0xFB,0xD9,0x75,0x0D,0xF0,0x96,0x1C,0xEE,0x5A,0x4C,0x2F,0xE8,0xA8,0xD6,0x29,0x4D,0x4D,0x38,0x1C,0x0F, - 0x8E,0x32,0x33,0x66,0x44,0x33,0xBE,0x7F,0x88,0xD5,0xC6,0x01,0x5E,0xBD,0xE7,0xAA,0xF6,0x98,0x3C,0x7D, - 0xC1,0x57,0xF3,0xCB,0x8A,0x7C,0x75,0x6D,0x1C,0x14,0x7A,0xA4,0x8E,0x0F,0xB4,0x40,0xB9,0xA4,0xFF,0xE4, - 0xDB,0xD9,0xC5,0x09,0xCC,0xFB,0xBA,0xFB,0x8F,0xAD,0x21,0x03,0xE1,0x7F,0xCF,0x83,0xC0,0x20,0xF0,0x3C, - 0x87,0x0B,0x71,0x61,0x6B,0x17,0xA6,0x12,0x80,0xBD,0xBF,0x46,0x60,0x61,0xA9,0xD6,0x8C,0xF5,0xD3,0x9A, - 0xE3,0x06,0xBB,0x82,0x3C,0x3E,0x48,0xA6,0x84,0x59,0x2E,0x3E,0x73,0xE7,0x01,0x90,0x7C,0x82,0xA7,0x12, - 0x40,0x2C,0xDB,0x15,0x2C,0x73,0xE1,0x07,0xE1,0xBF,0x7A,0x07,0xDC,0xFB,0xF2,0x1B,0xDB,0x2B,0xA5,0x9E, - 0x56,0x79,0x2D,0x79,0xC1,0xC9,0x4F,0xC6,0x8E,0x88,0xF2,0xEC,0xE0,0x78,0x26,0x92,0x53,0x08,0x81,0xFC, - 0xAE,0x94,0x7B,0xDF,0x75,0x44,0x52,0x1E,0xA8,0xF9,0x47,0x67,0x71,0x0B,0xEB,0x8E,0x65,0x27,0x2E,0xAA, - 0x62,0x91,0xFB,0x6C,0x46,0x84,0xC9,0x02,0x4F,0x16,0x26,0x0B,0xFD,0xB8,0x82,0x8C,0x4A,0x08,0x36,0x46, - 0xD1,0x6C,0xE8,0x20,0x97,0x17,0xB5,0xCE,0xB8,0xB9,0x88,0xDE,0x21,0x12,0xA1,0xC3,0xA0,0xF7,0xE2,0x30, - 0x96,0x16,0x1F,0x82,0x59,0x58,0xC3,0x88,0xC2,0x02,0xAA,0x57,0x51,0x4E,0x33,0x7D,0x25,0x7A,0x68,0x09, - 0x2A,0x6A,0x2A,0xED,0xCB,0x0D,0x35,0x1F,0xC1,0x1F,0x3B,0x85,0x59,0x0F,0x24,0x26,0x7A,0xEF,0x39,0x4A, - 0x06,0x4E,0xBA,0xB7,0xFB,0xBF,0x2C,0x6F,0xF3,0x2A,0xED,0xC9,0xA1,0xF1,0xCC,0x1F,0xEA,0xFB,0xCB,0xAD, - 0x9F,0x2D,0xBE,0x5C,0xF8,0x3A,0xF7,0xFC,0x94,0xCD,0x44,0xDF,0xA8,0xA0,0xB8,0x69,0xF1,0x21,0x2D,0x8B, - 0x66,0x73,0x07,0x97,0x43,0x0D,0xB4,0x2B,0x5D,0xD0,0x74,0x60,0x64,0xF2,0x5F,0xF8,0x22,0x0B,0x3E,0x16, - 0x4D,0x67,0xBE,0x7F,0xAD,0x96,0xAF,0x66,0x9C,0x2C,0x6C,0x87,0xBF,0x0F,0xA9,0xD6,0xA5,0xCF,0xA0,0x02, - 0x31,0x19,0xA2,0x93,0xE0,0xCF,0xBD,0xB7,0xC0,0x34,0xE4,0xCA,0xB1,0x70,0x15,0x41,0xB8,0xEF,0xAB,0x83, - 0x21,0xAE,0x35,0xD1,0x78,0x16,0x05,0xDE,0x43,0xDD,0xDB,0x31,0x89,0x90,0x34,0x4B,0x00,0x37,0xE7,0xB9, - 0x3E,0x0C,0x75,0x2D,0x06,0xC6,0x3C,0xE7,0x83,0x55,0xA1,0x3E,0x6E,0x9A,0x7D,0x06,0x8B,0x5B,0xFD,0x41, - 0xE3,0x76,0x49,0xA7,0x39,0x54,0x31,0xA6,0xEA,0x6A,0xFB,0x12,0x83,0xC9,0x3D,0x9E,0xE9,0x7D,0x0D,0xD5, - 0x6E,0x19,0xBD,0x13,0x53,0xEA,0x54,0x07,0xC6,0x4B,0x3B,0xF0,0x6C,0xEB,0xB8,0x2F,0xEF,0x7A,0xF7,0x8F, - 0x08,0x22,0xF8,0x13,0x03,0xC6,0x5C,0x8E,0x6D,0xC8,0x66,0x3A,0x67,0x15,0x6B,0x87,0xBC,0x6C,0x36,0x60, - 0xF0,0x1C,0xEE,0x5D,0xDB,0x68,0xFE,0x65,0xDE,0x5B,0x76,0x94,0xE6,0x06,0xE6,0xB0,0xB6,0x06,0x4A,0x47, - 0x78,0x99,0x5E,0x1F,0x4F,0xC1,0x23,0xFF,0x36,0x5F,0xB6,0xAE,0x49,0x3F,0x28,0x90,0x07,0xC7,0xCB,0xFF, - 0xAF,0x00,0xAF,0xC7,0x29,0x34,0x3F,0xE1,0x69,0x15,0xFE,0x7D,0xBD,0xD5,0x38,0x2A,0x32,0x71,0x66,0xE8, - 0x88,0x3C,0x2D,0x83,0xBE,0x53,0xED,0x62,0x89,0x61,0xEF,0xDF,0xCA,0x7B,0x3F,0xDC,0x43,0xA0,0x26,0x83, - 0x8B,0xCC,0xA6,0x32,0x9A,0xC1,0x02,0xED,0x32,0x5A,0xEB,0x66,0xBA,0x04,0x65,0xD1,0x19,0x0A,0xB2,0x07, - 0xA6,0xD0,0x31,0x3B,0xC8,0x3F,0x6A,0x3F,0x7B,0xC3,0x24,0x97,0x3F,0x50,0x22,0x8F,0x2A,0x20,0x52,0xD7, - 0xA5,0x9B,0x00,0x08,0x98,0x2D,0x13,0x25,0xA9,0xF0,0x4F,0x1D,0xF7,0xA1,0x92,0x72,0x59,0x9A,0x47,0xFD, - 0xE4,0xFE,0x18,0x96,0xE8,0xF1,0xC0,0x3E,0xA8,0x10,0x82,0xF5,0xB7,0x66,0x45,0x20,0x73,0xB2,0x49,0x04, - 0x1B,0x9D,0x8B,0x7D,0x67,0x49,0x8A,0x67,0xA4,0xD3,0x9C,0xF5,0x6C,0xDC,0xC3,0x3B,0x1A,0x9C,0x46,0x49, - 0xFB,0x3C,0xF0,0x11,0xA5,0x9B,0x34,0xB8,0xCF,0xC7,0x65,0x91,0xC2,0x69,0x76,0x1C,0xC8,0x7B,0x46,0xB0, - 0xB4,0x28,0xC6,0x50,0x39,0x09,0x41,0x90,0xAE,0xCA,0x91,0x14,0xB6,0xD9,0xD5,0x21,0xB6,0x89,0xCE,0x1D, - 0xB8,0x3A,0xD5,0xCF,0x2D,0xA2,0xCC,0xE9,0x6D,0x16,0xC9,0xC2,0x03,0x8C,0x49,0xD8,0x6E,0xF1,0xCD,0x91, - 0xE3,0xCD,0x00,0x05,0x06,0x98,0x7B,0x0C,0xE9,0xE4,0x32,0x05,0x98,0xFC,0x12,0xC2,0xE1,0xF8,0x89,0x8B, - 0xAF,0x35,0xA8,0x3E,0xEC,0x92,0x1E,0x54,0xD4,0xED,0x1A,0xDA,0xDD,0x8D,0xBC,0xC4,0xA8,0x5F,0x41,0x0E, - 0x8F,0xCA,0x07,0x75,0x2B,0xA7,0xCB,0x23,0x13,0x95,0xD4,0x55,0x4E,0xE2,0x8B,0xED,0xBE,0xED,0x82,0x45, - 0x54,0xCF,0x18,0x3C,0x60,0xFB,0x40,0x22,0x16,0xE4,0xE2,0xDB,0x82,0x81,0xD9,0xC5,0xF7,0xE8,0x77,0x01, - 0x26,0x88,0x62,0x9F,0xFD,0xEE,0x6E,0x56,0x97,0xC9,0x4A,0x20,0x81,0x72,0x02,0x5E,0xF1,0x12,0x2E,0x80, - 0xA6,0x8E,0x32,0xA9,0xAA,0xF9,0x82,0x0F,0xCE,0x01,0x5A,0x9D,0xDE,0x0B,0x4C,0x52,0x21,0x33,0xCA,0x5C, - 0x2E,0x20,0xD4,0xD1,0x64,0x32,0x7E,0x10,0xA7,0x8B,0x84,0x25,0xF1,0x73,0x24,0x7E,0xDC,0x6B,0x1B,0xE6, - 0x3C,0x60,0x14,0x4C,0xE4,0x1C,0xCC,0x40,0x50,0x9C,0xBE,0xBD,0x1C,0xC4,0xD4,0xED,0x55,0xF1,0x1C,0x54, - 0xE5,0xB2,0xC4,0xD8,0x51,0xBD,0xAE,0x7B,0x06,0x29,0x2E,0xE7,0x39,0xA6,0x15,0x71,0x64,0xEB,0xD4,0x5C, - 0xA8,0x5C,0x34,0x17,0x86,0x08,0xDF,0x87,0xB5,0xB9,0x1D,0x33,0x65,0x16,0xD3,0xCD,0xD7,0x1E,0x80,0xE6, - 0x98,0xB4,0x4F,0x9D,0xC5,0x19,0x46,0xB9,0xD6,0xDB,0xCE,0xAC,0xCD,0xB5,0x12,0xD4,0xCE,0xF1,0xAD,0xA9, - 0x4B,0x4A,0x57,0x5A,0x0F,0xDA,0x45,0x68,0x72,0xFA,0x25,0xB0,0x22,0xA7,0x9D,0x88,0x0D,0xAD,0xD0,0x01, - 0x06,0x67,0x48,0x78,0x1D,0xF9,0xBC,0x20,0x2B,0x9A,0x56,0x72,0x40,0x0A,0x02,0x98,0x3B,0xD8,0xC0,0x6C, - 0xF2,0xF8,0x1C,0x62,0xA2,0x57,0xD3,0x7D,0xB8,0xC5,0x16,0xC4,0xEC,0x8E,0xB3,0x08,0xB7,0x75,0x4C,0xEA, - 0x2C,0xE9,0xAE,0x5E,0xC1,0xD8,0x1E,0xDC,0xED,0x85,0xDD,0x44,0x88,0xFA,0x7E,0x9D,0x49,0xF4,0xB5,0x8B, - 0x5E,0x3A,0x17,0x81,0x6C,0x84,0x1B,0x34,0x07,0x77,0x15,0x6D,0x52,0xD9,0x3B,0xCE,0x39,0xDA,0x1F,0x1E, - 0x75,0x9F,0x01,0x2E,0x5B,0x55,0x18,0x28,0x82,0x91,0x32,0x35,0xCF,0xDF,0x44,0xD2,0xB7,0x7F,0xCF,0x74, - 0x37,0xF3,0x78,0xDC,0x9C,0x59,0xAE,0x09,0x33,0x8B,0x06,0xC8,0x98,0xE8,0xC5,0xB9,0x71,0x62,0xF7,0x0B, - 0xB6,0xA3,0x9C,0xA0,0x90,0xC1,0x0F,0x11,0x53,0x0A,0x67,0x85,0xDF,0x0E,0x17,0xD3,0x4A,0xDE,0xE7,0xCF, - 0x02,0x89,0x07,0x94,0x33,0xD0,0xC0,0x7A,0x04,0x22,0xC4,0xFE,0xFD,0x62,0x3B,0xA1,0xE7,0x8D,0xB2,0xA4, - 0x42,0x84,0x34,0x46,0xBB,0x03,0x31,0x70,0x03,0x9C,0xB6,0x3D,0x67,0x8E,0xAC,0x63,0xCD,0xED,0x74,0xA7, - 0x73,0xCC,0xFE,0xCB,0x2B,0x43,0x10,0x38,0x7B,0x66,0x2B,0xC4,0x21,0x24,0x25,0x47,0x3B,0xE1,0xB9,0x66, - 0x8F,0x9C,0x2D,0x77,0x66,0x46,0x61,0x62,0x4D,0x5F,0x0E,0x45,0x51,0x7C,0x1F,0x44,0x06,0xB4,0x8A,0x41, - 0xED,0x65,0xA8,0x68,0xA3,0x0B,0xAE,0x63,0x76,0xEF,0x4E,0xB6,0xE2,0x03,0xF0,0xCB,0x91,0xE2,0x9D,0x96, - 0x53,0x0A,0x82,0x42,0x21,0xCA,0xFC,0xA9,0xAE,0x8D,0x2D,0xC7,0x74,0x89,0xC1,0x75,0x23,0x5D,0xC0,0x5C, - 0x39,0x22,0xBF,0x14,0x20,0x01,0xB3,0x37,0x45,0x66,0xC9,0x8D,0x7B,0xBC,0x7D,0x51,0xB0,0x76,0x3D,0x8D, - 0xF3,0xD5,0xBA,0x28,0x95,0x9E,0x3C,0x2E,0xD9,0x47,0xAC,0x89,0x39,0x6C,0xF5,0xD2,0xAA,0x48,0xD0,0x1E, - 0x8B,0x68,0x62,0x6B,0xC5,0x55,0x27,0x5E,0xAE,0x0C,0xC7,0xF7,0x75,0x68,0xB8,0x7D,0x18,0x35,0xA7,0x7A, - 0x44,0xE6,0xF2,0x09,0x5A,0xAD,0x32,0x79,0xD5,0xF6,0xAD,0x31,0x1D,0x8F,0x35,0x3F,0x58,0x0A,0xA3,0xBF, - 0x3F,0x96,0xB4,0x84,0xA9,0x0A,0x2E,0xCE,0xFC,0x13,0x43,0x47,0x73,0x19,0x45,0x9F,0xDE,0xE7,0x91,0x5B, - 0x74,0x01,0xB3,0x3E,0xC9,0x6C,0x4C,0x1A,0x2B,0xDD,0x4A,0xFE,0xDB,0x4A,0xB1,0x38,0x29,0x4F,0xFB,0xD6, - 0x18,0xE9,0x4A,0x4D,0x23,0x5F,0x61,0xD1,0x31,0x0A,0x92,0x6F,0xB4,0x1E,0x91,0x31,0xEF,0x80,0x25,0x7F, - 0x2A,0xCC,0xE3,0x8E,0xA3,0x1A,0xB0,0xE2,0xD7,0x75,0xCE,0x39,0x50,0x10,0xFF,0x4E,0x44,0x64,0x86,0xA5, - 0x8F,0xFD,0xE8,0x6A,0x42,0x31,0x1C,0xF6,0x8A,0x4E,0x19,0x6F,0x92,0x64,0x3A,0xD6,0x82,0x14,0x3D,0x7E, - 0x84,0x9F,0xFA,0xF7,0x9E,0xAD,0x6D,0x61,0xAC,0xBD,0x41,0x5B,0x72,0x95,0xE9,0x6A,0xC2,0x53,0xB2,0x1A, - 0xD2,0x37,0x65,0x95,0x5F,0x8C,0xA5,0x4E,0xF5,0xC3,0xCF,0xA2,0xDD,0x7A,0x30,0x37,0xBE,0x75,0xA2,0x59, - 0xBF,0x5B,0x6F,0xBE,0x56,0xDB,0x0D,0xB6,0xE1,0x15,0xAC,0x74,0x2D,0x3A,0x64,0x0F,0xCF,0x58,0xE4,0xD0, - 0xF1,0x92,0x1C,0x59,0x07,0xE0,0xA5,0xC7,0xCB,0x3B,0xE1,0x9E,0x41,0x17,0x71,0x87,0x0D,0x13,0xDD,0x33, - 0xD4,0x33,0x94,0x51,0x97,0x31,0x3D,0x46,0x9D,0xAB,0x7F,0x05,0xF7,0x78,0xE2,0x76,0x4B,0x78,0xFF,0xF4, - 0xAA,0x79,0x6D,0x4F,0x70,0xA6,0xB4,0xDF,0x0C,0xDC,0xF4,0x90,0xD0,0xD6,0x3A,0xFE,0xC2,0x5C,0xA6,0x47, - 0x9D,0x68,0x2B,0x84,0xC4,0x1A,0xE3,0x76,0x8C,0x87,0xF9,0x8A,0x19,0xA5,0x6C,0x82,0x4B,0x1B,0x02,0x4F, - 0x18,0x85,0x0E,0xE7,0x4E,0x0B,0xB7,0x63,0x15,0x36,0x19,0x90,0x8A,0x53,0xF9,0xDF,0x4E,0x86,0x99,0x8A, - 0xD2,0x25,0x30,0xC1,0x99,0x3A,0x2E,0xCF,0x97,0x53,0x46,0x1F,0xF6,0x71,0xFC,0x21,0x1B,0xE1,0xB6,0xF8, - 0xDA,0x3B,0x66,0x7A,0x8D,0x60,0xA0,0x50,0x5F,0x01,0x74,0xA1,0x8E,0x85,0x31,0xD4,0x19,0x5B,0xC7,0x8B, - 0x11,0x3B,0xA9,0x44,0x56,0x73,0x70,0x86,0x7E,0x82,0x39,0x5E,0x18,0x5A,0x70,0x1B,0x47,0xE2,0x60,0xB2, - 0x6E,0xA2,0x8C,0xA7,0xFB,0x5D,0xB5,0x01,0xFD,0x71,0x02,0x13,0xC0,0x6F,0x4F,0x44,0xA7,0x85,0x57,0x68, - 0x2B,0x1E,0xF6,0xF4,0x11,0xE3,0x9C,0xC1,0xC9,0x80,0x7D,0xF0,0x1D,0xE7,0xF5,0xFD,0x7D,0xE1,0x87,0x2A, - 0x37,0x27,0x91,0x50,0x67,0x61,0x89,0xDC,0xF0,0xAC,0x40,0xF0,0xA1,0x4E,0xE9,0x35,0x34,0xE2,0x86,0x6F, - 0xE4,0x81,0x99,0x66,0x74,0x6B,0x46,0x2A,0x4B,0x20,0x40,0x34,0x74,0x23,0x02,0x91,0xCA,0x85,0x6E,0x59, - 0x33,0xA5,0x33,0x45,0x23,0x5E,0x96,0x50,0xF6,0x26,0x6A,0x5E,0xAC,0x81,0x7C,0x90,0x73,0xFE,0x7C,0x0B, - 0xFD,0x8A,0x9F,0x40,0x37,0xE7,0x4F,0x4B,0xAE,0xCB,0xDB,0xE2,0xD8,0x6C,0x49,0xAE,0xCA,0x3C,0x9B,0xA4, - 0x1B,0xE6,0x43,0xC3,0x25,0x68,0xEC,0x11,0x20,0xFC,0x59,0x02,0xE9,0x37,0xA4,0x26,0xF5,0xB9,0x8D,0x4A, - 0x44,0x18,0x32,0xCC,0xDE,0xEC,0x90,0xE5,0x29,0x84,0xD4,0x18,0xFC,0x2A,0x1F,0x3C,0xD9,0xAD,0xC2,0x5C, - 0x1C,0xA9,0x22,0x7D,0x7B,0x9A,0xB5,0x6D,0xFC,0x97,0x0C,0x84,0xC4,0xBA,0x20,0x4D,0x9D,0xCA,0x50,0x3C, - 0x2C,0x34,0x59,0x3B,0x93,0xC9,0x43,0x1C,0x12,0x54,0x2B,0x5D,0x50,0x89,0xDE,0xCE,0x75,0x68,0x9C,0x48, - 0xFF,0x2F,0xD6,0x4E,0x86,0x9D,0xE3,0x08,0xA5,0x3A,0xED,0xAB,0xAC,0x8C,0xB0,0xCC,0x77,0xBC,0x44,0x47, - 0x6B,0xC0,0xA0,0x7F,0xFC,0xAC,0xDC,0x6F,0x2F,0x04,0x17,0xBC,0x12,0xEF,0xD3,0x78,0xF6,0xAA,0x63,0xED, - 0xFC,0x5E,0x59,0x7F,0x0D,0x68,0x95,0x59,0x7E,0x2C,0x84,0x5C,0x6E,0xC9,0xD4,0x00,0x06,0x73,0x9B,0x74, - 0x00,0x0D,0x5B,0x6E,0x11,0xF1,0xA7,0x51,0xE0,0x5D,0x21,0x59,0x9D,0xFF,0x98,0xEC,0x86,0xF4,0x0C,0xE4, - 0x57,0x56,0xAC,0xA1,0x59,0xDE,0xDC,0xB4,0x3C,0xFC,0x5D,0xA4,0x5D,0x9D,0xFF,0xF9,0xC0,0x1D,0x67,0xA0, - 0x0F,0xB6,0x64,0x83,0x71,0x80,0x92,0x71,0x81,0x86,0xD3,0x90,0x14,0x32,0x0F,0x4C,0x1D,0x42,0xF7,0x4C, - 0x56,0xF5,0xCF,0xED,0x1F,0xC1,0x9C,0xE2,0xB4,0x73,0x0C,0xC6,0xB7,0x09,0x5D,0xC2,0x05,0x73,0xFF,0x21, - 0xA3,0x18,0x1E,0x20,0x96,0x63,0xC0,0x0C,0x7F,0xB8,0xEA,0x94,0xC8,0xB4,0x7C,0xE7,0xC5,0x7F,0x1B,0xA5, - 0x68,0xB0,0x5E,0xB8,0x1B,0x6A,0xAA,0x92,0x9E,0xFB,0x3F,0x61,0x4C,0xF3,0x7D,0x55,0x51,0xC8,0x24,0xF7, - 0xC3,0x95,0xC3,0xCB,0x9F,0xFA,0x86,0x99,0xA0,0x97,0xA6,0x75,0xDD,0x3B,0x09,0x0F,0xA6,0xD5,0x96,0x92, - 0xDD,0x72,0xEE,0x1A,0xE9,0xDB,0x2A,0x6D,0xB9,0x2D,0x00,0x58,0x1F,0x06,0xC1,0x9A,0x8A,0x9C,0x4F,0x8C, - 0x2F,0xDE,0x77,0x75,0x45,0x33,0x4C,0xD4,0x94,0x25,0x4C,0x4D,0x5D,0x70,0x6F,0x8D,0xAB,0x99,0x0B,0xBB, - 0xCB,0x14,0x80,0x8A,0x4C,0x24,0x87,0x40,0x8E,0xFB,0xF6,0x3A,0x3F,0x2D,0xDE,0x51,0xBC,0x7B,0x36,0x3F, - 0x8F,0x73,0x09,0x9D,0x06,0x9F,0x1C,0x29,0xA3,0xDC,0xB4,0xB7,0x4B,0x12,0x2A,0x09,0x49,0x9C,0xEB,0x14, - 0xDA,0x02,0x19,0xCD,0x4F,0x1D,0x1E,0xAD,0x68,0xFF,0xE0,0x18,0xCC,0x71,0x0C,0xCB,0x9D,0x0A,0x36,0x56, - 0xCC,0x60,0x4F,0xAD,0xDD,0x38,0x1F,0xF9,0xB6,0xD2,0x13,0x6C,0xCB,0xBE,0xFF,0x72,0x2E,0xDF,0xD4,0x2A, - 0x36,0x15,0x18,0x24,0xE8,0x83,0x2B,0xC6,0xFC,0x9D,0xB3,0x34,0xE0,0xAE,0x48,0xA8,0xAF,0x2B,0x0D,0x77, - 0x8B,0xA8,0xA6,0x1D,0x57,0xB2,0xED,0x72,0xBC,0xF4,0x55,0x81,0xC4,0xC1,0x2B,0xD2,0xF8,0xEF,0xE9,0xD4, - 0x73,0x22,0x98,0xE0,0xAB,0x23,0x0E,0x91,0xE7,0xFD,0x51,0x50,0xC7,0x90,0xD3,0x46,0xAD,0x6C,0xBB,0x67, - 0xA3,0xFB,0x50,0x7B,0x26,0xFF,0xDF,0xE4,0x3C,0x77,0x3C,0x0B,0x8C,0x39,0x33,0x77,0xA2,0xBA,0x11,0x54, - 0xE8,0xBE,0xF4,0x0F,0x99,0x98,0xDA,0xB2,0x3D,0x61,0x21,0x62,0x41,0x0B,0xC1,0x36,0xFF,0x59,0x08,0xF2, - 0x27,0xF9,0xCB,0x67,0x40,0x6E,0xE5,0x2E,0x59,0xF8,0xC9,0xD1,0xCB,0xA3,0x3B,0x71,0xC0,0x77,0x5F,0xF7, - 0x53,0xEF,0x5C,0xAC,0xEC,0xA3,0x25,0x0A,0xF3,0x4C,0x49,0xEF,0x82,0xEB,0x26,0x5F,0x7A,0x67,0xB0,0xE7, - 0x3A,0x0D,0x59,0xB3,0x18,0x89,0x12,0x24,0x2A,0x10,0xBC,0x15,0x6D,0xC9,0xD7,0x21,0xBB,0xAC,0x43,0x11, - 0xBD,0x68,0x2D,0xCB,0x02,0xC9,0xAD,0x05,0xFB,0x0A,0xB1,0x24,0x62,0xA8,0xDB,0x81,0x9D,0x65,0x0D,0x11, - 0x22,0x0F,0x8E,0x3F,0x27,0xCB,0xF9,0xD2,0xFD,0xA1,0x7D,0x7D,0xBB,0xD3,0x92,0xD5,0x43,0x0E,0xEA,0x3C, - 0x5B,0x63,0x70,0xE8,0xF4,0x92,0xD8,0x74,0xE4,0xF0,0x0F,0xD8,0x1D,0x2C,0x23,0x3C,0x5C,0x6C,0xD9,0x79, - 0x7D,0xB1,0x78,0xE8,0x6D,0xD3,0x80,0xBC,0xCC,0xBD,0x7B,0xC9,0xDC,0xE6,0x8B,0x40,0x4D,0x73,0x99,0x6B, - 0x6C,0x94,0xEC,0xD1,0xBC,0x4F,0x8D,0xB8,0xF9,0xEC,0x15,0x7C,0xC4,0x52,0xA4,0x6E,0x59,0xCA,0xAE,0x5F, - 0x17,0x50,0x3C,0x1D,0x43,0xD0,0x1A,0xF2,0x9E,0xAA,0x20,0x11,0x5A,0xEA,0xDC,0x0C,0x86,0x59,0x8A,0x8A, - 0x0D,0x84,0x0C,0x5E,0x49,0xDB,0xE4,0x45,0xA0,0xCF,0x26,0x15,0x18,0xB1,0xB5,0x95,0xD0,0xC1,0x67,0x69, - 0x7F,0xE8,0x8D,0x66,0xCE,0xBE,0x9D,0x77,0xB7,0x11,0xCD,0x4D,0xF1,0xC8,0xAC,0x44,0x54,0xFE,0xC4,0x40, - 0x35,0x9E,0x6A,0x40,0xA8,0xAF,0x54,0xE6,0x06,0x6F,0xB3,0x54,0x55,0xED,0x48,0x14,0x63,0x36,0x54,0x71, - 0x8A,0x56,0x18,0x0F,0xFE,0x08,0x7D,0x3F,0x0E,0x1B,0xFB,0x24,0x3F,0xB0,0x6B,0xDC,0x28,0x8D,0xE0,0x93, - 0x0D,0x1A,0x75,0x2B,0x0F,0x1A,0x19,0xDC,0x93,0x94,0x4B,0x0C,0x1C,0xFA,0xBA,0x05,0x73,0x68,0x6C,0x74, - 0x80,0x5A,0xF8,0xA4,0xD1,0x29,0xC5,0x50,0xD7,0x0D,0x90,0x28,0x20,0xFC,0xD8,0x0A,0x25,0xB4,0x07,0xEF, - 0x09,0xB9,0x1A,0x47,0x88,0xFA,0x61,0xC6,0x0F,0xA6,0x5E,0x89,0x25,0xB7,0x2B,0x1E,0xDD,0x30,0x6F,0xDA, - 0x86,0xDB,0xCE,0xAF,0x1D,0x8B,0xDD,0xE9,0x29,0x9D,0xF1,0xB4,0x50,0x0A,0xCD,0x47,0xDA,0x5F,0x33,0x55, - 0xBD,0x36,0x39,0x8F,0xF4,0xB3,0x44,0xEC,0x72,0x5C,0xC1,0x59,0x1D,0x30,0x4F,0x66,0x79,0xCE,0xDB,0x5C, - 0x55,0x35,0xF0,0xA4,0xF9,0x1D,0x9A,0x0B,0x14,0x1F,0xFE,0x78,0x3A,0x2C,0x54,0xB3,0x7C,0xB1,0x07,0x04, - 0x94,0x50,0x93,0x1A,0x9D,0xA3,0x17,0xBD,0x29,0xF5,0x8F,0x65,0xE4,0x12,0xF1,0xB0,0x79,0x3F,0x99,0xF8, - 0x02,0x4E,0x97,0x78,0x76,0xD2,0x1A,0xA7,0xEF,0x03,0x36,0x82,0x6A,0x0A,0x0A,0x92,0xF6,0x6F,0xA1,0x05, - 0x53,0x44,0x02,0xC2,0x59,0x2A,0x78,0xA7,0xB6,0x05,0xF8,0x8E,0x36,0xBE,0xE8,0x45,0x0E,0xEA,0x41,0x01, - 0xA3,0x8F,0xB7,0xA2,0x2F,0x0F,0x95,0xD3,0xCC,0xCD,0xE3,0x1A,0x1C,0x41,0xFB,0x13,0x6E,0x60,0xFD,0xB6, - 0x7E,0xE0,0x88,0xD1,0x4A,0x65,0xFC,0xDF,0x49,0x2E,0xDF,0x0D,0x93,0x59,0x8A,0xBE,0xBA,0xE6,0x5F,0x0D, - 0x9F,0x58,0x60,0x8E,0xEE,0x29,0x16,0xF2,0x6C,0x94,0xF9,0x72,0x92,0x54,0x5A,0xF6,0x39,0x9D,0x54,0xF3, - 0xA8,0x8B,0xC8,0x31,0x6D,0x77,0xB9,0xBF,0x5E,0xF7,0xC8,0x39,0xC0,0x76,0xAF,0x85,0xDA,0x63,0x6D,0x20, - 0xE2,0x05,0x41,0xF6,0x12,0x44,0x29,0x56,0xC5,0xBA,0x44,0xE8,0xB4,0xE3,0x1A,0xDA,0x50,0x27,0x87,0xAB, - 0x54,0xB9,0xA1,0x44,0x86,0x79,0xEA,0xBE,0x6F,0xDD,0x16,0x1A,0xEC,0x26,0x10,0xE1,0xE6,0xC5,0x9F,0x06, - 0x7E,0xED,0x2A,0x26,0xD8,0x88,0x72,0x2B,0xB0,0xCA,0x87,0xE2,0xAF,0x0C,0x3B,0x23,0x58,0x7B,0x0B,0xCF, - 0x80,0xEB,0xE4,0xE8,0xAC,0x70,0x95,0x7F,0x47,0x20,0x89,0x13,0xFE,0xCF,0x13,0xA3,0x58,0x0A,0x9D,0x39, - 0x3E,0xE0,0x0A,0xEA,0x9C,0xA8,0x64,0x08,0xB1,0x91,0x8B,0x02,0xCC,0xE4,0x9D,0xAB,0xAC,0xCD,0x92,0x7E, - 0x59,0xED,0xF3,0x78,0x0F,0x6D,0x48,0x08,0xD2,0x6B,0x84,0x0B,0x8A,0xA2,0xE9,0x2D,0xDD,0x59,0xA7,0x95, - 0xC8,0x3D,0x73,0x6D,0xB8,0xF5,0x55,0x73,0x6F,0x0E,0xD7,0xA0,0x99,0xB6,0x6A,0x38,0xB7,0xA1,0x7B,0xBF, - 0xF9,0x24,0x04,0x42,0x60,0x3B,0x08,0x15,0x51,0xBA,0x8E,0x59,0x17,0xD0,0x53,0x2E,0xD1,0x26,0xAB,0xAD, - 0x40,0x4A,0x6C,0x2B,0x0F,0x1C,0xBC,0x74,0x49,0x71,0xBA,0xC4,0xD2,0xE1,0xF7,0x83,0xCF,0x71,0x74,0x03, - 0xC2,0x4A,0xF5,0x1F,0x03,0xDA,0xFD,0xAF,0xD4,0xB3,0x2D,0x6A,0xA5,0xE8,0xB8,0x13,0xC3,0x99,0x28,0xB0, - 0x29,0x7E,0x45,0x93,0x14,0xE8,0x9F,0xE5,0x87,0x6B,0xAC,0xC2,0x9F,0x9B,0x6C,0xEB,0x2C,0xC5,0x69,0x74, - 0x7E,0xFC,0xD7,0x48,0xCC,0x24,0x56,0x29,0xCC,0xAE,0x7C,0xF0,0xC8,0x97,0x3C,0xA6,0xB4,0xF1,0xC9,0x58, - 0x4D,0x47,0x0D,0xFA,0x85,0x83,0xC2,0xCB,0xE0,0xC7,0xF6,0x63,0xB7,0x00,0xC1,0xA0,0xD7,0xE1,0x83,0xB1, - 0x00,0xA7,0xBB,0xF2,0x0E,0xC6,0xFF,0x1F,0x13,0x3C,0x22,0x66,0x9E,0xA3,0x9E,0x70,0x90,0xB5,0x27,0xCA, - 0x20,0x75,0xB0,0x48,0x6C,0xB7,0x14,0x69,0x1D,0x34,0x15,0x0D,0x41,0xB3,0x66,0xAB,0x4F,0x0B,0x24,0x8C, - 0x1D,0xB7,0xBE,0x0F,0xAE,0x0F,0x58,0xC8,0x76,0xB9,0xAD,0x3B,0x85,0xCB,0xE9,0x4D,0xF8,0x57,0x3E,0xDC, - 0x67,0x52,0x6C,0x1B,0xCB,0x43,0xBF,0x7D,0x81,0xAE,0x7F,0x03,0xB2,0xF6,0x58,0xE7,0xB8,0x96,0x5E,0x21, - 0xE4,0x37,0xDA,0x79,0x0B,0xD6,0xF2,0xA9,0x97,0x85,0x8B,0xA9,0x57,0xCB,0xCE,0x54,0x3C,0xEF,0x6F,0xFA, - 0x27,0xCC,0xA7,0xC8,0x9A,0xF4,0xED,0x8C,0x47,0x4F,0xC7,0x25,0x0B,0x37,0x72,0xD4,0xDE,0x9C,0x95,0xEE, - 0xFF,0x5E,0x67,0x62,0xA9,0x4C,0x50,0x98,0xB1,0x40,0x5F,0x19,0x68,0x6C,0x7F,0x39,0xD5,0xBE,0x60,0xA7, - 0x36,0x0D,0x15,0xC4,0x5C,0x9D,0x1C,0xA2,0xC7,0x72,0x50,0xA1,0x47,0x2C,0x76,0x2C,0x83,0x66,0xD0,0x01, - 0xF0,0xDE,0x1C,0x50,0x45,0x60,0xA0,0xD4,0x55,0x49,0x7F,0x38,0x2C,0x0F,0xD9,0x01,0x61,0xAD,0x1D,0xA3, - 0x3D,0xCB,0xD4,0xA7,0x36,0xCB,0x40,0x73,0x6A,0xF2,0x49,0x79,0xEB,0x02,0x39,0xD9,0xA1,0x0E,0x88,0x95, - 0x81,0x23,0x19,0xD1,0xA7,0x07,0x3B,0xE4,0xF3,0x76,0x90,0xE4,0x86,0x9F,0x51,0x94,0x56,0x2B,0xF9,0x52, - 0x41,0x1E,0x91,0x1B,0xB4,0x3E,0xAA,0x89,0xBA,0x3E,0x20,0x76,0x49,0xE8,0xFD,0xC8,0xE9,0x17,0x8B,0x3A, - 0x31,0xAB,0xA3,0x9C,0x7B,0xDD,0x90,0x03,0xBA,0x25,0x0F,0x37,0xA1,0x2A,0x7F,0xA1,0x55,0x37,0x5B,0xF5, - 0xF0,0x47,0x80,0x2F,0x74,0x75,0xB6,0x6A,0xE3,0x0B,0x5F,0xE4,0xB4,0xE5,0xED,0xAA,0xA6,0x0E,0x9E,0x04, - 0xDA,0x0F,0x9B,0x18,0xE0,0xC0,0xB2,0xEF,0x29,0xD4,0xEC,0xBB,0xE8,0xCA,0xA2,0xBE,0xBF,0xD4,0x5D,0x20, - 0x8C,0xA1,0x7C,0x4A,0x96,0x8B,0x2B,0x14,0x6B,0x4C,0x42,0x4F,0x27,0x0F,0x19,0xE6,0x76,0xF6,0xC9,0x7D, - 0xA5,0xA9,0x1B,0xDB,0x4B,0xAC,0x34,0xDF,0x75,0x96,0xC1,0xB9,0x3A,0x79,0x38,0x0A,0x3C,0x62,0x92,0xEC, - 0x3C,0x46,0x2A,0x6E,0x50,0x77,0xF2,0xF8,0xAE,0x6D,0x15,0xCA,0x9C,0xEE,0x5E,0x9E,0x59,0x00,0x3D,0x3C, - 0x13,0xB0,0x63,0x40,0xB9,0xAC,0x95,0xBC,0xBC,0xE8,0xD2,0x61,0x6F,0xCF,0x7E,0x0B,0x2D,0x00,0x15,0x71, - 0x35,0xA2,0xEB,0x59,0x1E,0xEC,0x09,0x79,0x6C,0x49,0x3C,0x9B,0x5B,0xEF,0x91,0x73,0x1C,0xBB,0x20,0xF7, - 0x4C,0x3F,0x15,0xC6,0x9B,0x5B,0x78,0xDF,0xAE,0xED,0xB4,0x6F,0xC8,0x00,0x80,0x16,0x37,0x13,0x9C,0xF1, - 0xE3,0x57,0xD8,0x22,0x77,0x2A,0x14,0x80,0x93,0x17,0x31,0xF6,0x92,0x3D,0x95,0xDB,0x03,0x59,0x76,0x65, - 0xE6,0x30,0xA1,0x0E,0xA2,0x01,0x5D,0x11,0xBB,0x43,0xEF,0x52,0x40,0xF2,0xE3,0x5C,0x29,0x31,0xC0,0x44, - 0x4D,0xC5,0x2C,0x74,0x01,0x98,0x1E,0xFD,0x43,0x14,0xD6,0x96,0x41,0x08,0x3E,0xD1,0x6B,0x57,0x96,0xEC, - 0x94,0x34,0xE4,0x10,0x2B,0x17,0x30,0x66,0x63,0x7D,0x1C,0xE6,0x47,0xE9,0x9F,0xC4,0x15,0x26,0xBD,0x68, - 0xD1,0x77,0x2D,0x0D,0x6F,0x3B,0x8D,0xC2,0x23,0x1F,0x1F,0x01,0x80,0x5D,0x86,0xC1,0x63,0x98,0x5F,0x87, - 0x54,0xDC,0x5C,0x41,0x40,0x09,0x79,0xB7,0x4C,0xAD,0x2E,0x56,0xE5,0xF5,0x56,0xCA,0xAD,0x14,0xCE,0x1C, - 0x5A,0x1F,0x22,0x18,0x37,0x70,0x09,0x26,0x68,0x88,0xE3,0x43,0xF6,0xC4,0x7E,0xEF,0x89,0x8A,0x90,0x09, - 0x8F,0x95,0x84,0x3B,0xE8,0xF7,0x53,0xF3,0xF6,0x64,0x2F,0xBE,0x08,0x18,0x87,0x09,0xBF,0x19,0x7F,0x0F, - 0x09,0x56,0x78,0xC7,0x2F,0x73,0xF9,0xB8,0x26,0x17,0x7E,0x32,0x51,0x33,0x89,0xE8,0x4E,0x5A,0x8A,0xED, - 0x5E,0x7D,0xA2,0x5C,0x25,0x54,0xB1,0x34,0x28,0x70,0xEA,0x9A,0x94,0x5B,0x5A,0xDC,0x07,0x36,0x92,0x4D, - 0xBC,0x70,0xC1,0xFF,0xDA,0x9E,0xA5,0x82,0x4B,0x81,0x07,0xF9,0xDA,0x9D,0x47,0x45,0xAD,0x3D,0xB4,0x1A, - 0x61,0x37,0xAD,0x82,0x4A,0xC0,0x1F,0x25,0x44,0x7E,0x7E,0x3A,0x04,0x21,0xB8,0x0F,0x56,0xA9,0xBC,0x40, - 0x65,0xD2,0xC8,0xA4,0xFA,0xFA,0xCF,0x74,0x27,0x8C,0x28,0x57,0x97,0xBA,0x20,0xB6,0x43,0xAB,0xD8,0x80, - 0xA8,0x1D,0x19,0xF0,0xB8,0x99,0xB7,0x37,0x98,0xAB,0x51,0x95,0xAD,0xCF,0x89,0xD8,0x78,0xEF,0xEB,0x61, - 0xED,0xD2,0x1D,0x93,0x93,0x07,0x90,0xB1,0x23,0x6A,0xC1,0x10,0x28,0xEC,0x71,0x22,0x4E,0x82,0xB0,0xF6, - 0x1A,0xA7,0x50,0xFC,0xE7,0x4E,0xCA,0x8E,0xCB,0xAB,0x52,0xD0,0xE1,0x2C,0x97,0x11,0x24,0x69,0x23,0x73, - 0x3C,0x4A,0x9A,0x7A,0x56,0x65,0x45,0x0E,0x8F,0x2D,0xB5,0x5B,0x7F,0xE5,0xF6,0x9C,0xB1,0xC6,0xA8,0x28, - 0x73,0x88,0x11,0xBB,0xAB,0x0C,0x51,0xCC,0x30,0xB5,0xB9,0x6A,0x07,0xA9,0x11,0xC3,0x36,0xA8,0x5C,0x26, - 0x6F,0x77,0x62,0x8F,0x3A,0x07,0x8D,0xC8,0x6D,0x88,0x72,0xA2,0xD3,0xD3,0x10,0x2B,0x7D,0x26,0x1E,0x6D, - 0x69,0xA6,0xB6,0xD8,0x65,0xB2,0x11,0x79,0x53,0x35,0x75,0x22,0x67,0xBB,0x07,0x7C,0xE4,0xA5,0x3F,0xA9, - 0x4E,0x2D,0x16,0xAB,0xDA,0xA7,0x38,0xEB,0x72,0x28,0x6B,0x9E,0xBF,0x04,0x62,0xB6,0x68,0x54,0x7F,0xF5, - 0x66,0x14,0x64,0xAC,0xEF,0x8A,0x5A,0xDC,0x1E,0xE3,0x12,0xDD,0xC8,0xC1,0xA2,0xDA,0x7E,0xF7,0x69,0xDE, - 0x09,0x5E,0xBA,0x29,0x1D,0xAE,0x42,0xE4,0x4E,0x9D,0x02,0x96,0xC3,0x20,0x95,0x0E,0x2D,0xC2,0xBA,0x1C, - 0x3B,0xBE,0x94,0xE9,0x20,0xE8,0x5E,0x09,0xB6,0xAD,0x63,0x4F,0xAF,0x8F,0xB9,0x5B,0x18,0xCC,0x1B,0x79, - 0x19,0xC2,0xA3,0x7A,0xFD,0xAE,0x9A,0x86,0xA3,0xA2,0xF4,0x02,0x3E,0xC0,0x22,0xC0,0x93,0xBE,0x3A,0xD4, - 0x9F,0xE1,0x3C,0xB6,0x3D,0x8A,0x3B,0x12,0x02,0x1E,0x02,0x8B,0xB3,0xDB,0x47,0xD6,0x3F,0x73,0x23,0xAB, - 0x24,0x4C,0x5A,0xBC,0x96,0x27,0x0B,0x9F,0x26,0xD2,0xEC,0x82,0x51,0x73,0x88,0xE5,0x5A,0xFD,0x01,0x13, - 0xBB,0x0A,0x7A,0xF4,0x0C,0xD0,0xA5,0x2E,0xB7,0xFA,0x86,0x46,0x11,0x3B,0xE7,0x2E,0xE7,0xF9,0xC0,0x80, - 0x9D,0x96,0xA6,0xEA,0x54,0x65,0x64,0x56,0x14,0x37,0x7C,0x26,0x3F,0xB1,0x02,0x56,0x98,0xCE,0x7C,0x72, - 0x36,0xE0,0x89,0x47,0xA8,0x2F,0x09,0x55,0xBE,0xBC,0xAC,0x10,0xC2,0x5B,0x73,0x0F,0x42,0x3D,0xD5,0x73, - 0x46,0x96,0x2F,0xAD,0xDC,0xB8,0x1B,0x85,0x6A,0xB5,0xA4,0xF8,0x12,0xFC,0x44,0x8B,0x2D,0xDA,0xAE,0x8A, - 0x35,0xBE,0x50,0x86,0x85,0x29,0xA0,0x9E,0x70,0xF3,0x2D,0x18,0xAD,0xFC,0x6E,0xF2,0x47,0xFB,0xD2,0xC9, - 0x4F,0x7F,0xEE,0xDC,0x1D,0x52,0xE7,0x0F,0xDF,0xD4,0xFE,0xA8,0x59,0x45,0x51,0x82,0xED,0x98,0x26,0x47, - 0xB6,0xB7,0x17,0xBB,0x40,0xDB,0x6F,0x67,0xB4,0xBD,0x2C,0xC8,0x91,0x7D,0xAE,0x11,0x7D,0x09,0x06,0xC9, - 0x33,0x17,0xE0,0xFC,0x5E,0x1C,0x08,0x4F,0x5D,0x89,0xFE,0x06,0x11,0xB1,0x6E,0x27,0x27,0xDC,0xE6,0x57, - 0x0C,0x21,0xAE,0xFB,0x10,0x9D,0x45,0x5E,0x92,0x1D,0x4C,0x29,0xA8,0x84,0x98,0xB1,0x31,0x08,0xCF,0x8B, - 0xA6,0x75,0x0C,0xE7,0x5B,0x01,0x36,0xFC,0xC8,0xDF,0x57,0xAF,0xB7,0xB6,0x1F,0x4C,0x6D,0xD2,0x53,0x8D, - 0x21,0x00,0x3A,0x9E,0xF7,0x6C,0x8A,0xD1,0x13,0x80,0xEA,0xC0,0x44,0x0E,0x50,0x74,0x1B,0x6A,0xC7,0x94, - 0x40,0xB9,0x8D,0xFC,0xFD,0xEC,0xD8,0x60,0x6F,0x5A,0xD0,0xB4,0x62,0x74,0xBE,0x92,0xA1,0xAF,0x41,0x55, - 0x86,0x28,0x40,0x81,0xF2,0x4B,0xD7,0xA1,0x91,0x30,0x41,0x01,0x75,0xF9,0x91,0x05,0x1C,0x85,0x36,0x57, - 0x32,0x53,0xA7,0x91,0xB5,0xAC,0x55,0x7E,0x32,0x46,0x2C,0xDA,0x11,0x84,0x2E,0x5D,0xAB,0x67,0x00,0xA4, - 0x1E,0xC9,0xB5,0xBC,0x03,0xB0,0xDB,0x45,0x2F,0x21,0x59,0x72,0x07,0x99,0x0C,0x92,0x60,0x32,0x19,0xB9, - 0x6B,0xEF,0x01,0xF9,0x4C,0x86,0xE2,0xC1,0x72,0xF7,0x01,0x83,0xC2,0xCB,0x5E,0xAC,0x40,0xDC,0xA6,0x26, - 0xE3,0x2E,0xE9,0x06,0xCD,0x9B,0x61,0x65,0x74,0x25,0xB5,0x68,0x3B,0x06,0x52,0xFA,0x2B,0xCD,0xAA,0xD3, - 0xC5,0xB5,0x28,0x6B,0x9A,0xC8,0xCA,0x66,0xAE,0x19,0xDB,0xBC,0x2B,0x20,0xE1,0x03,0x67,0xD2,0x1E,0x18, - 0xB8,0x72,0xC3,0x59,0xE8,0x00,0x39,0xED,0x9C,0x64,0x74,0xD6,0x3D,0xDC,0x9B,0x25,0xB3,0x41,0xB4,0xFF, - 0xAB,0xFA,0xD2,0x12,0x7C,0x20,0x1B,0xFE,0x34,0xFD,0xAA,0xCB,0xFD,0xBF,0xA5,0xCC,0x21,0xD5,0x40,0xB7, - 0x1C,0xDF,0x96,0xA2,0xF9,0xF3,0x05,0xB4,0xA2,0xCF,0xAD,0xA5,0xC8,0xD6,0x1A,0xEC,0xD3,0x4E,0x6B,0x41, - 0x5B,0x49,0x32,0xF8,0x25,0xC7,0x83,0xF5,0x7F,0x95,0xC5,0x2E,0x46,0x8A,0x6D,0x54,0x3E,0x9F,0xE0,0xDD, - 0xDC,0x9C,0xAC,0xDD,0xF6,0x86,0x9D,0x3E,0x47,0xA2,0xD9,0x27,0x6F,0xA2,0x68,0x9F,0xB3,0x5E,0x3E,0x76, - 0x02,0xE1,0xDF,0x6C,0xDC,0xFB,0xEC,0x28,0xC5,0xD6,0xCE,0x44,0x18,0x21,0x44,0x80,0x4A,0x3A,0x33,0x07, - 0x1F,0xBA,0xC6,0x2C,0x52,0xB4,0xF9,0x47,0xFD,0x7C,0x00,0x05,0x9B,0xD2,0x67,0x87,0xC0,0x5C,0x15,0x47, - 0xD3,0xB7,0xEB,0xA3,0x11,0xF1,0x0F,0xB5,0x81,0xE2,0xAD,0x7F,0xC4,0x25,0xA7,0x51,0xFB,0x76,0xC5,0xB1, - 0x58,0x81,0x3C,0xD1,0x1E,0x10,0x14,0x64,0xDF,0x44,0x87,0x27,0x99,0xDF,0x2B,0x6C,0xD7,0xA7,0x18,0x23, - 0x49,0x98,0xB2,0x71,0xD2,0x93,0x4B,0x0B,0x00,0x77,0x20,0x8B,0x7D,0x45,0xF8,0x86,0x43,0xB0,0x69,0xB7, - 0x78,0x55,0xD2,0x65,0x94,0x38,0x79,0x60,0xC9,0xC1,0x2B,0x71,0x48,0x94,0x1D,0x26,0x95,0x5B,0x9D,0x4D, - 0x6C,0xE6,0x21,0x87,0x54,0x67,0x86,0x8B,0x99,0x1B,0x8E,0x85,0x3E,0xB0,0x4F,0x2C,0x29,0x3B,0x56,0x11, - 0x2B,0xCD,0x57,0x9A,0xCC,0xE6,0x4D,0x9E,0x2B,0x22,0xDA,0x43,0xE4,0xA4,0x59,0x7A,0x7F,0x8A,0xD7,0x8D, - 0x20,0x07,0xDC,0x65,0x54,0xF1,0x4E,0x82,0x0D,0x36,0xC3,0x97,0xDA,0x38,0xA3,0xEA,0x88,0xED,0xA0,0x19, - 0xF8,0x98,0x78,0x49,0x69,0x44,0x88,0x45,0xF9,0xC0,0x38,0x6C,0xE2,0xBF,0x9F,0x76,0x9F,0x9A,0x28,0xD0, - 0xE5,0x8A,0x2E,0xC8,0xC6,0x4D,0xB5,0xD0,0x8E,0xE2,0x1E,0x1C,0x47,0x7F,0x60,0xD5,0x29,0xF2,0x6D,0xD4, - 0x7D,0x84,0x93,0x21,0x50,0x53,0x13,0x45,0x1F,0x98,0x5F,0xFC,0x1E,0xCF,0x66,0xC5,0x06,0x4F,0x59,0x68, - 0x40,0xEE,0x18,0xE4,0x88,0x99,0x48,0xE8,0xD7,0x5B,0xCD,0xD9,0x72,0x2F,0xA1,0x86,0x3F,0x40,0xE0,0x26, - 0x30,0x10,0x6A,0x20,0xF7,0x19,0xA1,0x39,0x6C,0x6D,0x19,0x10,0x5B,0x9A,0x04,0x65,0x34,0x57,0x93,0x54, - 0x3D,0x8E,0x14,0xA5,0x30,0xE9,0x69,0x12,0x82,0x0A,0xF8,0x05,0x71,0x5D,0x50,0x63,0xD0,0xD9,0xCF,0x0B, - 0x3D,0xB3,0x98,0xE7,0x81,0x87,0x69,0x47,0x82,0xAB,0x78,0x55,0xB7,0xC7,0x39,0x54,0x69,0x4E,0xBD,0x06, - 0x31,0x84,0x9E,0xF6,0xFD,0x07,0xB4,0x3C,0x48,0xDA,0x8E,0x4F,0xA3,0x47,0xB3,0x70,0x01,0x0E,0x44,0xC5, - 0x7A,0xAF,0x70,0x32,0x43,0x3E,0x69,0x55,0xB3,0xFE,0x5B,0xB8,0xF9,0x84,0x9F,0x6A,0x7F,0xD7,0x08,0x9C, - 0x4B,0x40,0xE0,0x94,0xE6,0x46,0x00,0x21,0x6C,0xF6,0x6F,0xD3,0xE1,0x51,0xAE,0x01,0x30,0x6C,0x08,0x11, - 0x58,0x61,0x65,0x8E,0x4D,0x9D,0x22,0x0C,0x6E,0xB3,0x70,0x6D,0xAD,0x6E,0x2C,0xD5,0x2F,0xE8,0xB8,0xEC, - 0xE8,0xE7,0x46,0x9A,0x5C,0xF1,0x72,0xBA,0xC0,0xD2,0xEA,0x01,0x65,0x3C,0x7A,0x25,0x65,0xC9,0x8C,0x8B, - 0xDD,0x09,0xE7,0xAF,0x8D,0x42,0x6E,0x13,0xB7,0x82,0x49,0x1A,0x8C,0x5B,0xA3,0x16,0x9B,0x23,0x90,0x5D, - 0x07,0xA8,0xAA,0xBB,0xFE,0x38,0x5C,0x67,0x83,0x2A,0xE4,0x63,0x9E,0xE3,0x65,0x95,0x12,0x71,0xDB,0x2E, - 0x08,0x61,0xBD,0x7A,0x6F,0xAF,0xEC,0x4D,0x7D,0xEE,0xEF,0xBD,0x91,0xC7,0x01,0x76,0xFA,0x12,0xFD,0x8B, - 0xDA,0xCC,0xD4,0x3A,0x98,0x5D,0x71,0x98,0xF2,0x63,0x0B,0x87,0x24,0xA3,0xAB,0xE7,0x44,0x0F,0xCD,0xEE, - 0xB1,0x02,0x69,0x8B,0xCD,0x8D,0xA2,0xC5,0x7A,0x1E,0xE4,0xD2,0x33,0x9A,0xFD,0x15,0xD1,0x0F,0xAF,0x28, - 0x67,0x50,0xBC,0x22,0x2C,0x8D,0xE8,0x17,0x66,0x62,0xA6,0xC6,0x36,0x51,0x6C,0x8F,0x2D,0xD0,0x86,0x45, - 0x0D,0x55,0x3E,0x6B,0x1C,0x5F,0x09,0xF5,0x6E,0xF0,0x6C,0x94,0x83,0x14,0x0A,0xB7,0x1F,0x63,0xC1,0x17, - 0xE4,0x39,0x6D,0xC7,0xC6,0xA8,0xED,0xB7,0x4D,0x05,0xAE,0x9A,0x1C,0x82,0x5A,0x72,0x50,0x3B,0x5E,0x81, - 0x38,0x0B,0x9E,0x90,0x8D,0x57,0xD8,0xFB,0xFF,0xA6,0x8B,0x21,0x0D,0x38,0xCC,0x3C,0x42,0xA3,0x02,0xDF, - 0x8E,0xA4,0xD0,0xF1,0xFE,0xB4,0xF6,0x84,0x4F,0x35,0x49,0xB8,0x6C,0x3D,0x0B,0x52,0x0D,0x47,0xD9,0x66, - 0x7F,0x36,0x3F,0x4D,0x4C,0x94,0xA5,0x4F,0x84,0xC0,0xD1,0x60,0x8A,0xDD,0xD1,0xD2,0x7E,0x16,0x6E,0x82, - 0x2A,0x10,0x10,0x7A,0x28,0xA3,0x9A,0x42,0x80,0x15,0xAE,0xA6,0xF1,0x9A,0x78,0x4F,0xA0,0x82,0xF0,0x7F, - 0x39,0xF8,0x58,0xCC,0x92,0x66,0x9E,0x4C,0x7B,0x2A,0xE6,0xCB,0xA0,0x9B,0x11,0xF9,0x9F,0x3A,0x51,0x0F, - 0x0B,0xC1,0xC9,0x82,0xB4,0x4B,0x99,0xED,0x67,0xD8,0xF6,0x0C,0x58,0xD7,0x64,0xBB,0x62,0x99,0x04,0x47, - 0x23,0x0E,0x36,0xBD,0x66,0x11,0xD8,0x6A,0x99,0xAC,0x35,0x6E,0x10,0xDD,0xDA,0x72,0xFA,0x4B,0x50,0xE6, - 0x0D,0x70,0xB7,0x60,0x9A,0x1B,0x76,0xE7,0x86,0x6C,0xFE,0xFE,0xF7,0xAA,0x19,0x6B,0x45,0xBD,0xD9,0x6A, - 0x19,0xD2,0x88,0xAC,0x24,0x6F,0xF7,0xEF,0x7A,0x89,0x69,0xA9,0x44,0x4E,0x3B,0x57,0x1A,0x19,0x6D,0xFF, - 0x18,0x22,0xFF,0xBC,0x85,0xFF,0x59,0x92,0xE5,0x0B,0x40,0xD9,0x2F,0x83,0x2E,0x1C,0xCD,0x22,0xC6,0xBA, - 0xBB,0x53,0x57,0x10,0xD5,0xA2,0x0A,0x05,0x33,0x8C,0xDC,0xB5,0x02,0xB2,0xC2,0x30,0x39,0xA2,0x81,0x40, - 0x28,0x40,0xD7,0xF6,0xFE,0x0A,0x6F,0x1D,0x29,0xF3,0x9D,0x9C,0x98,0x61,0xAE,0xA5,0xE2,0x12,0x17,0x25, - 0x99,0xDC,0x67,0x0C,0x20,0xEC,0xE7,0x81,0x30,0xC0,0x16,0xF1,0xE9,0x37,0xA2,0x44,0x13,0x64,0x4C,0xE4, - 0x1D,0x94,0xD8,0x71,0x86,0x77,0xCB,0x32,0x62,0x25,0x8A,0xAB,0xFA,0xED,0x8A,0x4E,0x29,0x07,0xD0,0x65, - 0x25,0x61,0x61,0xF4,0x84,0xFC,0x87,0x14,0x7B,0x7E,0x91,0x45,0x66,0xB3,0x76,0xCC,0x1A,0xB5,0x11,0x55, - 0x8A,0xB1,0x65,0xCA,0x90,0x67,0x80,0xD4,0x43,0xF7,0x29,0x06,0xD2,0x6C,0x95,0xFB,0x8C,0x83,0xB8,0x88, - 0x47,0x5A,0x42,0x5B,0x6A,0x24,0xC4,0xDF,0x32,0x2A,0x32,0xEB,0x6B,0xA4,0x66,0x8E,0x11,0x23,0x1E,0x38, - 0x2A,0xB6,0xA4,0x48,0x1B,0x96,0xB1,0xB5,0x63,0x6E,0xBD,0xA8,0xB9,0x88,0x71,0x21,0xC9,0x0A,0x5C,0x58, - 0xDB,0xF8,0x95,0xF6,0xBE,0x0B,0x0B,0x5C,0xDD,0x86,0x65,0x8C,0x22,0x58,0xA5,0x98,0x54,0x9D,0x82,0x95, - 0x43,0x04,0xC4,0x18,0xF3,0x8F,0x6C,0xC9,0xC5,0xEA,0x14,0xE8,0x53,0xAD,0x13,0xDE,0xCD,0x05,0x43,0x5E, - 0x17,0x89,0x95,0x64,0x4D,0x0C,0xD6,0xCD,0x33,0x1E,0x40,0x3A,0xA0,0x60,0xDB,0x5C,0x52,0xE7,0xC4,0x29, - 0x8E,0x0C,0x13,0x2C,0x6E,0x2C,0xCB,0x6F,0xA1,0x27,0x55,0x11,0x72,0xC7,0xEB,0x68,0xE9,0x6F,0x24,0x0E, - 0xED,0x2D,0xC4,0x79,0x64,0x52,0xE6,0x85,0x33,0x70,0xDB,0x89,0x89,0x99,0x5B,0x29,0x99,0x13,0xCC,0x89, - 0x9C,0xE5,0xDD,0xD5,0x75,0x91,0xB0,0x2B,0x62,0xF3,0x02,0x74,0x6D,0x33,0xCA,0x61,0xDB,0x02,0x89,0x91, - 0xB6,0xC8,0x57,0x5A,0x09,0x31,0x8D,0x25,0xF6,0x88,0x1A,0x69,0xA1,0xA8,0xDD,0xE6,0xC9,0x5F,0x23,0xC5, - 0x81,0x8C,0x52,0x1D,0x18,0xB0,0x7C,0xB0,0x2A,0x1D,0x17,0x03,0xF8,0xFC,0x8B,0x54,0x5D,0xD7,0x46,0x14, - 0x54,0x85,0x16,0xF8,0x4B,0x46,0x1B,0xA7,0x4D,0x5B,0x62,0x41,0x42,0x07,0x1C,0xB5,0x01,0x37,0x0C,0x45, - 0xFD,0x0C,0x8D,0x90,0x7A,0xDE,0x2A,0x65,0x9D,0xC4,0xAB,0xE3,0x91,0x61,0x33,0xD7,0xC0,0xD2,0xAB,0x9D, - 0xB0,0x76,0x7B,0x95,0xAA,0xF3,0xD1,0x4F,0x9B,0xC4,0x82,0x8A,0x74,0xA3,0x42,0x7F,0x44,0x95,0x69,0xDB, - 0x46,0x34,0x81,0x5F,0x4E,0xE5,0x09,0x1C,0x71,0x64,0xC4,0x01,0xC6,0x55,0x9C,0xCB,0x0F,0xA8,0xC4,0x42, - 0x11,0xBA,0x81,0x0D,0xF7,0x11,0x90,0x08,0xB6,0x58,0x70,0xE9,0xEC,0x72,0xB7,0x81,0xB0,0x79,0xA8,0xA0, - 0xDA,0x1B,0xB1,0xA4,0x67,0x94,0x61,0x11,0x1C,0x5F,0xE1,0x09,0x9A,0x84,0x10,0x61,0xC1,0x78,0xF8,0x7D, - 0x1B,0xFC,0xCA,0xBC,0xA2,0xD5,0x29,0x9F,0x1C,0x3E,0xA2,0x47,0x2A,0x35,0xEE,0xCC,0xC3,0xCE,0x3E,0xFA, - 0x44,0x50,0x79,0x51,0xF3,0xEC,0x7F,0x37,0x43,0x9D,0xF0,0x71,0x46,0xCD,0xD9,0xFA,0x83,0x46,0x5F,0xF0, - 0x2E,0x2D,0x71,0x69,0x24,0xC9,0x78,0x61,0xBD,0xC4,0x75,0x29,0xB7,0xF0,0x1F,0xBC,0x9F,0x3D,0x5F,0xFA, - 0x04,0xC2,0x72,0x95,0x79,0x0F,0x0E,0x82,0xA6,0xD0,0xF8,0xA2,0x52,0x1A,0x9B,0xA3,0xF9,0x42,0xA8,0xE5, - 0x7B,0x89,0xBA,0xB0,0x65,0x34,0xDE,0x43,0xBE,0xB2,0x26,0x6C,0x58,0xE1,0xF0,0x74,0xFE,0x24,0x31,0x63, - 0xC0,0xEA,0xE0,0x60,0x3D,0x21,0x06,0x7C,0x5C,0x18,0x2B,0x06,0xB7,0x0E,0x2F,0x51,0xEA,0xE3,0x87,0x86, - 0x17,0xE3,0xBF,0x31,0x2C,0xEA,0xFE,0x0E,0x35,0xB6,0x14,0x46,0x25,0xE4,0x78,0x7B,0x82,0x27,0x56,0xFA, - 0xE4,0x8E,0x66,0x91,0xD5,0xA5,0x2E,0xF6,0x32,0x57,0xC6,0x03,0x15,0x4C,0x07,0x7E,0x87,0x2D,0xB1,0x7B, - 0xDC,0x0B,0x09,0x5C,0xA0,0x13,0x56,0xD2,0x5E,0x77,0xED,0x20,0xE9,0x08,0xE1,0x53,0xDD,0x4F,0xE9,0x6C, - 0xAD,0x4A,0xF1,0x97,0x97,0x4A,0x22,0x8E,0x54,0xF5,0x3C,0x3E,0xE3,0x57,0xC5,0x2B,0xE1,0xE9,0xCC,0x87, - 0x55,0x5B,0xEB,0xF2,0xCB,0x44,0x6A,0xC3,0x65,0x04,0x35,0x1B,0xDD,0xE8,0xC5,0xC6,0x5D,0x48,0x04,0xAF, - 0xAE,0xAB,0x99,0xBF,0x63,0x75,0xB6,0x0A,0xB0,0xEB,0xB5,0x8F,0x35,0x03,0x87,0x89,0x89,0x81,0x7B,0x7F, - 0xCD,0xC5,0xC9,0x1A,0x5E,0x89,0x83,0xC0,0x2C,0xA9,0x7A,0x43,0x08,0x76,0xDC,0x02,0x5C,0x53,0x0C,0xC2, - 0xA5,0xFF,0xA4,0x8E,0x42,0x41,0x8D,0x1A,0x2A,0xA5,0xA2,0x5A,0x57,0xB5,0x04,0x3F,0xA4,0x85,0xA2,0x5A, - 0xB6,0x4E,0x2A,0x38,0xA4,0xE0,0xDD,0x07,0x13,0x58,0x0D,0x2B,0x25,0x46,0x69,0xFF,0xB7,0xE6,0x8D,0xDF, - 0xD0,0x5F,0xCD,0x0E,0xE9,0x02,0x05,0x3A,0xB8,0xD8,0xA3,0xE3,0xD9,0xC7,0x7B,0x93,0xF9,0xED,0xB3,0x02, - 0x6B,0x81,0xA4,0xB3,0x46,0x7D,0xE2,0x17,0x9F,0x53,0x2B,0x80,0x5E,0x81,0x92,0xE2,0x77,0x0E,0x06,0x02, - 0x9A,0x93,0xB0,0x2D,0x9C,0x92,0x8A,0x7F,0xA4,0xD0,0x9B,0x23,0x95,0x60,0xAB,0x93,0x1B,0x2D,0x8B,0x03, - 0xD7,0xB2,0xED,0x8A,0x18,0x67,0x93,0x32,0x38,0x05,0xF2,0x2B,0xE3,0x29,0xE5,0xB3,0xFC,0x45,0x6C,0x6F, - 0xD3,0xF6,0x6F,0x42,0x3F,0x5C,0x79,0xF1,0x0B,0x8C,0xF8,0x5C,0x70,0xDC,0xFF,0x21,0x0D,0xFB,0xD6,0xC9, - 0x94,0xF7,0x72,0xE1,0x0E,0x1D,0xF4,0x63,0x14,0xB6,0x9E,0xBC,0x2B,0xF4,0x1A,0x43,0xBF,0xC8,0x55,0x76, - 0x2E,0x5F,0x44,0x63,0xFF,0xA2,0x0B,0xEF,0xA6,0x26,0x6E,0xF6,0xFF,0x44,0x5B,0x97,0xAA,0x73,0x6A,0x04, - 0x73,0x7C,0xB5,0x62,0xC0,0xD5,0xEE,0x1E,0x3A,0x42,0xA8,0x6A,0x2A,0x75,0x76,0x73,0x43,0x5B,0x96,0x65, - 0xC4,0xB0,0x78,0xD9,0xD4,0x7A,0x00,0x1E,0xE0,0x2F,0xBE,0xCD,0x1B,0x58,0x7F,0x87,0x9F,0xC1,0x7A,0x3E, - 0xD6,0x15,0xA9,0x9B,0x1B,0x25,0xE1,0x5C,0x92,0x21,0xC3,0x04,0xAC,0x5B,0x48,0x6C,0x8B,0x16,0x37,0xBF, - 0xE4,0x1B,0x21,0x4C,0xCB,0x26,0xA6,0x17,0x67,0x94,0xC6,0x19,0x38,0x94,0xEA,0xA2,0xEC,0xD8,0x87,0x6A, - 0x77,0x6F,0x37,0x5C,0xE9,0x95,0xD6,0x21,0xB0,0x1B,0x00,0xB3,0xA7,0x14,0xA6,0x5A,0x8B,0x3E,0xA2,0xB8, - 0x84,0xF0,0x0A,0xAD,0x49,0xDB,0xAB,0x89,0xAD,0x2E,0xC9,0xAF,0x9F,0xDE,0xEF,0xED,0x85,0x3F,0xBA,0xA1, - 0x75,0xAC,0xF6,0x88,0xA6,0xB1,0x48,0x4A,0x0C,0xFB,0xC3,0x73,0x6D,0x81,0xB8,0x7B,0x91,0x2D,0x76,0x95, - 0xBF,0xED,0x3C,0xB6,0x63,0x6A,0x0A,0x63,0x6B,0x0A,0x25,0x6B,0x8C,0x7D,0x2F,0x79,0x47,0xF1,0xA0,0x66, - 0x5F,0x03,0xFA,0x70,0x81,0x09,0x32,0xB1,0x6C,0xC1,0x40,0xB2,0xA6,0x9D,0xDF,0xA7,0x50,0x69,0x0A,0x62, - 0xE4,0x82,0x32,0x5B,0x24,0x40,0x3B,0x4E,0xFD,0xBC,0xD3,0x30,0xF1,0x6E,0xAF,0x22,0xF5,0x61,0x00,0x18, - 0xE3,0x89,0x18,0x81,0x71,0x30,0x80,0xE4,0x10,0x6B,0x7B,0x6D,0x38,0x25,0x5B,0xB6,0x15,0xDD,0xC1,0xF2, - 0xC3,0x4E,0x21,0x1A,0xDE,0xC3,0x79,0xBE,0x7A,0x05,0xD6,0xA7,0x3E,0x8B,0xEB,0xF3,0xCA,0x4E,0x50,0x67, - 0x4D,0xEB,0x69,0xDC,0x6A,0x16,0x1C,0x26,0xAF,0x28,0x61,0x23,0x80,0xB7,0x48,0xB5,0xAA,0xEC,0xF9,0x79, - 0x09,0x03,0xE4,0x6E,0xA3,0x37,0xA9,0x84,0xBF,0xF3,0x9F,0x4A,0x38,0xF1,0x0D,0x26,0x3F,0xFC,0xB2,0xE2, - 0x94,0xD4,0xA1,0x9D,0x83,0x44,0x76,0xCC,0x28,0x66,0x47,0x7A,0xE2,0x01,0xEB,0x6F,0x67,0x24,0x53,0xAD, - 0x90,0x37,0xED,0x01,0xDE,0xB2,0xDE,0xE1,0x89,0xB0,0x6E,0xE2,0x6C,0x7D,0xBC,0x69,0x1D,0x23,0xBB,0x85, - 0x5B,0x8C,0x54,0x2A,0xE1,0x1D,0x76,0x3F,0x6A,0x23,0x02,0x0A,0x6B,0x0E,0xB8,0x40,0x5C,0x6F,0x8A,0x05, - 0x0F,0x4F,0xDD,0xBE,0xB7,0x80,0x22,0x7A,0x58,0x03,0xBA,0x5E,0x53,0x2F,0xE0,0x64,0x56,0x9F,0x03,0x10, - 0x83,0x83,0xD8,0xAE,0x6B,0xCE,0x93,0x9C,0x79,0x2E,0xC0,0x23,0x2A,0xD0,0x58,0xBF,0xF8,0x15,0x88,0x0A, - 0xFE,0xCE,0x8B,0x49,0x24,0xC4,0x82,0xBE,0x16,0xE5,0x92,0xE6,0xC7,0xBD,0xA7,0xE5,0x98,0x18,0x8E,0xA6, - 0xC3,0xFB,0xA0,0xE3,0x4F,0xB7,0xDE,0x95,0xC6,0x70,0x97,0xED,0x9D,0x59,0xC5,0xBB,0x94,0xF6,0xD0,0x05, - 0xA9,0x44,0x97,0x85,0x4F,0xEF,0x26,0xE0,0x11,0xEA,0xB5,0x2F,0xF1,0xE2,0x5A,0x6E,0x48,0xD0,0xD4,0x9A, - 0x54,0x3A,0x05,0x50,0x1C,0x30,0x99,0xA1,0x92,0x6C,0x44,0x3E,0xA2,0x06,0xC5,0x2C,0x96,0x79,0x46,0x0A, - 0xC1,0xF9,0x8E,0x8C,0x1A,0x45,0x76,0x6C,0x94,0x79,0xB4,0xA7,0x0B,0x3C,0x05,0xDA,0xC6,0x2A,0x23,0x1C, - 0x3C,0x38,0x7B,0xED,0xDE,0x69,0x05,0x99,0x35,0xCB,0x44,0xC1,0x43,0x34,0xAC,0x83,0xB1,0x79,0xF0,0x4A, - 0x16,0x81,0x4D,0xF6,0x96,0x76,0x6A,0x55,0x13,0x74,0xCF,0x17,0x8E,0x7C,0xC6,0xC9,0x49,0x74,0x83,0x0E, - 0xD6,0x85,0x70,0xCA,0x9F,0xE7,0x80,0x80,0x93,0x29,0xF1,0xEB,0x1B,0xBF,0xAE,0x8D,0xD8,0x3F,0x92,0x93, - 0x6C,0x4C,0x0F,0x5E,0x7F,0x81,0x39,0x20,0x62,0x69,0xBF,0xBD,0xAC,0x35,0x6C,0x86,0xA9,0x0F,0x57,0xF1, - 0x77,0xD7,0xDE,0x9B,0x99,0x77,0x79,0xE6,0x1A,0x90,0x13,0x3D,0xBD,0xB7,0x4A,0xDF,0x12,0x8A,0x0E,0xC4, - 0x27,0x0D,0x61,0xE5,0x59,0x73,0xE1,0xD4,0x9E,0xED,0xC7,0x68,0x58,0x8E,0xB1,0xAA,0x5D,0xC2,0xB0,0xF0, - 0x3D,0x44,0x49,0xE7,0x1F,0xF0,0x8E,0x4B,0x7D,0x7E,0x43,0xBA,0x9E,0xEF,0x50,0x49,0x98,0x3C,0x97,0x0C, - 0x9B,0x8A,0x28,0x9E,0xC2,0x3C,0x72,0xA9,0xA3,0x16,0xB5,0x92,0x46,0x43,0x4E,0xD9,0x42,0x3D,0x03,0x79, - 0xD9,0xBE,0xA4,0x86,0x0D,0xC5,0x5B,0x7D,0x8E,0x1F,0x4E,0x66,0xAF,0xE8,0x8F,0xD6,0x67,0xEF,0xBA,0x96, - 0x0C,0x22,0x55,0xFA,0x11,0x9E,0x97,0x41,0x23,0x62,0x92,0xE6,0x09,0xE0,0x01,0x17,0x82,0xAA,0x9A,0x8D, - 0x67,0x2F,0x0F,0x96,0xAC,0xF1,0xD1,0x25,0xF7,0xEF,0xE9,0x52,0x11,0x8B,0xD0,0x93,0xC1,0x4F,0x68,0x6C, - 0xAD,0xB0,0x81,0x26,0x1D,0xBA,0xD4,0x20,0xF9,0x11,0xF6,0x6F,0xA5,0xE9,0x71,0x9D,0xA7,0xA7,0x88,0x62, - 0xEB,0xA6,0x15,0x21,0x33,0x34,0x5D,0x67,0x2F,0xBA,0x40,0x35,0x99,0x18,0x4C,0x14,0xAC,0xA7,0x35,0x78, - 0xA0,0x0B,0x1E,0xBB,0x96,0x2D,0x8A,0xE7,0x93,0xA8,0xA1,0xDB,0x77,0x79,0x94,0x21,0xF5,0xD8,0x51,0xAC, - 0xE4,0xA7,0x63,0x71,0x74,0x4C,0x20,0x84,0x5A,0x1A,0xB1,0x79,0x32,0x2E,0x17,0x5E,0xA8,0xC0,0x9D,0x9B, - 0x7A,0x34,0x23,0x2C,0x74,0x45,0x0A,0xF0,0xE4,0xDA,0x6A,0x67,0xD7,0x24,0xC2,0x45,0x27,0x5A,0x80,0x9B, - 0xAA,0x85,0x74,0x78,0xFE,0x03,0x96,0x4B,0x2C,0x82,0x25,0x92,0xFF,0xA6,0x2A,0x1F,0xCC,0x15,0x31,0x19, - 0x1F,0x81,0x3C,0x1D,0xD1,0x56,0x7A,0xDD,0x31,0x43,0x85,0x13,0x03,0x36,0x8E,0x35,0x90,0x51,0xDC,0x22, - 0x93,0xCE,0x52,0xE0,0x4F,0x3C,0x90,0x46,0xAB,0x6A,0x7B,0x5B,0xF2,0x2B,0xB0,0x97,0x77,0x9C,0x18,0x7B, - 0x4E,0x2D,0x90,0x52,0x59,0xEE,0x82,0x0B,0xD6,0xE6,0x1E,0xCB,0xB1,0x37,0x2A,0x64,0x2B,0xA0,0xF3,0xAF, - 0xDB,0x65,0xFA,0xA4,0x7A,0x09,0x92,0x20,0x38,0xAB,0xBB,0x27,0x40,0xC2,0xBB,0x12,0xFE,0xDC,0x1A,0x37, - 0xEE,0x23,0xB1,0x9B,0x7E,0x81,0x1D,0xD8,0xF5,0xEC,0x00,0xC4,0x9F,0xF3,0x48,0x52,0x69,0x44,0xD5,0xF0, - 0x16,0xF1,0xE4,0x8C,0x53,0x0C,0xC2,0x17,0xD9,0xFC,0x1B,0x3B,0xA2,0xBA,0xFF,0x4E,0xDC,0x83,0x0A,0xE8, - 0xE2,0xFA,0x75,0xFA,0xED,0xFF,0xFF,0xAC,0xCB,0xD1,0x91,0xD6,0xB3,0x6B,0xE9,0x20,0x44,0x6C,0xC3,0x13, - 0x14,0x5C,0x53,0xDC,0x5E,0x60,0xDE,0x28,0x83,0xD8,0x2D,0xC8,0xC3,0xAB,0x0B,0x95,0x4E,0xB6,0xBC,0xC1, - 0x5B,0xE4,0xB6,0x04,0x03,0xF7,0xCB,0xCA,0x93,0xA4,0x54,0x06,0x4C,0x84,0xF6,0xB0,0x96,0x9D,0x83,0xEB, - 0xB5,0x44,0x42,0x43,0x16,0x27,0xA5,0x20,0xF0,0xF5,0x4B,0x73,0xD7,0x33,0xBD,0x57,0x48,0xCE,0xBD,0x16, - 0x96,0x03,0x3D,0x57,0xD1,0xFA,0x2A,0x04,0xA1,0x35,0x4A,0xEC,0xD7,0xE9,0x4D,0xC5,0x04,0xAB,0xA7,0x5E, - 0xF2,0x59,0x10,0x36,0x2B,0xB1,0x1E,0xF8,0xD6,0xE8,0x03,0x03,0x96,0xC4,0x86,0xF9,0x73,0x7B,0xF2,0x18, - 0xD6,0x65,0xB7,0x33,0xD0,0xA1,0xC8,0xC5,0x9A,0x05,0xA2,0x2B,0xA1,0x99,0x35,0xDC,0x44,0xA8,0xCF,0x28, - 0x44,0xB6,0x6C,0x41,0x18,0xD7,0xC1,0x1A,0xFB,0x23,0x32,0xF3,0xE6,0xDF,0xFE,0x4A,0x5D,0x4E,0xE3,0xF5, - 0x1E,0x9E,0x09,0x1E,0xC2,0x5D,0x7C,0x24,0x29,0x45,0xB4,0x21,0x9C,0x36,0x06,0xDD,0x86,0x4C,0x6E,0xF2, - 0xD6,0xC9,0xF4,0x23,0x0A,0xD3,0x70,0x4B,0x9C,0xFD,0xFC,0x34,0x07,0xAF,0xE2,0x05,0x03,0xB1,0x87,0xB9, - 0x20,0x69,0x17,0xEE,0x87,0xFD,0x07,0x7F,0xB2,0x9F,0x6F,0xFF,0xFF,0xFF,0xA7,0xA9,0xE1,0xAF,0x53,0x6D, - 0x91,0x44,0x47,0x07,0xE1,0xEF,0xD8,0x3C,0x56,0xB3,0x5D,0x03,0x6C,0x0E,0x3C,0x76,0xAE,0x8A,0xCB,0x50, - 0xE0,0x9E,0xF2,0xC8,0xB9,0x21,0xD6,0xF2,0x81,0xAF,0xA9,0x03,0x31,0x7D,0xC2,0x23,0xB6,0x00,0x2A,0xDD, - 0x7C,0x99,0x3B,0x02,0x22,0x2B,0xF1,0x11,0x78,0x70,0xAD,0x53,0x7E,0x1F,0xC1,0xCD,0x25,0x90,0xC7,0x20, - 0x18,0xFF,0xD0,0x26,0x4A,0xA9,0x09,0x5B,0x06,0x40,0x53,0x45,0x70,0x06,0xEB,0xB5,0xDF,0x8E,0x92,0x55, - 0x79,0x8E,0x42,0x98,0xB3,0x88,0x86,0xB1,0x53,0xCE,0x45,0xC5,0xA6,0xB3,0xD7,0xB1,0x79,0xED,0xF8,0x89, - 0x32,0x83,0x90,0x94,0xD5,0x66,0x73,0xAE,0x85,0x46,0xB7,0xA4,0x13,0x86,0xB5,0xE2,0xAA,0x4D,0x93,0x75, - 0xB8,0xCD,0x7C,0x4C,0x63,0x60,0xB0,0x3C,0xDB,0x87,0xA9,0x66,0xFD,0x2B,0x25,0x6C,0xA0,0x81,0x34,0xB1, - 0x0F,0xDA,0x3E,0xEF,0x95,0x24,0xA9,0xC4,0xB5,0xB2,0x27,0x22,0x27,0x9D,0x87,0xF8,0x2B,0x4A,0x23,0x7E, - 0x3B,0xA9,0x75,0x4B,0x73,0x55,0xC8,0x2D,0xDE,0xDA,0xEF,0x7B,0x62,0x78,0x70,0x3A,0x38,0x8A,0xA0,0x9C, - 0x03,0x46,0x93,0x4E,0xE3,0xCF,0x75,0x3A,0x76,0xA3,0x6E,0x3F,0x71,0xAA,0xC7,0x1B,0x6F,0x45,0xD2,0x9D, - 0x1D,0x6C,0x34,0xA9,0x02,0xB2,0x94,0x5D,0x70,0xE6,0xA5,0x0A,0xB0,0xB6,0x1A,0x8D,0xC2,0x48,0x99,0x37, - 0xE8,0xF1,0xC7,0x8D,0xDE,0x85,0xD6,0x61,0x2D,0x35,0xE9,0x82,0x21,0x91,0x12,0x63,0x6F,0x86,0xCB,0xB5, - 0x4F,0x62,0xA4,0xFD,0xE8,0xA0,0x5B,0x95,0xA3,0x22,0x7B,0xBF,0x1A,0x52,0x30,0xFB,0x93,0x9D,0x72,0xBE, - 0x1A,0xA4,0x20,0x20,0x72,0x89,0x6E,0x81,0x20,0x93,0x4C,0x28,0x10,0x3C,0x22,0x1C,0xEE,0xD7,0xFC,0x1E, - 0x9D,0x33,0xDA,0x9D,0x5D,0x7C,0xD0,0x96,0xDD,0x3D,0xC6,0x01,0x8C,0xE3,0x95,0xA5,0xF0,0x72,0x33,0x38, - 0x63,0x93,0x76,0xB2,0x10,0xCC,0x9D,0xF1,0x85,0xFE,0xDD,0xC8,0xF1,0x73,0xFB,0x28,0xDA,0xD4,0x9D,0xD0, - 0x97,0xC2,0x58,0x6C,0x51,0x64,0x6B,0x02,0x41,0xD5,0xCE,0xD2,0xE8,0x0E,0xCA,0xAA,0x94,0x25,0x2D,0xD7, - 0x65,0x57,0xCD,0x92,0x8C,0x37,0x65,0xB2,0x91,0x83,0x84,0xA3,0x64,0x3C,0x95,0x61,0xB0,0x50,0x6D,0x05, - 0xB4,0x6D,0x7A,0xE7,0x86,0x0C,0x72,0x33,0x3E,0xCA,0xC1,0x73,0x51,0x32,0x06,0x13,0xC0,0x07,0x0E,0x85, - 0xC1,0xD1,0x6A,0x1E,0x38,0xE5,0x88,0x98,0x9F,0xA7,0x96,0xAC,0x99,0x63,0x5B,0x5F,0xF7,0x11,0x86,0x15, - 0x0A,0x3D,0x56,0x35,0x0A,0x00,0xFE,0xBE,0x1A,0x74,0x15,0x66,0x57,0xB7,0x9D,0x8F,0x7A,0x3E,0x29,0x05, - 0x65,0xAC,0x3F,0x4B,0xE8,0x35,0x8B,0x68,0xA4,0xBB,0x35,0x66,0x44,0x8D,0x09,0x10,0x02,0x1F,0x87,0x01, - 0x74,0xD6,0x71,0xBE,0xA5,0xBA,0xA4,0xAE,0xCF,0xBA,0x96,0xA9,0x32,0x1E,0x69,0x0A,0x49,0x4D,0x54,0xB8, - 0x7F,0x0F,0x16,0x23,0x1F,0xE0,0x20,0x08,0x9E,0xDE,0x88,0x14,0x23,0x80,0xDB,0x09,0xDE,0xB3,0x40,0x8D, - 0xFA,0x95,0xD0,0x2D,0x0B,0xAF,0x6F,0x12,0xFC,0xA5,0xB5,0xAA,0xC6,0x90,0xE5,0x37,0xF8,0x30,0x5B,0x0A, - 0xC4,0x59,0x27,0x79,0x98,0x17,0x94,0x60,0xEF,0x13,0x73,0xF9,0xFD,0x13,0x4F,0xD8,0x42,0x10,0x2E,0xC4, - 0xB4,0x4B,0xD7,0x61,0x0C,0xE2,0xF7,0x13,0x13,0x11,0x87,0x70,0xE4,0x14,0xA9,0xC9,0xBC,0xEE,0x1F,0x47, - 0xEC,0x8F,0x72,0xF9,0xE7,0xA2,0x9F,0x5D,0x45,0xCF,0xC9,0x23,0x34,0x63,0xD2,0x6C,0xE5,0x92,0x8B,0x64, - 0x98,0x02,0xEC,0x0C,0xB7,0xBF,0xEB,0x01,0x22,0x9F,0x39,0x78,0xE3,0xEA,0xF2,0x46,0xE9,0xB6,0x4E,0x17, - 0x04,0x3B,0xE8,0x62,0xDE,0x9A,0x69,0x64,0x22,0x9E,0x04,0x25,0x70,0x53,0x30,0x6B,0x74,0x70,0xE0,0x72, - 0xDF,0x8E,0x07,0x32,0x85,0xE7,0x59,0xF7,0x69,0x79,0x4F,0x06,0x4B,0x30,0xCF,0x8E,0xB7,0xC6,0x5E,0x25, - 0x7C,0xE9,0xD7,0xA6,0x41,0xAF,0xCB,0x16,0xF8,0xE7,0xA0,0x5E,0x72,0x18,0xDD,0x74,0x6E,0x4D,0x9A,0xF5, - 0x1A,0x18,0x8D,0x65,0xD9,0x15,0x0D,0x61,0xEB,0xAA,0x71,0x29,0x0B,0x82,0x55,0x70,0xCB,0xA7,0x52,0x58, - 0xB2,0xC7,0x89,0x83,0x5B,0x10,0xD8,0x8F,0xFA,0x57,0x1E,0x48,0x21,0x5C,0x9A,0x59,0x77,0xD5,0x64,0xF7, - 0x24,0xE2,0x70,0xF3,0x05,0x46,0x0B,0xDD,0x11,0xA4,0x03,0xC5,0xCB,0x72,0xA9,0x1B,0x5F,0xFC,0x04,0x2F, - 0x0D,0xCE,0xE0,0x50,0x75,0x58,0x48,0x91,0x31,0xEC,0x32,0x92,0xF9,0xF7,0xB5,0x06,0x09,0xA5,0xB3,0x18, - 0xBA,0x72,0x49,0x6E,0xCF,0x71,0xEB,0x18,0xA0,0xAF,0x22,0x3D,0x71,0xCC,0x39,0xCB,0xEB,0x54,0xB3,0x8B, - 0x21,0xD5,0xF4,0x10,0x79,0xF5,0xE5,0xA4,0x89,0xB6,0xEA,0x39,0x60,0xC3,0x1B,0xD1,0x63,0x8D,0x20,0xCE, - 0xEC,0x9F,0x1E,0x71,0x12,0x3D,0xFE,0x84,0x87,0x6D,0x0E,0x12,0xD6,0x7F,0x28,0x35,0x51,0x70,0x24,0x96, - 0x0D,0x7A,0x2D,0xE9,0x5D,0xB9,0x3F,0x5A,0xAF,0x1C,0xDA,0xC6,0x35,0x05,0xF4,0xC4,0x6E,0x7B,0xBF,0x85, - 0x26,0xB8,0x91,0xC1,0x06,0xF2,0x4A,0xE0,0x1D,0x5B,0x13,0x2B,0x6F,0x68,0xD3,0xD7,0x40,0x10,0x2B,0x0F, - 0x0E,0x00,0xC5,0x85,0x0A,0xFE,0x66,0x3D,0xC7,0xEB,0xCD,0xB9,0xF7,0x3E,0x05,0xD5,0x60,0xFC,0x44,0x7E, - 0x97,0x97,0x92,0xA1,0x42,0x17,0xEA,0x32,0x13,0xB9,0x3C,0x6A,0xE5,0xC2,0xA5,0xC7,0xD2,0x2A,0x3A,0x3C, - 0xA0,0x9D,0x62,0x8F,0x5D,0xFD,0xB4,0x0B,0xFE,0x94,0xAC,0x69,0xB3,0x09,0x92,0xA0,0xCE,0xFB,0xD5,0x95, - 0x14,0xBB,0xCB,0x77,0xE5,0xBE,0xD7,0x52,0xD9,0x7D,0x18,0x27,0xE6,0x43,0x71,0x7D,0x42,0x18,0x0C,0x1B, - 0x16,0x77,0xA4,0xBF,0x8B,0x05,0x56,0x5A,0x7D,0xDB,0x90,0x26,0xF7,0x42,0xB6,0x8B,0x5B,0x26,0x61,0xBF, - 0xFD,0xB9,0x19,0x22,0x64,0x73,0x76,0x8E,0x91,0xD4,0x60,0x57,0xEC,0x77,0x1B,0x31,0xFF,0x7A,0xFC,0xFB, - 0x0C,0x34,0x91,0x32,0x77,0x60,0x84,0x0A,0xE4,0x99,0x60,0xBF,0x00,0x71,0x81,0x0A,0x76,0x87,0x42,0x8C, - 0xBA,0xB0,0x16,0x40,0x82,0x9E,0xDE,0xB3,0x81,0x51,0x93,0x23,0x27,0x68,0x8E,0x79,0x89,0x30,0xB6,0xE4, - 0x04,0x29,0xF4,0xDE,0xC0,0x48,0x54,0xFD,0xC7,0x13,0x8F,0x3E,0x3D,0xBC,0x7B,0xF2,0xE8,0x2E,0x29,0xDE, - 0x5F,0x06,0xF1,0x5F,0x8C,0x70,0xB1,0x3D,0xB7,0xFD,0xA5,0x13,0x31,0x92,0x61,0xC0,0xC8,0xBD,0xDF,0xB4, - 0x33,0x70,0x4D,0x7F,0x93,0x2E,0x14,0x53,0x7B,0xC2,0x50,0xD9,0xFA,0x22,0xB0,0xEB,0x32,0xA4,0xE0,0xF6, - 0x92,0x2C,0x22,0x95,0xFE,0xEA,0x71,0x46,0x62,0x20,0xB9,0xFE,0xB3,0xB2,0xE9,0x03,0x13,0x46,0xEE,0x07, - 0xD4,0x25,0x5E,0xD6,0xD6,0xD9,0xB3,0xFE,0xB2,0xC2,0x59,0xE4,0xA5,0xDC,0xD1,0x31,0xF2,0x93,0x61,0x37, - 0x91,0xEE,0xB6,0x5D,0xA3,0xF5,0x77,0x6C,0x14,0x0F,0x30,0xD7,0x56,0x49,0xEE,0x5C,0x90,0xE5,0xF3,0xA3, - 0x33,0x1E,0x5D,0x13,0xFA,0x54,0x66,0x58,0xE0,0xC8,0xC8,0x13,0x19,0xEE,0xBE,0xC5,0xE9,0x5F,0x7D,0x5B, - 0xA6,0xD2,0x4F,0x49,0xE3,0xA6,0xD9,0xE9,0x3B,0xD7,0xDE,0x37,0xEB,0x56,0xAB,0x15,0x7A,0x76,0x00,0x7D, - 0x64,0x5C,0x21,0x44,0xEB,0x25,0xBA,0xFB,0x0F,0x4A,0xE2,0xBB,0x0C,0x25,0xAA,0xDB,0x47,0x58,0xCB,0xA7, - 0xBF,0x73,0xB0,0xF7,0xE0,0x52,0xCE,0x98,0x5C,0x17,0x5A,0x5E,0xA2,0xE3,0x0A,0x5A,0x19,0x26,0xDC,0x4D, - 0xBB,0x1C,0x7C,0xE0,0xAC,0x91,0xAB,0xDA,0x8B,0x51,0xC3,0x4B,0x27,0x71,0xAE,0xFB,0x69,0xAF,0x2C,0x34, - 0x1B,0xCC,0x1A,0x5F,0x22,0x81,0x77,0xA2,0xDA,0x2B,0xBD,0x3B,0x3A,0x62,0xA0,0x4C,0x19,0x6C,0xF7,0x1E, - 0x6B,0x7C,0x82,0xEC,0x18,0x63,0x0B,0x3E,0x28,0x6D,0x0A,0xB8,0xCF,0x43,0x03,0x74,0xEE,0xBC,0x1A,0xDC, - 0x7D,0xE6,0xA4,0x09,0xD3,0x15,0xFF,0x6F,0x66,0x1F,0x0A,0x47,0x6F,0xB1,0x89,0xF0,0xB2,0x7F,0xF3,0x49, - 0x2C,0x14,0xF5,0x70,0x59,0x20,0xA3,0xFB,0x25,0xB7,0x24,0x9F,0x5B,0xEC,0x56,0x7F,0xD7,0xA5,0xFA,0xBC, - 0x03,0x62,0x4D,0x2F,0xA6,0x58,0x6B,0xDB,0xFF,0xF6,0x0B,0x82,0xDC,0x40,0x20,0x0B,0x32,0x71,0x1C,0x58, - 0xC5,0x91,0xFE,0x4A,0x72,0xF1,0xDC,0x79,0xA0,0x50,0x3D,0x7A,0x59,0x63,0x42,0x49,0x72,0x99,0x15,0xE5, - 0xE8,0x8F,0x72,0xEB,0xD7,0x8C,0x2A,0xB9,0x58,0x62,0x4D,0xAD,0xCF,0x48,0xA7,0x5D,0xE3,0x3C,0x06,0x26, - 0xA5,0x14,0xD6,0xA6,0xC9,0xA9,0x1E,0xF5,0x40,0x59,0xC3,0xE6,0xF2,0x64,0x0D,0x36,0xA6,0x15,0x73,0x46, - 0x61,0xE8,0xDB,0x09,0xC4,0xCE,0x58,0x31,0x0B,0x8E,0x65,0x5D,0x43,0x0D,0x69,0x5E,0xB3,0xA6,0xD5,0x82, - 0x1D,0x2D,0x59,0xDC,0xE2,0x72,0x73,0xF8,0x90,0xA1,0xAF,0xD5,0xB0,0xB7,0xBA,0x0C,0x73,0x8C,0x87,0x0D, - 0x9B,0x46,0xBB,0xB9,0x89,0xBC,0xD8,0x6E,0x78,0xBD,0x01,0x58,0x60,0x17,0xF6,0x1B,0x28,0xD5,0xA2,0xE3, - 0xF7,0xE6,0x69,0xEF,0x05,0x9F,0xB4,0xBA,0x05,0x1B,0x19,0xAE,0x92,0x68,0xDE,0x6B,0x48,0xE5,0x78,0x4A, - 0x51,0xAB,0xBF,0xAC,0xEE,0xE1,0x82,0x4F,0x93,0x75,0x34,0x0A,0x0A,0xC4,0xF7,0xDD,0x9B,0x20,0x40,0xEF, - 0xDA,0x5A,0xFF,0x0A,0xFB,0x76,0xD4,0x37,0x2C,0x75,0x1D,0xCC,0x45,0xAE,0x66,0x6C,0x59,0x5C,0xAF,0x9F, - 0x02,0x33,0x76,0xF8,0xC2,0xBD,0xF0,0xF0,0xED,0x35,0x4F,0xBF,0xA1,0xE7,0xE4,0x0F,0x4B,0xF6,0x89,0x4B, - 0x2A,0xA5,0x2B,0xBE,0x86,0xC8,0x6D,0x1A,0xDA,0xF3,0xD1,0xC5,0x73,0x90,0x90,0xDD,0xAD,0xE4,0xCA,0x59, - 0x91,0x9B,0x57,0xFD,0x42,0x41,0xFE,0xCC,0xCB,0x3D,0xBE,0xE0,0xE4,0x7F,0xE0,0x64,0xEB,0xDB,0x07,0x7E, - 0x42,0x6B,0x9C,0xC7,0xB5,0xAF,0xD0,0x1A,0xF8,0xCE,0x22,0xDD,0xC9,0xB0,0x06,0xDB,0xCA,0x67,0x2D,0x29, - 0x25,0x45,0x78,0x1F,0x6D,0x8D,0x30,0x75,0x6F,0xE0,0x1C,0xA7,0xBF,0x0A,0x71,0x4E,0x89,0x36,0x70,0x3A, - 0x20,0xDC,0x97,0x3F,0x76,0xAA,0xE0,0x73,0xCA,0x81,0xAA,0x1B,0x3C,0x92,0x21,0x24,0x46,0xCB,0xDE,0x6A, - 0xD4,0xA4,0x48,0x9D,0x75,0x94,0xCE,0x5F,0x76,0x89,0xBD,0xD0,0x87,0x3E,0x90,0x28,0xD5,0xA5,0x7E,0x00, - 0xE0,0x87,0xED,0x49,0x67,0xA7,0xCD,0xD1,0xC6,0x8E,0xA9,0x4F,0x6B,0x20,0xC9,0x24,0x18,0xCE,0x66,0x15, - 0x69,0x53,0x51,0x83,0xA5,0x78,0xE1,0x53,0x10,0x26,0x26,0xBD,0xE3,0xC4,0x36,0x70,0xD6,0xB7,0x7B,0x3B, - 0xA9,0x83,0x26,0x1D,0x2C,0x99,0xE9,0x00,0x27,0xF3,0xCC,0x07,0xBD,0x17,0xD3,0xF2,0x93,0x44,0x6A,0xD2, - 0xC6,0xA4,0xBE,0xD2,0xDF,0x09,0xBB,0xBC,0xB3,0x79,0x21,0xE3,0xBC,0xC7,0xC3,0xB8,0xC0,0xA7,0x33,0xED, - 0xDE,0x84,0xEA,0xA7,0x79,0xE3,0x39,0xE4,0x72,0x06,0xD5,0x32,0x31,0xA6,0x66,0xB1,0x20,0xA7,0x83,0x78, - 0x17,0xDA,0x95,0xCA,0x00,0x97,0xBB,0x9B,0xBB,0x13,0xE0,0xFB,0x7D,0x38,0x77,0x55,0x66,0x19,0x33,0x6C, - 0xAA,0x84,0x2F,0x35,0x5C,0xA2,0x72,0x63,0xCD,0xC9,0xB2,0x63,0xB6,0x5C,0xC6,0x3D,0xAD,0x2E,0x0F,0xDD, - 0x9C,0xA6,0xC9,0xAC,0x0C,0xFE,0xE2,0xEB,0x81,0x8A,0x6E,0xB3,0x9D,0xC2,0x90,0x3F,0xD5,0x12,0xF0,0x19, - 0x0E,0xAD,0xEB,0x08,0x97,0x87,0x13,0xF7,0x57,0x90,0xC3,0xF0,0xCB,0xF2,0x8C,0x5D,0x57,0x61,0x4B,0xD7, - 0x44,0xF9,0x6C,0xEC,0x82,0x81,0x92,0xBF,0xB8,0x17,0x3B,0x36,0x1A,0xD1,0x84,0xC7,0x45,0xF8,0xE5,0x9A, - 0x64,0x89,0x68,0x22,0x5F,0xA3,0x8D,0xE4,0x3A,0xD8,0xF7,0x25,0x1A,0xA2,0x92,0x75,0xCE,0x4B,0xBC,0x57, - 0xD5,0xA8,0xFD,0xC3,0xF7,0xC8,0xBE,0x5F,0xE7,0x78,0x10,0x46,0x79,0x3B,0x53,0xEB,0xC2,0xE5,0x2E,0x7F, - 0x0E,0xC5,0xA4,0x42,0xD7,0xFD,0x52,0xFE,0xA8,0x63,0xDF,0xFA,0x31,0xCE,0x02,0xDB,0x84,0xDE,0xED,0x72, - 0x55,0xF7,0x3C,0x56,0x03,0x69,0xC5,0xD7,0x4E,0xC7,0xB5,0x43,0xC0,0xDB,0x31,0x17,0x51,0x57,0x65,0xD6, - 0xA1,0x0C,0x22,0xC8,0xC7,0xD9,0xFD,0x90,0x24,0x5C,0xA5,0xFB,0x94,0x71,0x26,0x88,0x78,0x35,0xC3,0x9A, - 0xD9,0x3E,0x21,0xCC,0x2C,0x97,0xB2,0x48,0x95,0xE9,0x28,0x6B,0x78,0xF9,0xBB,0xA3,0xC2,0xFB,0x04,0x5C, - 0xEA,0xB9,0x46,0xC1,0x16,0xF6,0x7A,0xFA,0x9B,0x91,0xA3,0xCF,0xEE,0x17,0x17,0xA2,0xDF,0x6B,0xCF,0xDD, - 0xCF,0xAA,0x0F,0x9E,0xC6,0x43,0x33,0x4A,0xC2,0xFB,0xFF,0x52,0xD9,0x99,0x38,0x8D,0x02,0xFD,0x01,0x22, - 0xB4,0x51,0xD8,0xE3,0xFC,0xB4,0x6F,0xDB,0x56,0xC3,0xE0,0xC6,0x78,0xFF,0xD6,0x3A,0x6D,0xDF,0xA6,0x5F, - 0xD6,0x2C,0x68,0xD3,0xDC,0x90,0xF8,0xD6,0x96,0xEC,0x3F,0x42,0x9D,0x8C,0xD9,0xE3,0x7C,0xFE,0xCF,0x00, - 0x8D,0x45,0x4F,0x1F,0xF6,0xF1,0x31,0x55,0x73,0x8E,0x8D,0x5D,0xBC,0xCF,0x01,0xC2,0x17,0xEE,0x8D,0xE2, - 0x2C,0xBE,0x37,0x29,0xFC,0x11,0x38,0x58,0xB7,0x30,0xAF,0x6F,0xD5,0x9D,0x24,0x57,0x37,0x6F,0x1D,0x94, - 0x3A,0x46,0xF6,0x13,0xB0,0xBE,0xAF,0x0D,0xB2,0xFE,0xB3,0x4A,0x80,0x20,0xC1,0x6C,0xD6,0xF7,0x39,0x58, - 0x37,0x63,0xB8,0x53,0x7B,0x5D,0x01,0x7E,0x2D,0xDE,0x53,0x76,0xE9,0x12,0x3D,0x77,0x6A,0x61,0xE2,0xB5, - 0x95,0xAF,0x8B,0x99,0x3A,0x27,0xBF,0xB0,0xC1,0xA5,0x80,0xB7,0x66,0x9B,0xAB,0x68,0xA7,0xBB,0x41,0x82, - 0x31,0xFF,0x37,0xD4,0x32,0x50,0x62,0xA4,0x4D,0x84,0xBB,0x30,0x46,0xE8,0x20,0x65,0x63,0xC8,0xD2,0xC5, - 0xA0,0x04,0x76,0x78,0x94,0xFD,0xBD,0x0E,0x1C,0x1B,0xC7,0x4D,0x61,0x9B,0xE4,0x2E,0x1E,0x5B,0x5A,0xD1, - 0xB1,0x64,0x0D,0x20,0xE1,0x4C,0xC8,0xC7,0x8F,0xF2,0x7C,0x0E,0xE9,0x8B,0x5B,0xFF,0x97,0xD5,0x28,0xC7, - 0x7F,0x68,0xA8,0x9C,0xF6,0xC7,0x9A,0x42,0xF0,0x95,0x0A,0x38,0x1F,0x30,0xD2,0xCB,0xCD,0xC4,0xE4,0x3A, - 0xB8,0xEA,0xE4,0xFA,0x04,0x07,0xE1,0x0D,0x6D,0xAC,0x6E,0xC3,0xCC,0xBA,0x37,0x09,0xB8,0x70,0xA6,0x66, - 0x14,0x76,0x3A,0xF5,0x1B,0xE6,0x49,0xA6,0x22,0x2F,0x6F,0xCE,0x55,0x2A,0xF9,0x06,0xE3,0x9D,0x98,0xB3, - 0xB9,0xA7,0x01,0x4C,0x79,0x4A,0xE8,0x9F,0x6A,0xC1,0x34,0x65,0x0D,0x2E,0x9A,0xDC,0x59,0x22,0x25,0x49, - 0xEA,0xB2,0xD2,0x78,0xD3,0xEA,0x55,0x2B,0xE2,0x03,0x3B,0x7C,0xEA,0x6C,0xE9,0x93,0xDA,0x83,0xC2,0x2A, - 0x10,0xD4,0xC5,0xCB,0xC3,0x05,0xCD,0x64,0x1B,0x41,0x60,0xDC,0x3C,0x21,0x1B,0xDD,0x8B,0x64,0x00,0x84, - 0x22,0x15,0xFC,0xB6,0x14,0x9D,0x46,0x12,0x8B,0x34,0x38,0x01,0xA5,0x13,0x19,0x63,0xA5,0x9C,0x4C,0x79, - 0x3C,0xCC,0x64,0x94,0xC2,0xEC,0xC5,0x93,0xD4,0xAB,0xFA,0x71,0x0C,0xB3,0x12,0xB5,0xB4,0xCD,0xAE,0x43, - 0x4C,0xAF,0x3E,0x6F,0x4B,0x8D,0x5F,0x23,0x4A,0x77,0x21,0xB1,0xDA,0x3C,0x43,0x53,0xE5,0x55,0xE3,0x15, - 0xE1,0x3E,0x7A,0x64,0x43,0x54,0x04,0x64,0x2B,0x39,0xB7,0xA0,0x76,0x4F,0xAC,0x04,0x6F,0xDB,0x8C,0x3D, - 0x2E,0xE8,0x0C,0x74,0x67,0x3E,0x13,0x37,0xBD,0x5F,0x23,0x87,0x4B,0x19,0x1D,0x99,0x5E,0xE7,0xDD,0x80, - 0xD1,0x79,0x60,0x87,0x1D,0xFB,0xC0,0x0D,0x52,0x3B,0xE1,0x43,0xE3,0x1F,0x9E,0x25,0x82,0x96,0xC0,0xE0, - 0x97,0x76,0x3A,0xB5,0xF7,0x53,0x96,0xFB,0x18,0xB9,0x06,0x0E,0x98,0x8B,0x26,0x65,0x4C,0xF3,0x59,0x5F, - 0x52,0xF3,0x90,0x6B,0xAD,0x94,0xF6,0x98,0xBB,0x3C,0x78,0x4B,0xED,0xD4,0xCE,0x3C,0x92,0x3A,0x3F,0xB8, - 0x09,0x9B,0x07,0x0D,0x18,0x91,0x6F,0xB5,0x08,0xDB,0x6F,0x9C,0x88,0x38,0x5D,0x2B,0x42,0x7F,0x42,0xB9, - 0x52,0x7F,0x4D,0x0A,0xCD,0xD0,0xA5,0x4E,0x81,0xD6,0x55,0x4C,0x00,0x74,0xD7,0x26,0x9F,0x93,0x2E,0xF9, - 0x12,0x7D,0xA6,0x68,0x58,0xD4,0x13,0x5A,0xC6,0xC2,0xDF,0x36,0x9E,0xC2,0x60,0x59,0x88,0xA2,0x26,0xD5, - 0x7D,0x7E,0x25,0xD9,0xAB,0xBF,0x56,0x3D,0xC9,0x9F,0xB8,0x49,0xD0,0x1C,0xEF,0x0D,0xD4,0xF5,0x4A,0xAE, - 0x98,0x5F,0xF1,0xF1,0x98,0xDF,0x61,0x59,0x08,0x80,0x9F,0x6D,0x58,0xF4,0x7E,0xE0,0x00,0x86,0xDB,0x0E, - 0xF1,0x1F,0xA0,0xD2,0x23,0xB1,0x17,0x1E,0xD3,0xD3,0x18,0x70,0xF2,0xE4,0xCB,0x32,0x7D,0xAC,0xCC,0xC1, - 0xC9,0x80,0x00,0xE6,0xF6,0x8F,0x11,0xBA,0x82,0x80,0x0D,0x78,0x4E,0x7F,0x4F,0x25,0x25,0x41,0xEB,0x4F, - 0xA8,0xFD,0x11,0x37,0xE6,0x71,0xBF,0x75,0xF5,0xBA,0x63,0x20,0xF9,0x6C,0xDB,0xB7,0xD4,0xA3,0xE6,0xC6, - 0x2C,0xEC,0x57,0x7B,0x10,0x5F,0xCD,0xFD,0xF3,0x12,0x70,0x65,0xF4,0xA6,0xC4,0x3D,0xCD,0x1F,0xE8,0x7C, - 0x67,0xB5,0x76,0xD2,0x64,0x85,0x82,0x96,0x53,0xC1,0x03,0x52,0x87,0x36,0x46,0xB7,0x9E,0x7D,0x79,0x6B, - 0x2F,0xE5,0xA1,0x5B,0x77,0xD9,0xD0,0xC1,0x87,0x8D,0xC9,0x46,0x1A,0xC4,0x65,0xDB,0x3E,0x1B,0xAB,0x87, - 0xE6,0xD6,0x34,0x22,0xE7,0xCC,0xDC,0x08,0xFD,0x2B,0x92,0x58,0x2E,0xAF,0xAE,0x86,0xA0,0x79,0x8E,0x3E, - 0xF0,0x22,0x3A,0x7C,0xE6,0xEB,0x42,0x26,0xAD,0x48,0xBE,0xC2,0x5D,0xFC,0x19,0xBB,0x2C,0x25,0xD1,0xFC, - 0x10,0xA7,0x4D,0x2C,0xE8,0x61,0x73,0x42,0x3F,0x61,0x53,0x1F,0x0F,0x8E,0x74,0x03,0x60,0x04,0x97,0xC8, - 0x49,0x46,0xA8,0x37,0x5D,0x4B,0xE5,0x0C,0x34,0x88,0x49,0xEB,0xCB,0xB2,0x49,0x34,0x7D,0x8C,0x8B,0x08, - 0xB5,0xBD,0xA1,0x34,0xCD,0x8D,0x7A,0x2C,0xF4,0xBC,0xD1,0xB0,0xF4,0x32,0xC7,0x39,0x81,0xE5,0xE6,0x0C, - 0x33,0x28,0x9E,0xCB,0xBC,0x11,0xDF,0xCE,0x1B,0xAD,0xAA,0x4D,0x7B,0x11,0x23,0x5F,0x0A,0xBC,0xB1,0x78, - 0xF7,0xBE,0x97,0x14,0x11,0x92,0xB7,0x0C,0xEB,0x65,0xB4,0xB3,0x50,0x6F,0x9E,0x36,0x9A,0x1F,0x56,0x8B, - 0x8F,0x94,0x64,0x36,0x8B,0x5D,0x76,0xBA,0x59,0x3E,0x96,0x26,0x9B,0x1E,0x98,0x96,0x8E,0xB5,0x3C,0xF7, - 0xBE,0x5C,0x9E,0x32,0xD4,0x4D,0x01,0xA3,0x5F,0xF6,0x0F,0x13,0x56,0x7D,0xA2,0xE0,0x2A,0xFA,0x8D,0x63, - 0x41,0x40,0x09,0xB3,0x45,0xBC,0x63,0x51,0xE1,0x7E,0xAA,0xA7,0x1E,0x22,0xC8,0x67,0xF3,0xF7,0xBD,0xE5, - 0x93,0xFC,0x2D,0xC5,0xC3,0x0E,0x0C,0xD7,0x4E,0xB6,0x37,0xD2,0x5C,0xF5,0x7D,0x06,0x94,0xBC,0x84,0xD6, - 0xE5,0x23,0xCB,0xDE,0x8B,0xC4,0xCE,0x09,0x1D,0x69,0x74,0xC5,0xB8,0x1B,0x8D,0xEB,0x43,0x2C,0xA5,0x67, - 0xB6,0xF9,0xAD,0xCA,0x61,0xF9,0xEA,0xA5,0x5C,0xE6,0x17,0x91,0x0C,0x26,0x3D,0x13,0x32,0xB5,0x58,0x8D, - 0x08,0xE5,0xD8,0x6C,0xDC,0x09,0xA7,0x2E,0x6E,0xDD,0x88,0x92,0xF1,0x5E,0x1E,0x57,0x09,0x4C,0x55,0xBA, - 0x3B,0xBB,0x41,0xC5,0x05,0xD4,0xD2,0x4E,0xBE,0x58,0x79,0x69,0xA8,0x9C,0x58,0xFC,0x1F,0x29,0x0F,0x51, - 0x40,0xD7,0x67,0xEF,0xF8,0xD2,0xBE,0xA4,0x91,0xE7,0x9F,0xEC,0xD6,0xB4,0xAF,0x44,0xDE,0xBE,0xA8,0x3B, - 0xDF,0xF9,0xDB,0x55,0x9B,0x4A,0x19,0x3E,0x92,0x1D,0x28,0xD3,0x66,0x71,0xA6,0xEE,0x78,0xFF,0x60,0x7A, - 0x0C,0xB7,0xD4,0x3C,0x5C,0xA4,0x36,0xCE,0x0C,0x53,0x4A,0xD7,0x79,0xFE,0x6F,0x1E,0x47,0xBD,0xF6,0x4B, - 0x9C,0x86,0x60,0xAC,0x24,0x9D,0xFD,0x90,0x5D,0x75,0xFF,0x33,0x2D,0x52,0xF9,0xF7,0x0C,0x12,0x69,0xC2, - 0xE9,0xDC,0xF2,0x8D,0x5C,0xE4,0xA5,0x14,0x06,0x03,0x96,0x3C,0xFB,0x64,0xB8,0xD0,0x7B,0x02,0x81,0x54, - 0x98,0x71,0x2C,0xB2,0x49,0x30,0xF6,0x13,0xB0,0xDE,0x42,0x1F,0x29,0x70,0x78,0x4B,0xB6,0xEC,0x92,0xF1, - 0x7F,0x0D,0xDB,0x33,0xFA,0x53,0x41,0x81,0x61,0xBD,0x8F,0xD6,0xF9,0x79,0x15,0x42,0x8E,0x52,0xD0,0x86, - 0x74,0xFC,0x60,0x4E,0x66,0xC8,0xC0,0xA7,0x36,0x96,0x3E,0x47,0x04,0x06,0x3D,0xAC,0xF2,0xE9,0x09,0x44, - 0xE5,0x47,0x68,0x43,0xF1,0x01,0xD9,0xA3,0x37,0x1E,0x80,0x31,0x9E,0x88,0xDF,0x12,0xCE,0x5E,0x11,0x1F, - 0xF2,0x9A,0xDD,0xB1,0xC2,0xA7,0x3E,0x2A,0x1F,0xD0,0x13,0x40,0x40,0x45,0x8B,0x64,0x71,0x24,0xEA,0x45, - 0x66,0x6B,0x57,0xC6,0xBD,0xD8,0x3A,0xE7,0xF8,0xD6,0xB9,0xC2,0x8F,0x6A,0x7A,0x57,0xB1,0xF4,0x3D,0x4B, - 0xCE,0x22,0x0B,0x19,0x70,0x57,0x81,0x12,0x64,0x2A,0x37,0x43,0xF5,0x18,0x14,0x8C,0x70,0x18,0xE5,0xD0, - 0x06,0x04,0x9A,0xD4,0xDF,0xA4,0xC3,0xE0,0x2E,0xB6,0x03,0x4E,0xDA,0x87,0x2A,0x6B,0x69,0x07,0x4A,0x88, - 0xDE,0x6B,0xCB,0x74,0xDF,0x49,0x93,0x9C,0xFA,0x1A,0xE0,0x46,0x9C,0xB4,0x83,0xC9,0x54,0xC6,0x20,0x55, - 0x09,0x4E,0xFC,0xFC,0x95,0xDA,0xAE,0x80,0x3A,0x01,0x29,0x13,0x2E,0x6A,0x74,0x60,0x2A,0x4D,0xF0,0xAF, - 0x29,0x82,0x20,0x68,0xEC,0x40,0x36,0xFC,0xA7,0x4D,0x45,0x60,0xC2,0x9F,0xCB,0x49,0x46,0xAD,0xAC,0xC9, - 0x27,0x7E,0xE0,0x9C,0x79,0x2F,0x6F,0x22,0xC3,0x7E,0x1D,0xAE,0xFD,0x80,0x02,0xE3,0x2C,0x01,0x77,0x3F, - 0x58,0xBB,0x24,0x16,0x21,0x89,0x44,0xC5,0x3F,0x3A,0x05,0xE7,0xAA,0x99,0x2B,0xB4,0x8F,0xAD,0x5C,0xC1, - 0x80,0x1A,0x99,0xF4,0x3B,0xBA,0x46,0x50,0x09,0x40,0x63,0x5C,0x46,0x3C,0x3F,0x72,0x98,0x50,0x05,0xC6, - 0xF2,0x9F,0x1D,0xA5,0x69,0x93,0x97,0xBA,0x53,0xF7,0xC4,0x15,0x83,0x13,0x1B,0xA4,0xC1,0x9C,0x63,0xB7, - 0x00,0xD0,0xE2,0xF2,0x0C,0xC5,0xB2,0xD3,0x24,0x6E,0x87,0xB7,0x00,0xCC,0x5C,0x62,0x8C,0xA4,0x37,0xF7, - 0x7B,0x82,0x15,0xC5,0x40,0xE5,0x47,0x27,0x5D,0x98,0x02,0x7E,0xE1,0xB2,0x5C,0x07,0x97,0xDA,0x4D,0xD2, - 0x01,0x75,0xBB,0x6D,0x5B,0xD5,0x6B,0x03,0x41,0x14,0xAB,0x7E,0x99,0xE0,0xB5,0xA2,0x8D,0x1E,0x1F,0x8C, - 0x58,0xF4,0xDC,0x8E,0x40,0xDA,0x6B,0x04,0x1B,0x67,0xC6,0x28,0x69,0xE5,0x26,0x7C,0xDC,0x9B,0x73,0x5B, - 0xE4,0x55,0xAC,0x3E,0x78,0x70,0x1B,0x1C,0x0B,0x2F,0xC6,0x98,0xB0,0xBB,0xA6,0xC8,0x61,0x50,0x28,0x4C, - 0x3B,0x36,0x7F,0x79,0x0F,0xBB,0x12,0x09,0xB1,0xA0,0x4F,0xA0,0xDB,0xAC,0x11,0x6B,0xDC,0x61,0x55,0x98, - 0x0A,0xB0,0xB1,0xB5,0x98,0x59,0x9F,0xFA,0xCD,0xF6,0xA1,0xDC,0x76,0x60,0x44,0x2E,0x8B,0x9C,0xF8,0x7D, - 0x6B,0x93,0x0F,0x77,0x8D,0x5A,0xA8,0xDE,0xFF,0x6A,0x76,0x1F,0xE9,0x4D,0x1E,0xDE,0xAA,0xC8,0x6C,0x0E, - 0x8E,0x56,0x54,0x0F,0xA3,0xD0,0x3F,0x4B,0x44,0xBA,0x91,0xDC,0xD8,0x9E,0x77,0xEF,0x4B,0x45,0x7B,0x9E, - 0xF7,0xD8,0x47,0xD1,0xC8,0x4F,0x9E,0xE3,0xD5,0x8A,0xDF,0x0D,0xE3,0x44,0x57,0x6F,0xFB,0xD0,0x70,0x1A, - 0xFB,0x0B,0xB6,0x3E,0xFF,0xE4,0x58,0x40,0xF7,0x3D,0xAE,0xB5,0x35,0x1F,0x25,0x6D,0xA6,0x0A,0x68,0x57, - 0x46,0xAB,0x2D,0x41,0x7D,0xAD,0x3A,0x45,0x78,0x48,0x95,0x2A,0x82,0x81,0xFB,0x31,0xFE,0xD3,0xC9,0x21, - 0xDC,0x62,0x5D,0xB5,0x94,0xEA,0x30,0x3A,0x36,0x2E,0x29,0x54,0xD7,0x0E,0x5B,0x2E,0xC4,0x25,0x21,0x57, - 0xBC,0x8F,0x44,0x39,0x4E,0x95,0xB6,0xB5,0x30,0x09,0x72,0x8A,0x36,0x89,0xF8,0x79,0x5F,0x70,0x19,0xAF, - 0x61,0x1E,0xA0,0xF7,0xF6,0x5E,0xA3,0x7C,0xCA,0xFE,0x72,0x87,0xF4,0xA5,0x45,0xFC,0xA2,0x5D,0x31,0x00, - 0x5C,0xC5,0x28,0x4E,0x61,0x84,0x79,0x7C,0xDB,0x4B,0x49,0xAA,0x69,0xFC,0xED,0xA9,0x6C,0x38,0x1A,0x04, - 0xF4,0x71,0xCB,0x46,0xDE,0x18,0xB3,0xEC,0x84,0x8F,0x38,0x9E,0x75,0xB9,0x34,0x02,0x65,0xAE,0x8C,0x4B, - 0x96,0xA1,0x50,0xFA,0x66,0xCB,0xF1,0x1E,0x75,0x38,0x63,0x24,0xAA,0x85,0xB2,0x2A,0xB4,0x40,0xE3,0xAB, - 0xF8,0x87,0xBB,0x8E,0x75,0x43,0xA3,0x59,0x27,0x9B,0x48,0xE8,0x1E,0x6A,0x7B,0x03,0x02,0x90,0xD4,0x65, - 0xF7,0xDA,0xAB,0xC8,0xFD,0x66,0xA5,0x4F,0xFC,0x61,0x72,0xCE,0x3D,0x8C,0xB8,0xFA,0x76,0x2F,0x90,0x95, - 0xCC,0xCF,0xCC,0x8C,0x34,0xE4,0xC6,0xB3,0xAF,0x60,0x9B,0xAD,0x93,0xA0,0xD9,0x98,0x8F,0xCB,0xC0,0x8D, - 0x95,0x46,0x59,0xA3,0xF6,0xC1,0x9D,0x49,0x7F,0x2D,0x72,0x09,0x39,0x33,0x8D,0xF9,0x02,0x08,0x32,0xC0, - 0x49,0x89,0x96,0xB5,0x99,0xAD,0x8D,0xFB,0xC9,0xB5,0x99,0x7B,0x17,0xE7,0x5C,0x86,0xCD,0x81,0x9A,0xF3, - 0xCF,0xDC,0x25,0xB1,0x09,0xDF,0x13,0x30,0x75,0xB0,0x12,0xBB,0x23,0x92,0x92,0xBB,0xF7,0xB1,0x42,0x8A, - 0x84,0x7E,0x06,0x49,0x46,0x25,0xE5,0x23,0x88,0x6D,0x9B,0xBF,0x6E,0x0D,0x07,0xB0,0x47,0xA3,0x07,0xC6, - 0xC7,0xB4,0xDB,0x62,0x06,0xD3,0x6D,0xD6,0xBA,0xB9,0x28,0xC0,0xDD,0xBF,0x07,0x87,0x29,0xEC,0x1C,0x2A, - 0x6A,0x1F,0x36,0xFC,0x5C,0xC9,0x46,0x94,0xE9,0x52,0xD7,0x17,0xEA,0x94,0x6D,0x22,0x2F,0x9A,0xAC,0xB3, - 0x2B,0xB1,0xFB,0x1A,0x87,0x18,0x83,0xBC,0xCA,0xE9,0xE2,0x25,0x24,0x95,0x25,0x0A,0xDE,0xF4,0xF2,0xA3, - 0xE2,0x1D,0x1D,0x6D,0xD4,0x20,0x0D,0x73,0xF3,0x98,0x8F,0x3F,0x6D,0x7A,0x82,0xC2,0x8A,0x55,0x4F,0x45, - 0xE7,0x32,0x18,0xA2,0xAE,0x9D,0x26,0xCD,0x7E,0xFA,0x50,0xDF,0x6D,0x98,0x09,0x48,0x4F,0xB1,0xD1,0xE9, - 0x15,0xDB,0xD6,0x8D,0x05,0xF0,0x03,0xD8,0x4C,0x99,0x20,0x8F,0x49,0x56,0xEA,0x0F,0x8E,0x5B,0xAB,0xE4, - 0xDF,0x9A,0x1B,0x8F,0xEA,0xF2,0x77,0x2F,0x80,0x71,0x7F,0x5C,0xAB,0x98,0x89,0xB6,0x90,0x1F,0x13,0x2B, - 0x8E,0xCA,0x1F,0xCD,0x9F,0x7C,0x06,0x6A,0x36,0x91,0x86,0xF4,0x1D,0xB3,0xD1,0x08,0xAE,0x73,0x80,0xC4, - 0x37,0x39,0x6C,0xA8,0x1C,0xEC,0x96,0x37,0x39,0xD0,0x58,0x5F,0xCC,0x59,0x21,0xFE,0xFC,0xF3,0x3E,0x51, - 0x49,0xD2,0xBE,0xED,0x5B,0xDB,0xA3,0xDA,0x83,0x5C,0xC4,0xE7,0x1A,0x4B,0x97,0x33,0x35,0x50,0x5B,0x3D, - 0x8C,0xDD,0x85,0x89,0x04,0x5C,0x1F,0xC0,0xDB,0xFF,0x3A,0xF3,0x30,0x8B,0xD0,0x2A,0x3A,0x15,0xA1,0x81, - 0xF8,0x03,0xB8,0x84,0x5A,0xF0,0xB0,0xF0,0x05,0x20,0x2C,0x90,0x45,0x68,0xAB,0xD2,0xC3,0x41,0x9E,0xD6, - 0xD4,0x43,0x4C,0x30,0xB0,0x1D,0x51,0x1A,0x14,0xF6,0xD1,0x3D,0xAE,0xBD,0xF1,0x27,0xDD,0xE9,0xC2,0x62, - 0xB1,0x41,0x76,0x2B,0x32,0x88,0x99,0xB5,0x95,0x0A,0x71,0x15,0xD8,0x6F,0x4C,0x57,0x4A,0x55,0x8A,0xBA, - 0xB1,0x22,0x6E,0x59,0xE1,0x21,0x10,0xA1,0x88,0x6B,0x12,0x10,0x7F,0x47,0x35,0xB6,0xB2,0xAF,0x49,0x51, - 0x92,0x5E,0x92,0x8F,0xF0,0x63,0xF6,0x68,0xCA,0x37,0xC9,0xC1,0x33,0xAC,0x6F,0x5D,0x61,0xE6,0xB1,0x21, - 0xD6,0x6B,0x09,0x32,0x6A,0x16,0xB6,0xB7,0x3F,0x2A,0xEB,0xF5,0xC1,0x59,0x51,0x61,0x72,0xED,0x8D,0x94, - 0x0E,0xF0,0xFA,0x08,0xF1,0x19,0x6D,0x12,0xEB,0x0A,0xC2,0x38,0x08,0x6E,0xBE,0x7A,0xE2,0xB8,0xF2,0x1B, - 0xEC,0xDD,0x78,0x3C,0x48,0xE9,0xE2,0x7A,0x1D,0x27,0xCD,0x6B,0x63,0x9B,0xB1,0xFE,0x1C,0x8E,0x48,0x95, - 0x45,0x97,0xB3,0x68,0xBB,0xAA,0x35,0x31,0x8F,0xF3,0xF3,0x99,0xCD,0x7D,0x45,0x15,0xC5,0x6A,0x8B,0x7C, - 0x58,0x27,0x3A,0xCC,0x08,0x52,0x88,0xF3,0xB9,0x21,0xED,0x8A,0xA3,0x1D,0xAD,0x8E,0xD8,0x24,0xDF,0xDC, - 0x09,0x33,0xC2,0xD8,0xBA,0xA7,0xE5,0x18,0x47,0x25,0xA2,0xFE,0x5E,0xBD,0x7D,0x71,0x29,0xA3,0x89,0x92, - 0x39,0x28,0x59,0x6B,0x21,0x5F,0x52,0x0F,0x99,0xD1,0xF4,0xBB,0x8D,0x0D,0x30,0xBF,0x37,0x22,0x4A,0xF9, - 0xE9,0x0E,0xE3,0xAD,0x20,0x60,0xC4,0x4D,0x41,0xBD,0xA4,0x90,0x36,0xE8,0x2C,0x5F,0xE3,0x5D,0x07,0x54, - 0x7C,0x3F,0xDD,0x63,0xA5,0x9C,0xB2,0xB8,0x58,0x40,0x06,0x73,0xBD,0x00,0xE2,0x98,0x9A,0x60,0x14,0xB0, - 0x01,0x93,0x7F,0x75,0xB8,0x3D,0xEE,0x8E,0xDC,0x10,0xCB,0x8C,0xAC,0xFF,0x5F,0x36,0x4A,0x77,0x95,0x81, - 0xB7,0xEB,0x23,0x9D,0x6C,0xF5,0xC4,0x97,0x54,0x8C,0x3B,0xFF,0x52,0xC1,0xCC,0x61,0x51,0x14,0x04,0x75, - 0x26,0x57,0xEC,0x1B,0xB3,0x16,0x2C,0xD2,0x6C,0x18,0xF4,0x04,0xC8,0x3A,0xE7,0xD4,0xE1,0x1D,0xE4,0xE0, - 0xF1,0x3D,0xD0,0x45,0x95,0xB9,0xBD,0x47,0xBB,0x72,0x45,0xE4,0xE4,0xED,0x11,0x35,0xFE,0x75,0x32,0x96, - 0x5E,0xA1,0xAD,0x75,0x0F,0x3A,0x46,0x83,0x40,0x51,0xD9,0x71,0xFC,0x5B,0xBD,0x6A,0x84,0xE5,0x7C,0x7C, - 0x30,0x37,0x83,0x68,0x2B,0xF3,0xA8,0x84,0xF5,0x8E,0xDE,0xB7,0x15,0xEC,0x4E,0xC1,0x17,0x94,0x0C,0xB9, - 0x96,0xD4,0xC4,0x75,0x11,0x68,0x7F,0xB3,0x82,0xAF,0xDD,0x0A,0xD0,0x2B,0x02,0xA8,0x01,0x6B,0x9F,0xA9, - 0xF1,0x0E,0x18,0xA7,0xD9,0x59,0x1E,0x7F,0xF1,0x2A,0xCB,0x3D,0xB4,0x22,0xE6,0xDB,0xDA,0x3B,0xFD,0x5A, - 0x2A,0x16,0xCC,0xDC,0x99,0x31,0xDE,0x81,0x6C,0x36,0x69,0xBE,0x74,0x1E,0x76,0x22,0x87,0x10,0x84,0x33, - 0x98,0x3B,0x7A,0x9A,0x28,0xE2,0xE6,0xE8,0xF9,0x35,0x04,0x4D,0xAC,0x9B,0xCD,0x8D,0x19,0x33,0x32,0x0B, - 0x68,0x16,0x13,0x3D,0xF2,0x7D,0x30,0xE6,0xDF,0xCA,0x47,0xCA,0xD8,0x1F,0x27,0x7B,0xC9,0x2A,0xD9,0x79, - 0xF4,0x53,0x82,0xF1,0x70,0x34,0xA6,0x2F,0xFD,0x91,0x39,0x19,0x78,0x35,0xA0,0xCE,0xC8,0x2D,0xA7,0x02, - 0xBD,0xC5,0x39,0xD1,0xDF,0xD0,0xE1,0xD7,0xB0,0xCD,0x00,0xD6,0x17,0xE0,0xB6,0x70,0xB4,0xC0,0xD3,0x13, - 0x68,0x0F,0xA6,0x1D,0xB0,0x80,0xE9,0xAE,0xE7,0x27,0x77,0xB3,0x8D,0x2C,0xA1,0x87,0x93,0x7B,0x01,0x4C, - 0x44,0xCE,0x29,0xB6,0xE6,0x32,0x89,0x31,0x72,0x8B,0xAA,0xA9,0xB5,0xA9,0xF4,0x27,0x76,0xCC,0x90,0x22, - 0x5E,0xA6,0x05,0x2D,0xA4,0x0E,0x60,0x66,0xF6,0xAA,0x69,0x12,0x0F,0x68,0xFE,0xF2,0x58,0x40,0x5F,0x7A, - 0x80,0x84,0xAB,0xBC,0x35,0xA0,0x28,0xB3,0x63,0x6F,0x3D,0x54,0x54,0xAE,0x24,0x62,0xB7,0x98,0x5D,0xB5, - 0x15,0xAF,0x68,0x95,0x40,0xC6,0x99,0x33,0xCF,0xA5,0x76,0x01,0x2A,0x03,0x58,0x6C,0x5C,0xA7,0x81,0x8B, - 0xB0,0x8B,0x0A,0xCE,0x50,0xA8,0xA5,0xBF,0xAC,0x26,0x06,0x8C,0x55,0xA3,0xE6,0x60,0xB8,0x55,0xE3,0x02, - 0xF8,0x6B,0xC7,0x3A,0xBC,0xC8,0x63,0x53,0x7B,0xA7,0x04,0x06,0xCA,0x91,0xE8,0x99,0x5B,0xEB,0xBE,0xF4, - 0x7D,0x5A,0x2E,0x0C,0xA1,0xFA,0x14,0x44,0x14,0xC5,0x43,0x3D,0x95,0xF0,0xA2,0xCA,0x9D,0x71,0x56,0x5E, - 0xBD,0xAA,0x22,0x4A,0x5E,0xCA,0x3E,0x5D,0xDC,0xA4,0x7F,0xDE,0x09,0x4B,0x8A,0x1F,0x9B,0xA0,0x02,0x78, - 0x07,0x40,0x25,0x0E,0x59,0x56,0x1B,0x5A,0xB6,0x2E,0x6B,0x23,0x7F,0xA1,0x57,0x37,0x27,0xDF,0xF4,0xEB, - 0xD1,0x4B,0x53,0xA1,0x23,0x82,0xE1,0x5B,0x3C,0xA9,0x1B,0x78,0x9A,0xC0,0xB0,0xFD,0xDA,0x0D,0xE9,0xF2, - 0x22,0x68,0x9A,0xAE,0xB9,0x36,0x0A,0x9F,0x18,0x7F,0xB8,0xB1,0x95,0x4F,0x93,0x70,0x23,0x69,0x28,0xB2, - 0xB7,0x95,0x42,0xB5,0xC4,0x4E,0xBC,0xA8,0x49,0x05,0xEB,0xFD,0x07,0xF7,0x22,0x47,0xB0,0x92,0x95,0xD0, - 0x90,0x01,0x02,0x8F,0xF2,0xFA,0xC8,0xF1,0x52,0xF6,0x26,0xF5,0x94,0xF3,0x89,0xD1,0x1E,0x91,0xAE,0x4E, - 0xFD,0x06,0x73,0x46,0x11,0x3B,0x9C,0x44,0x14,0x14,0x4C,0x32,0x98,0xDB,0x94,0xA2,0x30,0xF9,0x13,0x95, - 0xDA,0x23,0xB9,0x34,0xB5,0xB6,0x74,0x10,0xCB,0x5E,0x9C,0xB2,0x6F,0xB7,0x05,0xC1,0xB5,0x9B,0xDF,0x25, - 0x34,0xB5,0x15,0xA7,0xC7,0x5D,0x0A,0x47,0x57,0x36,0xD6,0x41,0xA7,0x9F,0xAA,0x35,0x35,0xB4,0xF9,0x11, - 0x65,0x9F,0x31,0xB4,0x0A,0x9B,0x1E,0x75,0x2A,0x60,0xAA,0xCC,0x1E,0xEA,0xB9,0x25,0x07,0xD7,0xA7,0x2A, - 0x7D,0xF8,0x82,0xE4,0xEF,0xD9,0xF4,0x9A,0x9E,0xF5,0x7E,0x98,0x9C,0xD6,0xE4,0x77,0x15,0xE8,0xC2,0x0F, - 0xDF,0x79,0xA4,0x0D,0x3C,0xD2,0xB7,0xD8,0xD4,0x98,0x14,0x96,0x20,0x2B,0x67,0x07,0x11,0x98,0x6E,0x59, - 0x9D,0x93,0x8B,0xC0,0x4E,0xAE,0xC6,0xD9,0xDE,0xBB,0xA4,0x0C,0x0E,0xDE,0x63,0x2C,0xBC,0xBF,0xBF,0x98, - 0xCD,0xDA,0x32,0x4E,0xDF,0x3C,0x16,0xFD,0xC6,0x0C,0x57,0xBC,0x7C,0x02,0xF6,0xF8,0xCE,0x57,0x32,0xBD, - 0x5B,0x09,0xA7,0x5D,0x47,0xEF,0x71,0x2D,0x3C,0x96,0xFF,0x3F,0x4D,0xD8,0x97,0xAB,0xA6,0xBC,0x17,0x5F, - 0xA9,0x1A,0x97,0x5D,0xB6,0x82,0xA0,0x19,0x43,0xD2,0xEE,0xE5,0xC7,0x4B,0x91,0x0F,0x3C,0x8D,0x40,0x18, - 0xDD,0x3B,0xE9,0x22,0x20,0xED,0x6B,0x03,0xF1,0x9F,0x76,0x2C,0xE8,0xD0,0x48,0x91,0xE3,0x63,0x26,0x18, - 0x38,0x4A,0xAA,0x04,0x92,0xCE,0x7F,0xA1,0x6B,0x21,0x00,0x81,0x92,0x32,0x86,0xA5,0xCA,0x0A,0xCF,0xC7, - 0xD4,0x5F,0xA5,0x82,0xB1,0x09,0xCD,0xD6,0x66,0xDE,0x1D,0x4B,0xE2,0x13,0x39,0x46,0x72,0xE0,0x7E,0xE9, - 0xDC,0x8F,0x79,0x34,0x92,0x32,0x65,0xC5,0x29,0x4B,0x8B,0x73,0x54,0xFD,0x29,0x10,0x51,0x47,0x9E,0xAC, - 0x13,0x67,0x26,0x76,0x8B,0x4A,0x74,0xE7,0x3E,0x6F,0x61,0xAB,0xEB,0x15,0x51,0x7B,0xF0,0xD3,0xD1,0x12, - 0xFA,0xC3,0xF5,0x17,0x2D,0x9B,0x43,0x2D,0x22,0xD8,0xCE,0x3A,0x47,0xA4,0xFD,0x75,0x97,0x0E,0xC8,0x66, - 0xF1,0x23,0xD3,0x7B,0x7C,0x4A,0x94,0x6E,0xE7,0xF5,0x2C,0x8D,0x34,0x37,0x75,0xDF,0xD4,0x65,0x4E,0x80, - 0xFA,0x6C,0x1D,0xEF,0x9D,0x84,0x3A,0x21,0xA0,0x2A,0xC4,0xDE,0x5D,0x54,0x43,0x62,0x77,0x48,0x57,0xF3, - 0x71,0x7B,0x2D,0x8D,0xBE,0x15,0xE8,0x0A,0x79,0xD5,0x33,0x5E,0x43,0x71,0x9E,0xA1,0x72,0x4F,0x8E,0x62, - 0x20,0x08,0xA9,0x0D,0x4A,0xC4,0xF6,0x2A,0x39,0x6C,0x65,0xFD,0x3E,0x21,0x0C,0x8A,0x4E,0xC9,0xF4,0x51, - 0xD6,0xC7,0x8E,0x92,0xB0,0xF2,0xA8,0x54,0xEA,0xA4,0x64,0x9A,0x29,0xBB,0x9A,0x5E,0xFA,0xF2,0xE8,0x0E, - 0x84,0xD2,0xB8,0x6A,0x3B,0x40,0x41,0xBB,0x21,0x0A,0xAB,0x69,0x27,0x2C,0xA7,0x2A,0xB1,0xF9,0xEB,0xCF, - 0x1B,0x6E,0x25,0x7E,0xEF,0xEB,0x6F,0x1F,0x20,0xCB,0x54,0x93,0x0E,0x33,0xFA,0x31,0xD9,0xD9,0x09,0xD2, - 0x8B,0x81,0xEA,0x0D,0x91,0xD6,0x9F,0x92,0xDF,0xBC,0xDA,0x76,0xD1,0x9A,0x0D,0x70,0x3E,0x13,0xC9,0x85, - 0x1F,0xDE,0x23,0xBD,0xDC,0xB2,0x97,0x7B,0x0B,0x96,0x2B,0x9D,0x6D,0xF4,0xC4,0x56,0xC2,0xDF,0x59,0xC0, - 0x83,0x18,0xF5,0x91,0x51,0xB2,0x59,0x29,0x12,0x36,0x4B,0xC6,0xC3,0xD0,0xC6,0x86,0x4A,0x58,0x54,0xB7, - 0x02,0x9F,0xEE,0x11,0xC1,0x14,0x2B,0x97,0xD1,0xD7,0xDD,0x97,0x07,0x7B,0x26,0xF0,0xCE,0x94,0xBB,0x83, - 0xC0,0xDC,0xEE,0x96,0xFE,0xC3,0xD4,0x06,0x86,0x58,0xBD,0xC1,0x52,0xB7,0x67,0x1E,0x6D,0xEB,0x81,0x1B, - 0x70,0xB1,0xDD,0x96,0x87,0xBA,0x9D,0x26,0x91,0xEA,0x7D,0x1B,0x12,0xDE,0xA2,0x87,0x31,0x77,0x86,0xAB, - 0x1C,0x5A,0xEE,0x7F,0xBC,0x95,0x2E,0x53,0x5B,0xFE,0x44,0x5F,0x1E,0x48,0x4A,0xA8,0x2F,0x3B,0x2E,0x6F, - 0x0F,0xCD,0xF2,0xC3,0xB7,0xD2,0x05,0xDE,0x8A,0x1C,0xC7,0x2F,0xEA,0x58,0xFF,0x3D,0x22,0xCF,0xAD,0xEE, - 0xE6,0xA5,0xB7,0x2B,0xFE,0xF2,0xF6,0x87,0x8F,0xEF,0x5A,0x61,0x67,0xC0,0x3F,0x53,0x18,0xD2,0xA7,0x46, - 0x08,0x17,0x57,0x39,0x89,0x5C,0x90,0xF1,0xD1,0xCD,0x76,0x62,0x4E,0xFD,0xAD,0xFF,0x18,0xD4,0xEE,0xAB, - 0x88,0x9E,0xB6,0xD8,0xDB,0x7C,0x0C,0xDA,0x80,0x39,0x0A,0x78,0x15,0x6B,0x75,0xF9,0x69,0xB1,0x57,0xBE, - 0xD7,0x95,0xC2,0x1A,0x6E,0xD3,0x89,0xB9,0xF2,0x0B,0x7B,0x2A,0x27,0x5E,0x91,0x91,0xBB,0x9B,0x67,0xDD, - 0x02,0xB6,0xFF,0x7C,0xC4,0x6C,0x5F,0x78,0xC6,0x80,0x9B,0x1D,0xB7,0xE2,0xE1,0x79,0x38,0xBF,0x10,0x55, - 0xF7,0x63,0xFC,0x69,0xD3,0x2E,0x8C,0x44,0x31,0xED,0xAF,0xB6,0x47,0xFC,0x41,0x11,0xF4,0x8D,0x0E,0x44, - 0x5A,0x2D,0x22,0x26,0xDC,0x73,0x0E,0x9F,0x73,0x6F,0x56,0xD4,0x58,0xEF,0xF9,0xD4,0x6C,0xE0,0x78,0xFF, - 0x43,0xEE,0x62,0x33,0xAD,0xB9,0xDE,0xCC,0x60,0x75,0x5E,0xEA,0xD0,0x8C,0xBA,0x94,0x7E,0xD5,0x65,0x64, - 0x8E,0xD5,0x20,0x60,0x9E,0xC7,0xB9,0x77,0x27,0x26,0x0F,0xA5,0x9B,0xA8,0x46,0x5F,0x41,0xC7,0x47,0xF2, - 0x55,0xE0,0xE1,0x85,0xB0,0x85,0x9F,0x41,0x77,0x25,0xD5,0x92,0x65,0x86,0x55,0x96,0x75,0xA6,0xAA,0xBB, - 0x4A,0xCA,0x79,0x10,0x7E,0x56,0x49,0x11,0x30,0xA2,0xC2,0x6C,0x74,0xA5,0x44,0xAB,0xE5,0x8B,0xDC,0xBF, - 0x7F,0x57,0xCD,0x50,0x3A,0x17,0x9D,0x69,0x82,0x47,0xFA,0x6A,0x8D,0x9F,0xCC,0x6A,0x1C,0x89,0x20,0x38, - 0xFE,0x94,0xEB,0x9E,0xB0,0x99,0x39,0x09,0x3F,0x27,0x5B,0x7C,0xF6,0xC6,0xDF,0x44,0x12,0x17,0xE6,0x54, - 0x0A,0x45,0x23,0x12,0x45,0xC8,0x3B,0x6D,0x76,0x68,0x21,0x39,0x5F,0xC3,0x17,0x4D,0x17,0xD8,0x99,0x42, - 0xAB,0x73,0x84,0xEF,0xE1,0x01,0x4A,0x5B,0x24,0x63,0x71,0x4F,0x02,0xE8,0x8D,0xD2,0xAA,0x5B,0x7A,0x3C, - 0xF4,0x5C,0x04,0xCA,0x6B,0x72,0xC2,0x85,0x34,0xE2,0x8F,0xA3,0x1B,0xC3,0x70,0xDC,0xBC,0x71,0x25,0x15, - 0xA4,0x4D,0x1B,0xED,0x38,0xC1,0x63,0x42,0xAD,0x2E,0x5F,0x3D,0x74,0xAC,0x48,0x99,0xFC,0xCB,0x7B,0x4D, - 0xB7,0xAC,0xF0,0x06,0x22,0xD7,0xCE,0xBD,0x5E,0xF2,0x14,0x28,0x65,0x98,0x70,0x58,0x8D,0x92,0xEC,0x13, - 0x92,0xD3,0x92,0xE3,0x55,0x6E,0x7C,0x5D,0x9A,0xBD,0x5B,0xC5,0x13,0x27,0x27,0x07,0xAE,0x13,0x79,0xA1, - 0x55,0x8D,0xF5,0x22,0x6F,0x90,0x4A,0xE0,0x1D,0x11,0xE9,0x5C,0xA3,0xD1,0x52,0xFC,0x38,0x45,0x02,0x2C, - 0x1A,0x4E,0xF5,0xB3,0x72,0xA0,0x56,0x3A,0x26,0x35,0x7A,0x8B,0x12,0x60,0x66,0x1D,0x99,0x59,0xCE,0x1D, - 0x8A,0xB7,0x14,0x2C,0xDA,0x34,0x7B,0xCD,0x15,0xE1,0x6A,0x90,0x98,0x08,0xBF,0x74,0x99,0x31,0xB4,0x3C, - 0x57,0x35,0xF2,0xD8,0xC2,0x22,0x27,0x1C,0x11,0x2B,0x46,0x46,0xF0,0x0D,0x55,0x2C,0x52,0xF4,0xB9,0xD8, - 0x91,0xB1,0xA9,0xD7,0x0E,0x3E,0xC5,0x67,0x54,0x5A,0xD6,0x0E,0x26,0x19,0xEE,0xFE,0xF4,0xCB,0xD5,0xE5, - 0x91,0xA4,0x1A,0xD5,0xB6,0x1B,0xB9,0x7A,0x3D,0x64,0xF0,0x7C,0x39,0x84,0x43,0x50,0x91,0x68,0x6C,0x4D, - 0x4F,0xE2,0xE7,0x0A,0x1B,0x37,0x07,0x9C,0x8A,0xDE,0xCE,0x0E,0x26,0xD7,0xC9,0x06,0x0D,0x5C,0xBA,0x74, - 0x58,0xC8,0x6F,0x1F,0x1D,0xB6,0x05,0x41,0x16,0x04,0xD9,0xC9,0x02,0x95,0x9D,0x3A,0x1E,0x6D,0x10,0xD8, - 0x9F,0xB7,0x8B,0x06,0x6E,0x67,0x68,0x01,0x49,0xFC,0xBD,0x29,0xA3,0xDC,0x70,0x96,0x83,0xBE,0x5C,0x3D, - 0xD2,0x2B,0x21,0xBC,0x08,0x19,0x19,0xCD,0xCD,0x5B,0xFA,0x3C,0xF3,0x1A,0x1D,0xCF,0xE8,0x6E,0xC0,0xD3, - 0x0E,0x4F,0xDA,0x7A,0x1B,0xDC,0x5E,0xE2,0xC4,0xB3,0xC4,0x8B,0x6F,0xC0,0x7F,0x1F,0x8C,0xFF,0x2B,0x7F, - 0xD1,0xBD,0xBA,0xEF,0xA3,0x2E,0xC2,0x5E,0x8A,0xE3,0x6B,0x5F,0x6A,0xDF,0xB0,0xE3,0x7B,0x11,0x73,0x90, - 0x4D,0x6B,0x0A,0x7A,0xBE,0xCC,0xD8,0x51,0xDE,0xCC,0x19,0x1D,0xB3,0xA8,0xB9,0xFA,0x13,0x2F,0x19,0xA5, - 0x29,0xD1,0xAA,0x8D,0x23,0x22,0xB1,0xE2,0xF7,0x05,0x19,0xFD,0x14,0x6E,0x4F,0x9C,0x36,0x2D,0x4F,0xA6, - 0xEF,0xCE,0xBD,0x2A,0x26,0xC9,0x1B,0x6E,0xF3,0xDB,0x28,0xE2,0x47,0x8E,0x75,0x7F,0x39,0x10,0x30,0x62, - 0xFC,0x88,0xF2,0xE4,0x35,0xBA,0x91,0x92,0xC1,0x0D,0x3B,0x8F,0xB2,0xCA,0xBE,0x32,0xB0,0xF2,0x7E,0x75, - 0xE2,0x99,0x6B,0x83,0x40,0x0E,0x17,0xA3,0x40,0x65,0x32,0xAA,0xA7,0xA4,0xF6,0x25,0x9F,0x88,0x87,0x81, - 0xFF,0x48,0x3B,0x86,0x1D,0xCC,0x22,0xC5,0x88,0x98,0x79,0x04,0xBD,0x57,0x2C,0x84,0x96,0xE5,0x43,0x5C, - 0xD8,0x77,0x5D,0x10,0xAC,0xA6,0xF7,0xF6,0xB8,0xB6,0x40,0xF1,0x39,0x56,0xFB,0x18,0x2A,0x69,0x5A,0xC8, - 0x2D,0xA5,0x2A,0x73,0x0D,0xA7,0x46,0xB7,0xC9,0x8A,0xAD,0x99,0xB9,0x6E,0xD8,0x9B,0x09,0x91,0x3F,0x7F, - 0x62,0x4E,0x21,0xDF,0x44,0xE6,0xC4,0x28,0xDF,0xDB,0x11,0xB6,0x79,0x0C,0x62,0x56,0x96,0xA1,0x32,0x08, - 0x36,0x41,0xB4,0x64,0xB1,0xEA,0xF7,0xDA,0x0A,0x6F,0x77,0x78,0x94,0x2F,0x22,0x1A,0x08,0x52,0x79,0xE2, - 0x87,0x9B,0x1C,0x4C,0x8E,0xBE,0xBB,0x50,0x64,0x2C,0x19,0x3E,0x8B,0x5E,0x64,0x6B,0x2E,0x0A,0x73,0x89, - 0x70,0x00,0x7C,0x5C,0x16,0x23,0x23,0xFB,0xA5,0x2C,0xA5,0xE6,0xB0,0xF9,0x3F,0xB1,0x81,0x91,0xFA,0x3C, - 0x9C,0x3D,0x32,0x11,0x5A,0xF4,0x34,0x54,0xC2,0xA3,0x5E,0x37,0x27,0x73,0x9D,0xA9,0xDA,0x75,0xCD,0x23, - 0x07,0xFE,0x4E,0x93,0xD0,0xDE,0x4C,0x72,0x24,0x9F,0xFB,0x3C,0x94,0xB9,0xC7,0x0D,0x6D,0xFF,0xEB,0xA2, - 0x51,0xDD,0x61,0x79,0x79,0x17,0xD7,0xA3,0xC7,0x9C,0xCC,0xC2,0xDB,0xF5,0x4B,0x91,0x06,0x3E,0x02,0x30, - 0x2A,0x1B,0x67,0xF2,0xEE,0xD1,0xDC,0x1D,0x83,0x5B,0xDE,0xF7,0x80,0x1C,0xCA,0x32,0xA1,0x16,0xFE,0xD0, - 0xB6,0x23,0x24,0x72,0x66,0x51,0x54,0x63,0x92,0xDA,0x25,0x61,0xAC,0x9D,0x9B,0xF6,0xB6,0x9D,0x35,0xA5, - 0x95,0xD6,0xF3,0xA4,0x34,0xD2,0x4E,0x21,0xAF,0x18,0x6C,0xCF,0x2F,0x83,0x65,0x21,0x3C,0x58,0xBB,0x04, - 0x31,0x37,0x81,0xF2,0x40,0x15,0x22,0xEE,0x1C,0xA7,0x40,0x5B,0x52,0x34,0xE9,0x54,0x78,0x3A,0x34,0x28, - 0x87,0x5B,0x2E,0x6C,0xDD,0xAA,0x60,0x00,0x80,0x2A,0x26,0x47,0x5D,0xD4,0x15,0x25,0x43,0x5E,0xDD,0xA5, - 0xC0,0x95,0x29,0x11,0x22,0x99,0x90,0xBF,0xCB,0xF6,0xCB,0x5A,0x9A,0x6F,0xF1,0x9A,0x18,0xE4,0x79,0x08, - 0x02,0x28,0x4C,0x8C,0x58,0xFA,0x26,0x8C,0x75,0x11,0x98,0xC3,0x30,0x72,0x36,0x5D,0x44,0x51,0x61,0xEA, - 0x8E,0x18,0x1E,0xF7,0x8A,0x95,0xE8,0x9D,0xFD,0x99,0x54,0xF9,0xC8,0x50,0x80,0x67,0x7F,0xD6,0x4D,0xC8, - 0x09,0x18,0xA6,0x6D,0x6C,0x81,0x1D,0x06,0x49,0x53,0x74,0x73,0x26,0x88,0x47,0x3B,0x29,0x1C,0x47,0x4A, - 0x5A,0x90,0x55,0xFD,0x48,0xA4,0xBC,0xF9,0x2F,0xBA,0x18,0xE9,0xC5,0xC2,0x98,0xF8,0xB8,0xAD,0xE1,0xB1, - 0x36,0x6D,0x92,0x3F,0x52,0x50,0x7E,0xE1,0x63,0xBC,0x17,0xB3,0xDF,0xAC,0x3B,0x41,0x37,0x40,0xEF,0x12, - 0x36,0xF2,0xE1,0xB6,0x4C,0x8D,0x5E,0x23,0x68,0xAA,0x64,0xB0,0xFA,0xCA,0x0C,0x39,0xA6,0x16,0xE9,0x97, - 0xEB,0x27,0x52,0x68,0xFD,0xAE,0xC6,0xC0,0xF3,0x6E,0x2E,0xC4,0x51,0x68,0x58,0x92,0xB9,0x8B,0x88,0x58, - 0x1F,0x50,0x48,0xB2,0x99,0xCB,0x70,0x78,0xB2,0x10,0x62,0x42,0xA4,0x88,0x4C,0x24,0xFC,0x63,0x00,0x55, - 0xE4,0xC3,0xCA,0x72,0xD2,0xF3,0x01,0xE3,0x3A,0x8B,0x69,0x5C,0x12,0x32,0x11,0x27,0xE7,0x4B,0x47,0x94, - 0x3E,0x4D,0x23,0xBC,0x24,0x81,0x97,0xC0,0xFC,0x01,0xF1,0xAF,0x87,0xC8,0x58,0x6D,0x4B,0x53,0x5A,0xBF, - 0xE7,0x9B,0x5D,0x70,0x32,0x77,0xE7,0x9A,0xB3,0x67,0xC3,0x92,0xB7,0x8C,0xEE,0x9F,0x03,0x03,0xD4,0x18, - 0x7E,0xBE,0x5C,0x8E,0xA4,0xFA,0x82,0xCD,0x63,0xA8,0x43,0x09,0xD5,0x87,0x33,0xFF,0xAA,0x5B,0x66,0x6C, - 0x25,0x99,0x8B,0xDC,0xEA,0x8F,0x2F,0x62,0xAC,0xA9,0x78,0xEC,0x11,0xA6,0x5D,0x8A,0xCE,0x0B,0xE1,0x8F, - 0xA1,0x44,0x32,0xCA,0x6D,0x7C,0xE3,0xBD,0xDC,0x78,0xC6,0x08,0x0F,0x8C,0xAC,0x61,0x52,0xA2,0x52,0x8A, - 0xAC,0x05,0x8D,0xAF,0xCD,0xED,0x20,0x7B,0xEC,0xCB,0xDC,0xC1,0x1A,0x49,0x1B,0xC9,0xAC,0xDB,0x00,0x50, - 0x40,0x01,0x0B,0xE9,0xCB,0x95,0x92,0xCF,0x08,0x51,0xED,0xB9,0x0D,0x8C,0x5C,0x59,0x6B,0xCB,0xF3,0x92, - 0x6C,0xC9,0x08,0x2E,0x17,0x58,0x9C,0x71,0x1A,0x80,0x1B,0xC1,0xE2,0xF1,0x87,0x0B,0x98,0x83,0x66,0x55, - 0xF0,0x7D,0x12,0x2A,0xEF,0x82,0xF6,0xB6,0xFF,0x89,0x41,0x58,0x91,0x62,0x2C,0x46,0x45,0x50,0x9D,0x70, - 0xD6,0xFE,0xC3,0x3F,0x43,0xDE,0xF5,0x26,0x7B,0x5F,0xE7,0x0D,0x1F,0x96,0x53,0x2B,0x4C,0xE0,0xD2,0x6F, - 0xB5,0xF1,0x8A,0x0F,0x16,0x6C,0xAE,0x44,0x71,0x78,0x62,0xA0,0x67,0x84,0x82,0x37,0xF4,0xF4,0x8D,0x66, - 0x1D,0x4E,0x53,0xD1,0x1D,0x51,0x14,0x50,0x05,0xE5,0x4F,0x48,0xEB,0x43,0x04,0xD5,0x04,0x2A,0x54,0x7C, - 0xE3,0x61,0x1D,0xE4,0xC5,0x66,0x52,0xC1,0x42,0xD2,0x15,0x56,0x86,0x5B,0x75,0x16,0x16,0xB6,0x55,0x03, - 0x04,0x98,0xB3,0x4C,0xB3,0x1C,0x05,0xD4,0x84,0x37,0x58,0xEC,0x9C,0x83,0x40,0x3F,0xC7,0xEB,0xA1,0x9C, - 0xA9,0x65,0xF6,0xB6,0xA1,0x05,0x83,0x1F,0x40,0x57,0xD1,0xE8,0x47,0xAA,0x3E,0x74,0x80,0x48,0x06,0x84, - 0x53,0x2C,0x0A,0xDC,0xC6,0x9C,0x19,0x27,0xCC,0x86,0x0E,0xC0,0x41,0xC6,0x1F,0xC9,0x11,0xD6,0x13,0x8B, - 0x5D,0xE5,0xD4,0xDC,0x50,0x3D,0x50,0xF1,0xD7,0xB4,0x6C,0x3F,0xE3,0xA5,0x87,0x51,0x51,0xF6,0x06,0x6A, - 0x24,0x17,0x85,0xCA,0xEA,0x79,0x0E,0xCD,0x0D,0x23,0x34,0x28,0xEC,0xFF,0xA2,0xB8,0x6C,0x42,0x6E,0x2F, - 0xDF,0xFD,0x44,0x18,0xED,0xD5,0xE8,0x41,0x94,0x35,0x20,0x29,0x2C,0xD6,0x40,0xF8,0xD5,0x1B,0x0F,0x69, - 0xCC,0x9F,0x14,0x14,0x17,0x36,0x17,0xB9,0xEC,0x20,0x47,0x55,0x2B,0x2B,0x76,0xEB,0x4C,0x9D,0xC1,0xAE, - 0x95,0x28,0x7E,0x51,0xE9,0x88,0x1D,0x96,0x10,0x61,0xE8,0x28,0xA9,0x49,0xE8,0xA6,0x55,0x44,0x36,0x55, - 0x6B,0x96,0x71,0x67,0x10,0x43,0xC7,0xF2,0x72,0x21,0xF8,0x70,0xD1,0x6C,0x57,0xBA,0x6B,0x8A,0xBF,0xB8, - 0x1D,0x40,0xE9,0x05,0xB7,0x74,0xA9,0x75,0xD8,0x6D,0x77,0x54,0x7D,0xCB,0x74,0x31,0xB1,0x43,0xA1,0x01, - 0xC5,0xFC,0x93,0x37,0x72,0x78,0x1A,0x27,0x6A,0x15,0x14,0xD4,0xF9,0xC7,0x2F,0x13,0x72,0x06,0x06,0xA4, - 0x5C,0x91,0xC8,0x13,0xC0,0x8E,0xB6,0xF5,0x78,0xE6,0xD6,0x0F,0x28,0x4A,0x63,0x87,0x31,0x09,0x81,0xE1, - 0x80,0x0D,0x6D,0x36,0xF8,0xD0,0x05,0x4D,0xBB,0x4D,0x85,0xE1,0xB9,0x3F,0x8E,0x60,0xB3,0x45,0x36,0x27, - 0x78,0x24,0xD9,0x43,0x7C,0x12,0xBF,0xC1,0xD0,0xA7,0xB1,0x59,0xF0,0x80,0x02,0x2F,0xB7,0x33,0x53,0x4E, - 0x2A,0x48,0xD7,0x4A,0x39,0x48,0xBD,0x3C,0x84,0x84,0xBE,0xFB,0x3B,0x3B,0x44,0xDA,0x4D,0xCC,0xB2,0x5E, - 0xAE,0x0C,0x78,0xCB,0x0B,0x4C,0x94,0x6B,0xB9,0x6A,0x68,0x0D,0x21,0xA3,0xCB,0x71,0x5A,0x62,0xEC,0xE6, - 0x68,0x8D,0xCF,0x9F,0x67,0x24,0xA8,0xDB,0xED,0x05,0xA3,0xC2,0x5B,0x63,0x12,0xEC,0xAB,0x83,0xFC,0xEC, - 0x97,0x8A,0x2A,0x80,0xCA,0x81,0xF4,0xDC,0x3C,0xC8,0x34,0x71,0xE2,0x3C,0xA9,0x2F,0x6F,0x8C,0xA5,0x3F, - 0xF6,0xBB,0xDC,0xDD,0xF2,0x6F,0x5B,0x4D,0x03,0x80,0x13,0x0D,0x9E,0x03,0x0D,0x8B,0xC6,0xCB,0x87,0xC8, - 0x92,0x6D,0xE7,0xCA,0xD0,0x07,0x9B,0xD9,0x8C,0x91,0xE2,0xEA,0x68,0x45,0x1B,0xB1,0x34,0x62,0xCB,0x1E, - 0xD7,0x51,0xFC,0x6C,0x6E,0x7D,0x8B,0x53,0x15,0xFF,0x73,0x5B,0x81,0xA6,0x77,0xD7,0xDC,0xA7,0x64,0x95, - 0xB4,0x51,0x26,0x81,0x10,0xFE,0x37,0xF3,0x7F,0xAD,0x7A,0xF3,0x62,0x12,0xE5,0x25,0xEC,0x3D,0x0A,0x86, - 0x43,0x13,0x6E,0xDA,0xC3,0x32,0x36,0xE1,0x21,0x0C,0xED,0xD1,0xF6,0xB8,0x06,0x41,0xE9,0xF0,0x59,0x7F, - 0x4A,0x8C,0x55,0xFF,0x1A,0x56,0x39,0xBA,0x04,0x6B,0x6C,0x12,0x43,0xC4,0x9C,0xC4,0x00,0xD4,0x8C,0x2D, - 0xFF,0x9E,0x0C,0x39,0x2F,0xC1,0x9C,0x50,0xF9,0xD8,0xDD,0xB3,0x48,0x03,0x9E,0x97,0x5E,0x27,0x72,0x74, - 0xFA,0x95,0x0F,0x86,0x8A,0x47,0x8C,0x6F,0x17,0x72,0x8A,0xE0,0x9B,0x55,0x9F,0xA7,0x08,0x28,0x25,0x19, - 0x2B,0x95,0x63,0x1D,0x61,0xB1,0xBD,0xF8,0xA8,0x0E,0x02,0x6E,0xBA,0x70,0x8B,0x5B,0x55,0x19,0xF6,0xEC, - 0x9A,0xA5,0x16,0x03,0x4A,0x1D,0x96,0x6C,0x46,0x36,0x14,0x98,0xCA,0x18,0xFE,0xFC,0x97,0xF2,0x97,0x76, - 0x53,0xB7,0x4E,0x6F,0x3A,0x72,0x77,0xAB,0xA9,0x57,0xEF,0x8A,0x05,0x75,0x76,0xE8,0xF6,0x0D,0x3B,0x6D, - 0x46,0x34,0xA0,0x3C,0xE7,0xD1,0x9B,0x5F,0x18,0xC4,0x16,0x6C,0x8B,0xE3,0xBD,0x37,0xCD,0x7E,0x50,0xC1, - 0xE3,0x0E,0x94,0xFF,0x4D,0x73,0x4A,0x24,0x2B,0x01,0x0E,0xC1,0xD0,0x61,0xCE,0xE7,0x13,0xE9,0xEB,0x10, - 0xC2,0x74,0x3D,0xA9,0xE8,0x95,0x44,0x9A,0x89,0xDE,0x51,0xC1,0x42,0xB1,0xE5,0x17,0x0E,0x45,0xF0,0x93, - 0xBB,0x1B,0x74,0x93,0x26,0xC2,0xCC,0xF6,0x97,0xD4,0x4F,0x8E,0xF8,0xEE,0x20,0xFC,0x37,0x9B,0x98,0xB4, - 0x18,0xC0,0xA7,0xE4,0x2E,0x4D,0xC2,0x44,0xA7,0x85,0x32,0x10,0xEE,0x8E,0xA0,0x12,0xBD,0xCE,0x02,0xDA, - 0x98,0x8E,0x83,0xA8,0xA6,0x8F,0x8D,0x65,0x5A,0x5F,0x4D,0x05,0x9C,0xCE,0x68,0x15,0x23,0x83,0x89,0x60, - 0x0A,0x5D,0x68,0x75,0xE4,0x87,0x01,0x9F,0xA6,0xE6,0x38,0xD5,0xE1,0x1E,0x86,0xA5,0xC5,0x7E,0xE0,0x01, - 0xC5,0x29,0xD8,0xB8,0xBA,0xA9,0xE7,0x11,0x7E,0x86,0x0F,0x15,0x30,0x8A,0xE8,0x11,0x84,0x0E,0xB1,0x63, - 0xB2,0x5A,0x1F,0xB2,0x2F,0x87,0x31,0x81,0xBE,0x26,0x70,0x32,0xBE,0x8D,0x1C,0x09,0x63,0xFA,0x21,0xA6, - 0x67,0xA8,0x16,0x27,0x92,0xA4,0xD5,0x62,0xBF,0xC5,0xD7,0xF6,0x1A,0x51,0x29,0xB2,0x66,0x38,0x81,0x5D, - 0xAB,0x2A,0x44,0xE8,0x28,0x93,0x18,0xEE,0x18,0x8D,0xCA,0x22,0xB1,0x87,0xD0,0x2E,0x5D,0xEB,0x92,0xE5, - 0x80,0x24,0x42,0x9E,0x2E,0x7B,0x3B,0x45,0xEA,0x88,0xC2,0xBC,0x5C,0x6E,0xFD,0x6D,0x7B,0x9A,0x1D,0xAF, - 0xC8,0xA8,0x6A,0x7C,0x39,0x85,0xD3,0x6F,0x32,0x67,0x33,0x84,0x72,0x26,0x13,0x9D,0xBF,0x9B,0x01,0xC8, - 0xEE,0x64,0x83,0xC5,0x71,0xE6,0x32,0xCA,0x2D,0xCC,0xEA,0xCA,0x3E,0xDE,0x4C,0x43,0x48,0xEF,0x1E,0xFD, - 0x38,0xE6,0xDD,0x72,0x09,0xAE,0xF8,0x56,0xE0,0x20,0xBC,0x8A,0x11,0x6C,0x48,0xCA,0xA3,0x8E,0x4F,0x89, - 0x76,0xBF,0x64,0xA7,0xE2,0xE3,0xE2,0x2C,0x10,0xC6,0x77,0x92,0x21,0xAF,0xAA,0x9B,0xFF,0x3A,0x3F,0xA1, - 0x62,0xDE,0x6E,0xFF,0xED,0x8C,0x6B,0x61,0x82,0x1B,0xB4,0x27,0xD3,0x1B,0xC4,0xC2,0x3B,0xBD,0xE3,0x5D, - 0xE9,0xCB,0x4B,0x22,0x53,0x3A,0x76,0x19,0x53,0x3E,0xA0,0x91,0x94,0x39,0xE8,0x4C,0x98,0x50,0xE1,0x56, - 0x79,0xB3,0x4D,0xBE,0x4F,0xD6,0xAF,0x86,0x17,0xB4,0xDD,0xC5,0x3A,0x93,0x1D,0x3E,0xD0,0x5F,0x89,0xB7, - 0x4C,0x30,0xED,0x75,0x37,0xBB,0x57,0x4C,0x10,0x50,0xE1,0x12,0xF3,0x48,0x62,0x85,0x08,0x48,0x49,0xC9, - 0x54,0xE9,0x0B,0xDF,0x60,0x8E,0x8A,0xE0,0x97,0x57,0xAC,0x72,0xDC,0x8E,0x13,0x52,0x28,0xD5,0x22,0x56, - 0x3B,0xD3,0x01,0x04,0x56,0x97,0xB1,0x9D,0x35,0xA9,0xFD,0xC2,0xDD,0x35,0xCA,0x81,0x0D,0x75,0x7A,0x14, - 0x7A,0xFB,0x8A,0xB5,0xC6,0xB7,0xD5,0x28,0x5E,0x34,0x8B,0xE0,0x46,0x55,0x52,0x98,0x2A,0x7C,0x30,0xE8, - 0x4C,0x9E,0x62,0xEC,0x7D,0xF8,0xD1,0x54,0x48,0xA4,0x3C,0xE8,0x70,0xB9,0x4B,0x69,0xA1,0xD8,0xD6,0xFC, - 0x7C,0xB8,0x97,0x9E,0xE0,0x74,0xAF,0xF9,0xB7,0x43,0x59,0x8D,0x4D,0x19,0xDF,0xED,0xFD,0x3A,0x88,0xE4, - 0x79,0x07,0x8D,0x5C,0xCC,0x57,0x76,0xC0,0x44,0x61,0xD7,0xFD,0xFC,0xB3,0x24,0x29,0xA5,0x76,0xB7,0xBB, - 0x74,0xE5,0x3E,0x16,0x4D,0xF1,0x0A,0x51,0x3F,0x7C,0x68,0xD3,0x4D,0x7C,0x3B,0xD2,0x78,0xA7,0x2E,0x25, - 0x0E,0x17,0xBC,0x3C,0xD6,0x9E,0xAE,0x12,0xB5,0x10,0x25,0x96,0x65,0x6D,0x71,0xE3,0xA8,0x9D,0x27,0x02, - 0xB2,0x13,0x2E,0xFE,0x4B,0x71,0x04,0x8D,0x05,0xBC,0xAF,0x7B,0xA4,0x92,0xF7,0x57,0x32,0x19,0x80,0xBC, - 0xE9,0xA5,0x7C,0xFD,0x60,0xBE,0x3A,0xF3,0x30,0xAD,0x40,0xB1,0x82,0x8D,0x2E,0x09,0x63,0xCD,0x92,0xC2, - 0xDF,0xCD,0x73,0x63,0x31,0x43,0x24,0x66,0xDB,0xB2,0x61,0x56,0xBA,0xCA,0x57,0x44,0xD1,0x7E,0x10,0x85, - 0xDD,0xC6,0x54,0xA5,0x7D,0x63,0x4B,0xE8,0xA8,0x53,0x42,0xB6,0xF1,0xCF,0x86,0x01,0x7D,0x47,0xF7,0xAD, - 0x70,0x85,0xAC,0x00,0xF1,0x5C,0xA7,0x8C,0xB0,0x67,0xC1,0xC4,0x08,0xC9,0x34,0xBD,0x15,0xBF,0x6A,0x88, - 0xF6,0x0B,0x58,0x21,0xF3,0xEE,0x68,0x6D,0xA0,0x04,0x3C,0xD0,0x6D,0x4C,0x3A,0x00,0x40,0x05,0x21,0x16, - 0x10,0xDA,0x39,0x23,0x61,0x00,0x35,0xB8,0xF4,0xFD,0x08,0x79,0x67,0x28,0x2A,0x87,0x50,0x4E,0x8C,0x4D, - 0x01,0x03,0x61,0x58,0x95,0x9E,0x4D,0xA6,0x66,0xC6,0xA1,0xF7,0xDA,0x58,0x7C,0x30,0xD4,0xB9,0x57,0xFF, - 0x26,0x46,0x2D,0xCE,0xCD,0x9B,0xF3,0x6C,0x44,0xCC,0x73,0x7E,0x2A,0x38,0xB4,0xA5,0x78,0x2D,0x4D,0x46, - 0xEA,0x2C,0x82,0xD4,0x8F,0xC4,0x59,0xC0,0xE0,0x1B,0xBD,0xB5,0x52,0xF9,0x2D,0x01,0xCE,0xB2,0xC4,0xF0, - 0x10,0xB9,0x2C,0x1F,0x59,0x6F,0xF2,0x6E,0xA7,0xA2,0xA4,0xDB,0x20,0x5A,0x4C,0xDB,0x30,0x98,0x4D,0x2A, - 0xCB,0x6E,0xAF,0x33,0x3B,0xDA,0x31,0x8E,0x79,0x19,0xEA,0x3C,0x5E,0x63,0xB5,0x78,0xAA,0x8D,0xCE,0x78, - 0xE7,0x3C,0xB4,0x5C,0xAA,0xE2,0x90,0x87,0xF8,0x6B,0x87,0xCC,0xC9,0x2E,0x34,0x4C,0x96,0xD5,0x09,0x68, - 0x6D,0x6F,0xB3,0x2C,0x2D,0x63,0xA3,0x51,0x0B,0x3F,0x67,0x2E,0xAF,0xD9,0x4E,0x8A,0xFF,0xE0,0xD7,0x86, - 0x7A,0xE7,0x7D,0xF2,0x87,0x30,0x13,0x77,0xB4,0x9D,0x6A,0x89,0xDF,0x12,0xAC,0x4C,0x3A,0x3F,0x83,0x0C, - 0xC8,0x00,0xB4,0x6A,0x9D,0x3C,0x2B,0x89,0x91,0xC0,0x86,0xB5,0x52,0x31,0xE9,0xF2,0x90,0x50,0xD0,0x39, - 0x5B,0x56,0x5B,0x11,0x5C,0x63,0x55,0xE9,0x66,0x8F,0xCD,0xCC,0xBA,0x1E,0x72,0x86,0x87,0x77,0xAA,0x9C, - 0x15,0x02,0x91,0x3E,0xF7,0xD8,0x0E,0x3E,0x81,0x10,0x32,0xC9,0x93,0x5A,0x34,0x5F,0xC1,0x59,0xAC,0x86, - 0x33,0x54,0x1C,0x59,0x6F,0xB8,0xF6,0x36,0x0C,0x26,0x7C,0xF1,0xEE,0x5D,0xE4,0x24,0x88,0x7A,0xC1,0x45, - 0xD1,0xEA,0xA7,0x88,0xB3,0xA6,0x27,0xE4,0xEE,0x38,0xAD,0x67,0xFB,0xC9,0x11,0x31,0xAF,0x55,0xB2,0x28, - 0xC6,0xEC,0xD8,0x75,0x9C,0x2C,0xE5,0xA5,0xFB,0x78,0x78,0xA4,0x84,0x15,0xA0,0x25,0xB4,0x35,0xD6,0x79, - 0x0A,0xF8,0x68,0x28,0x70,0xD5,0x2D,0x9F,0x88,0x46,0xF0,0x24,0xC8,0xEA,0x7C,0xA5,0x6A,0x19,0xC7,0x9D, - 0xDE,0x78,0x79,0xA4,0x70,0x5E,0xFC,0xAA,0x19,0xCB,0x06,0xDA,0xD8,0x36,0x57,0x55,0xF4,0xF7,0xBB,0xFB, - 0x4A,0x10,0xF1,0x30,0x8A,0x9D,0x1B,0xBC,0xCD,0x8F,0x9B,0xB0,0xFF,0xA0,0x98,0xF4,0x2C,0x87,0x32,0x48, - 0x45,0xAE,0x0F,0xC9,0xCF,0x32,0x88,0xC4,0x6E,0x3E,0x8E,0xA5,0x82,0x5F,0xF6,0x4E,0x54,0x3B,0x9E,0x8D, - 0xF9,0x5C,0x5E,0xED,0x47,0x80,0xC3,0x4D,0xD9,0xAC,0x2B,0x4F,0x54,0xEE,0x35,0xE5,0xEB,0x43,0xDC,0xAC, - 0xD8,0x73,0x8F,0x0C,0xAD,0xE6,0x39,0xC4,0x1A,0xB9,0xDA,0x70,0x80,0x3C,0xF5,0x78,0xB8,0x9F,0x18,0xFC, - 0xA8,0x8D,0x80,0x8C,0x15,0x60,0xF0,0x7F,0x59,0x6D,0x70,0x9A,0xD6,0x4D,0x52,0xF2,0x01,0xA1,0xFB,0xAA, - 0x26,0xA5,0xAD,0xD0,0x26,0x1F,0x6B,0xD4,0x53,0x12,0x5B,0xE3,0x80,0x5F,0x87,0xAA,0xEE,0x06,0xA0,0xC1, - 0x68,0x6F,0xE6,0xC5,0x78,0x4F,0xC5,0xE2,0xBD,0x63,0x13,0xE8,0x18,0x0E,0x2F,0x1B,0xC3,0x1B,0xF7,0x09, - 0x76,0x42,0x70,0xCF,0x42,0x79,0xBA,0x44,0xA5,0x0D,0xE5,0x91,0x36,0x86,0x70,0x84,0x3D,0xF5,0x69,0xF2, - 0x17,0xE5,0x44,0x24,0xDD,0x34,0x8E,0xF0,0xE4,0xC3,0xE8,0x14,0x53,0x45,0x31,0x21,0x82,0xCA,0xF4,0xCD, - 0x95,0xDE,0x3E,0x65,0x27,0xC0,0x70,0xE3,0x87,0xCE,0xA9,0xAE,0x1D,0xC5,0x96,0x25,0x5D,0xD6,0x59,0xE8, - 0x66,0x68,0xEC,0x08,0x16,0x85,0xE2,0x57,0x0E,0x03,0x71,0x91,0x7F,0xAC,0xCB,0xDA,0x44,0xC7,0x63,0xDD, - 0x6A,0x35,0x14,0x33,0x2E,0x06,0xE2,0x56,0x1B,0x7A,0xBE,0xD8,0xCD,0x2B,0xBC,0x83,0x55,0x24,0xDC,0xE9, - 0x20,0x85,0xDA,0x7E,0xE6,0xBC,0xF3,0x76,0xB0,0x41,0xE5,0x86,0x37,0xD9,0x71,0x34,0xE5,0x9A,0x40,0xE1, - 0x74,0xF8,0xFB,0x66,0xB1,0xC6,0x2B,0xBD,0x5D,0x4E,0xFC,0xC0,0x08,0xCE,0x99,0x09,0xE7,0x5A,0x63,0x2C, - 0x52,0x8E,0xB8,0x7B,0x7E,0xE1,0x0A,0xED,0x8D,0x80,0xA2,0xF7,0x3D,0xDD,0x6E,0x9C,0x49,0x16,0xEB,0x11, - 0xDD,0xC5,0x22,0xCF,0xFF,0xAA,0xB9,0x4D,0xEF,0xB8,0xEA,0x60,0x2F,0xD5,0x73,0x7E,0xEA,0x40,0x94,0xFB, - 0x2E,0x2F,0x6B,0x1E,0x31,0xA9,0x1E,0xFF,0xB8,0x4E,0x86,0x1D,0x9C,0x50,0xA4,0xEC,0xC7,0x9B,0x1E,0x79, - 0x43,0xB0,0x61,0xBD,0x52,0x5D,0xA6,0x4E,0x5C,0xBD,0xEC,0xCF,0x27,0x4C,0xF6,0x94,0x86,0x18,0x90,0x21, - 0x00,0xD9,0x44,0x32,0x0A,0x8A,0xEB,0x72,0x9C,0x72,0x49,0xF4,0xC6,0x44,0x4B,0x1E,0x0D,0x21,0x59,0x35, - 0xE0,0xFA,0x55,0xB4,0x58,0x9C,0x78,0x1D,0xB4,0x33,0xBD,0x92,0x17,0x7E,0x7D,0xC7,0x9E,0xF5,0x7E,0x46, - 0x20,0x20,0xE0,0x86,0x2E,0xB2,0x61,0x13,0x04,0xA5,0xA4,0x84,0x72,0x54,0x05,0x56,0x45,0x32,0xAC,0x34, - 0xB7,0x55,0x23,0x7E,0x14,0xB2,0x9C,0xB7,0xCC,0xF8,0x5F,0x38,0xA0,0x1D,0x13,0x45,0x17,0x3E,0xA8,0x9F, - 0xD1,0xB1,0xE6,0x34,0xC6,0x8B,0xAD,0xB7,0x08,0xD5,0x32,0xD7,0xC0,0xF5,0xA2,0x0D,0x90,0x90,0xB7,0x09, - 0x54,0xF1,0x00,0xB3,0xA8,0x3C,0xFF,0x46,0xBC,0xC8,0xA8,0x51,0x1F,0xD8,0x96,0xEE,0xDD,0x47,0xEC,0xE9, - 0x19,0x96,0x7B,0x22,0x1F,0x54,0xEB,0x4B,0x28,0xF9,0x7E,0x3F,0x91,0xFD,0x34,0x8C,0xAA,0x62,0x99,0x37, - 0xC0,0x17,0xEA,0x12,0x87,0x72,0xAD,0xBB,0xDF,0x5A,0x9B,0xE8,0x91,0x94,0xA9,0x77,0xB2,0xF6,0x88,0x17, - 0x19,0xE8,0x39,0xC4,0x1F,0x1B,0xA8,0xE6,0x28,0x8E,0x26,0xAA,0x52,0x47,0xB6,0x57,0x43,0x92,0xFA,0x15, - 0xDF,0x76,0x76,0x47,0x1C,0x0D,0xFB,0x2D,0x0B,0x12,0xAA,0xD3,0x04,0x5E,0xC0,0xD7,0x3C,0xE2,0x67,0xB4, - 0xCF,0xBE,0xE7,0xEB,0x5F,0x11,0xF2,0xE9,0xA0,0x75,0x0C,0x0D,0x81,0x01,0xD7,0xEB,0xBB,0xD0,0x7A,0x2C, - 0xCF,0xB9,0xEA,0x16,0x7B,0x84,0xE7,0xFE,0xA3,0x52,0x95,0xD0,0xB3,0x09,0x7D,0x77,0x6E,0x76,0x4E,0x95, - 0x9E,0xEB,0x6F,0xCC,0x48,0x2F,0x99,0xC0,0xB2,0x08,0x37,0x25,0x63,0x8E,0xFF,0xC1,0x77,0xCF,0x60,0x46, - 0x62,0x40,0x81,0x1C,0xDC,0xAF,0x78,0x81,0x9D,0x70,0x40,0xF3,0xAB,0x71,0xC8,0x3D,0x75,0x93,0x0A,0x63, - 0x76,0xAE,0xDA,0x6B,0xFB,0x50,0x3F,0x85,0xA3,0xEE,0x61,0xDD,0x65,0x2C,0xBB,0x3F,0x8F,0xD2,0x64,0x60, - 0xFB,0x15,0x14,0x24,0xAB,0x2D,0xC6,0x06,0x32,0x8A,0x12,0x4F,0x7F,0x1A,0xDA,0xD3,0xF8,0x61,0x5A,0x1B, - 0x03,0xEA,0x5B,0x46,0x33,0x49,0x49,0x45,0x0B,0x28,0x9F,0xA7,0xC6,0xA3,0x91,0xE0,0xC4,0x4C,0xA8,0x41, - 0xB9,0x69,0xF1,0xB1,0x8F,0xF7,0xF3,0xE5,0x79,0x66,0xC5,0x02,0xA2,0x05,0xA7,0x73,0x32,0xE4,0x11,0xD8, - 0xBB,0x01,0xFC,0xA1,0x95,0x85,0x40,0x48,0x7A,0xE5,0xCB,0x34,0xFD,0x06,0x08,0xE5,0xF6,0xD2,0x5F,0x8F, - 0x63,0x23,0x20,0x89,0x73,0xD6,0x22,0x0C,0x8B,0x26,0x02,0xF5,0x84,0x0E,0xD0,0x9E,0xEE,0x87,0xC2,0x19, - 0xCC,0xF5,0xF1,0x5D,0xD9,0x38,0xF4,0x66,0xE8,0x4B,0x09,0xED,0x66,0x84,0x45,0x6C,0xC9,0xEF,0xC2,0x13, - 0xBA,0x4B,0x62,0x27,0xF7,0xAD,0x84,0x65,0xC2,0x68,0x16,0x2C,0x4C,0x2E,0xA0,0x57,0xDE,0x2D,0x58,0x30, - 0xE0,0x49,0x94,0xBE,0x1F,0x6D,0x57,0x38,0x0B,0x70,0x8C,0x7B,0x7F,0xC9,0x7B,0x78,0x2B,0xD1,0xE0,0x4A, - 0x73,0x1F,0x0A,0xAE,0xCC,0x6C,0xF5,0xD9,0x5E,0xCA,0x71,0xE9,0x69,0xA0,0x8B,0x7F,0xF3,0x22,0x19,0x8A, - 0xAA,0x0D,0x4C,0x7B,0x13,0xBE,0x94,0x7D,0x41,0x52,0x02,0x00,0x5D,0x26,0x6A,0x0C,0x95,0xF3,0xA7,0x64, - 0x7C,0x73,0xCA,0xF2,0xDE,0x9D,0x53,0xD6,0x06,0xF4,0x4E,0xB2,0xA0,0xFC,0x9D,0x52,0x42,0x20,0x5A,0x59, - 0x22,0x5A,0x6D,0x81,0xC7,0x16,0x40,0x52,0xDA,0xF0,0x80,0x24,0x11,0x69,0x47,0x8C,0x85,0x51,0x50,0xBD, - 0x79,0x2A,0x4B,0xA2,0x87,0x5C,0x25,0x4E,0x8E,0x53,0x80,0x58,0x24,0x36,0x74,0x37,0xB6,0xB9,0x2A,0x90, - 0x01,0xA0,0x8E,0xE5,0xD1,0x72,0x8C,0x51,0x2D,0x1D,0x5C,0xA7,0x0B,0x94,0xA3,0x18,0xAB,0x97,0x27,0x16, - 0xF1,0x3D,0xCD,0x06,0x4B,0x9F,0x97,0x72,0x59,0x52,0xC2,0x0B,0x03,0x19,0x5D,0x20,0x53,0xFC,0xCD,0x92, - 0x76,0xBA,0xF5,0xE5,0x32,0x98,0x69,0x0A,0xBF,0x72,0xC5,0x87,0x50,0x12,0x0C,0x6F,0xC1,0xF1,0x08,0x9F, - 0x01,0x20,0x24,0xBB,0xCB,0xAB,0x56,0x48,0x3F,0xF5,0x94,0x08,0xC2,0xDA,0x4E,0xE4,0xB1,0xE2,0x41,0xE4, - 0x6F,0xF1,0xBE,0x6D,0xD8,0xF3,0x45,0x7A,0xC2,0xB7,0xD8,0xCF,0xCB,0xDE,0x69,0xE9,0x9B,0xEF,0x68,0xAF, - 0xE6,0x7C,0x31,0xEC,0xC2,0x14,0x3D,0x60,0x89,0x79,0x1D,0x44,0x2A,0x80,0x18,0x4C,0x5A,0x2B,0x58,0x4C, - 0x20,0x54,0x66,0xBE,0x58,0xDB,0x29,0xCC,0x95,0xD7,0xAE,0x6E,0x7F,0x26,0xB3,0x9F,0x2D,0x3F,0xDF,0xED, - 0x9A,0xBC,0xFE,0x8A,0x09,0xDA,0xA6,0x7E,0x7E,0x79,0x87,0x4C,0x99,0x13,0xB9,0xCA,0x9E,0x93,0xA7,0xD8, - 0xD2,0xF1,0xAF,0x6F,0xFF,0xB4,0x44,0x99,0xD6,0xB2,0x86,0x2E,0x3F,0xB2,0x21,0xFE,0xCF,0xF2,0xE7,0x2D, - 0x84,0x70,0x38,0x07,0xF9,0x8B,0x75,0xF5,0x66,0x75,0x66,0x6A,0xF8,0xD3,0x48,0xCE,0x44,0xAD,0x10,0x42, - 0x01,0x8E,0x00,0xBF,0x26,0x80,0x8B,0x9B,0x43,0x58,0xBD,0x44,0xAA,0xA3,0xA7,0x81,0x8D,0xBD,0x74,0x38, - 0xE6,0xE3,0x80,0x96,0x38,0x91,0xB3,0xC1,0xF4,0x20,0x92,0xE1,0xA4,0x63,0x11,0xF7,0xEF,0xB8,0x1D,0x40, - 0xAF,0x81,0x22,0x45,0xD4,0xA3,0xC4,0x20,0x00,0xA6,0xF2,0xEA,0xFD,0xE0,0xB4,0xFA,0xFD,0x86,0x54,0x42, - 0x76,0x56,0xA8,0xD3,0x09,0x8D,0x4C,0x34,0xE0,0xC0,0x66,0xF6,0x4D,0xA7,0xBD,0x10,0xB5,0xC5,0xE9,0x84, - 0x6F,0xCF,0xDB,0xF7,0x38,0x09,0x35,0x27,0x4B,0x6B,0x38,0xA1,0x8C,0xFD,0xE9,0x10,0x52,0x2A,0xD1,0xA8, - 0xB3,0x2C,0x31,0x63,0x7E,0x47,0x3B,0x9F,0xE3,0xAA,0x42,0x4B,0xF7,0x85,0xE7,0x68,0x3D,0xCB,0x38,0xA0, - 0x24,0xDB,0x5A,0xA2,0x5A,0x23,0xD5,0x1F,0x72,0x76,0xFF,0x27,0x9A,0x9A,0xEC,0xC9,0x23,0x8B,0x0B,0x58, - 0xA2,0xE4,0x29,0x0F,0x2F,0x7D,0xF3,0x0E,0xBE,0xAB,0x4D,0x83,0x39,0x69,0x46,0xEF,0x90,0xF1,0xBB,0x65, - 0xF1,0x74,0x6B,0x6F,0xF6,0xE5,0x31,0xAD,0xA5,0x98,0x2C,0xDD,0xDB,0x20,0xFE,0xCE,0x04,0xC4,0x06,0x7F, - 0x2E,0x03,0x0C,0x1B,0xA7,0x85,0x8D,0x93,0x56,0xAE,0xAA,0xDB,0x16,0x87,0x94,0x59,0x3B,0x00,0x04,0x1E, - 0xA6,0x44,0x21,0x77,0x59,0x96,0xA3,0xCF,0xEB,0xE2,0x43,0x3D,0xFC,0x49,0x23,0x1C,0xC2,0x43,0x2B,0xBB, - 0xA1,0xF0,0xEB,0x18,0x5A,0xCD,0xFE,0x6E,0x3E,0x2E,0x2B,0x0C,0xC3,0x42,0xD4,0xFD,0xDE,0x08,0xA4,0xB0, - 0x18,0x2F,0xAD,0x59,0x32,0x7B,0xD3,0x26,0x69,0x82,0x86,0x55,0x44,0xEB,0x12,0x26,0xED,0x78,0x77,0xA6, - 0xB5,0x66,0x1A,0x1F,0x1F,0x75,0xE5,0xBE,0xD0,0x9F,0x1B,0x61,0x92,0x0D,0x96,0x47,0xFC,0xF0,0x96,0x0E, - 0x38,0x41,0xF0,0xC1,0xD7,0x42,0x55,0xA1,0x6D,0x9C,0xF3,0xBF,0x85,0xA8,0x6E,0x0F,0xE3,0x7B,0xDB,0x9F, - 0xF4,0x53,0xFC,0x46,0x2C,0xDC,0xB6,0x61,0xDD,0xD0,0x61,0x13,0xC5,0x04,0x40,0x84,0x35,0x2B,0x28,0x8A, - 0x26,0x75,0xD6,0x66,0xC8,0x6A,0xDC,0x80,0x05,0x52,0xC4,0x26,0x89,0xFA,0x58,0x2C,0x29,0xD4,0x75,0xF7, - 0x49,0x49,0x47,0xD3,0x6F,0x79,0x8D,0x65,0xF7,0x94,0xAD,0x57,0xC2,0x9A,0x52,0xE6,0x16,0x48,0x03,0xF4, - 0x0E,0xB4,0xC5,0x27,0x28,0xF8,0xA8,0x79,0x3D,0x64,0xE3,0xE8,0x1F,0x18,0x34,0x9B,0xCD,0x27,0x69,0xAF, - 0x7A,0x73,0x85,0x77,0xEE,0xC2,0xBF,0x76,0x15,0xF4,0x65,0x81,0x16,0x01,0x84,0x56,0x6D,0xB6,0x9A,0xD4, - 0x79,0xC7,0xFE,0xBF,0x19,0x15,0x8E,0x2F,0xAD,0xC7,0x6D,0x8F,0xB2,0x7A,0xC8,0x1F,0xDC,0xBF,0x89,0xB7, - 0x1E,0x3E,0x93,0xC8,0xEC,0xAD,0x2F,0x57,0x29,0x36,0x24,0x39,0x0B,0x17,0x5D,0x6B,0xC9,0xFD,0x28,0x08, - 0x6A,0x9C,0xCE,0x3E,0xC1,0xF3,0x54,0x6A,0xCD,0x32,0x00,0x34,0x9A,0x22,0x68,0xD2,0x84,0x99,0x9E,0xBF, - 0xF3,0xF0,0x7E,0xF7,0x45,0xDA,0x58,0xFE,0x1F,0x3F,0x37,0xC9,0x8D,0x00,0xCF,0x3F,0x05,0xF1,0xCB,0xB9, - 0x14,0xDD,0xEE,0xB9,0x44,0x62,0x45,0x4B,0x01,0x70,0xB5,0x80,0x5C,0xBE,0xA7,0x38,0x06,0x79,0xB8,0xFB, - 0x9D,0x42,0x14,0xA4,0x62,0x81,0x8A,0xD5,0xD0,0x20,0x30,0xE3,0x79,0x64,0x84,0x6F,0xB0,0xAB,0x4C,0x8C, - 0xB6,0xEA,0xFD,0xB0,0x51,0xA1,0x7B,0x83,0x5E,0x8C,0x91,0x67,0x31,0x24,0x07,0x85,0x3F,0xEF,0x39,0x30, - 0xD6,0x99,0x31,0xE2,0xF5,0x88,0xF6,0xF7,0x13,0x27,0x61,0x35,0x28,0xF2,0x59,0x6C,0xE1,0x67,0x9D,0x78, - 0x80,0xE3,0xFA,0xAF,0xA1,0xD1,0x4B,0x63,0xAB,0xAD,0xE8,0x34,0x12,0x6B,0xFC,0x9F,0xF0,0xBE,0x4F,0x90, - 0x20,0x0B,0x62,0x83,0x65,0xE8,0xD2,0x75,0xF0,0x00,0x05,0xB1,0x7D,0x09,0x14,0x7B,0xA4,0x64,0x43,0x9F, - 0x29,0x25,0xB1,0x25,0xD4,0x6B,0xDC,0xF1,0xC1,0x47,0x72,0xB3,0x83,0xDA,0x89,0x36,0x09,0x8E,0xE1,0x25, - 0xF3,0x68,0xFD,0xFB,0x22,0xA7,0x88,0x6E,0x59,0x68,0xD2,0x88,0x3E,0x45,0xE1,0x5E,0x6B,0xC9,0x58,0x6A, - 0xB2,0x82,0x8E,0x98,0x04,0xE2,0x48,0xC3,0xA0,0x2A,0xFA,0x8B,0xAC,0x64,0xD3,0xFA,0xA6,0xA5,0xFB,0x4B, - 0x9A,0x66,0x68,0x0E,0x69,0xEB,0x6B,0x8D,0x9A,0xFA,0xBF,0x30,0x8F,0x08,0x34,0xEF,0xB8,0x14,0x48,0xC3, - 0x46,0xF6,0x37,0xAF,0x93,0x63,0x1D,0xD9,0xEB,0x73,0x3A,0x68,0x98,0x24,0x1A,0xB8,0xA3,0xEF,0xEA,0x3C, - 0x5B,0x63,0xF7,0x1F,0xD9,0x07,0xEE,0x3E,0x5A,0x0D,0x08,0xFC,0x0A,0x50,0x4A,0x9E,0xD9,0x25,0x1A,0xD0, - 0x2F,0x91,0x05,0xAF,0x18,0x66,0x45,0x0B,0x35,0xE3,0xB3,0x2D,0xDC,0x63,0x9D,0xA9,0x7E,0x7E,0xB3,0xDF, - 0x9E,0x2B,0x65,0xDC,0x74,0x14,0x17,0x1F,0x98,0xB0,0x50,0x40,0x64,0xC4,0x51,0x79,0x38,0x72,0x4E,0x46, - 0x08,0xC1,0x40,0xBE,0x56,0xFD,0x9B,0xCB,0x98,0xAD,0x08,0xE6,0x02,0x10,0x18,0x52,0x45,0xAA,0x45,0x74, - 0x57,0xDC,0x51,0x9E,0x86,0x26,0x1E,0xF7,0xB6,0xA9,0xD5,0x01,0x7A,0xD9,0x68,0xCA,0x7D,0xD4,0xBA,0xAD, - 0xA7,0x1A,0x75,0xB5,0xB9,0x43,0x1D,0x4D,0xA1,0x11,0xCB,0x65,0xF9,0x8C,0x04,0x9A,0xD7,0x88,0x4C,0x01, - 0x93,0xBC,0x94,0x00,0x14,0x38,0x44,0x86,0x31,0xCB,0x32,0xD6,0xC2,0x96,0xC8,0x36,0xB1,0x7D,0x8A,0x83, - 0x05,0x17,0xA4,0xD0,0xF1,0x92,0xC6,0x31,0xCE,0x87,0x45,0x27,0x13,0xBE,0x0C,0x37,0x47,0xF0,0xAD,0x87, - 0xB3,0x56,0xBB,0x22,0x2F,0x4A,0xD0,0x25,0xBB,0x38,0x57,0xD9,0xE0,0xB7,0x8A,0x97,0x04,0x12,0xBE,0xCF, - 0xD5,0xBE,0x46,0x70,0x58,0x23,0xCB,0x0E,0xEA,0x50,0x29,0xBC,0xCF,0xF3,0x46,0x8C,0xFD,0x7A,0x0F,0xDC, - 0x9E,0x7B,0x7E,0xBA,0x37,0x54,0x6D,0xD2,0xDA,0xD4,0x55,0xF7,0x62,0x79,0x93,0xEB,0x35,0xBC,0xE3,0x59, - 0xE0,0x55,0x5A,0x80,0xFE,0x21,0xA8,0x29,0x31,0x18,0x50,0x70,0x9B,0x1B,0x6D,0xE9,0xF9,0x5D,0x46,0x90, - 0x99,0x01,0x3E,0xC5,0xAA,0x10,0xA6,0x88,0x4B,0x33,0x68,0x5C,0xCD,0x4C,0xEE,0x6E,0xD4,0x2F,0x30,0x69, - 0x18,0xB3,0xB6,0x5E,0x3E,0x4C,0x8A,0xC9,0x01,0xF2,0x07,0x0F,0xF9,0xBA,0xD7,0xBB,0x41,0x9D,0xA7,0x8C, - 0x74,0xBE,0x69,0x5C,0x4D,0xF3,0x17,0x6C,0x5A,0x3C,0xB7,0xD1,0x0C,0xC4,0x8D,0x3F,0x9F,0x30,0x09,0x8B, - 0x81,0xDC,0xA5,0x83,0x58,0x1A,0x2D,0x60,0x25,0x13,0xC0,0x05,0x01,0x5D,0xD7,0x58,0x92,0xC8,0x34,0xD6, - 0x5C,0xAF,0x70,0xA6,0x66,0xCE,0x90,0x46,0x1D,0xAE,0x8D,0x0F,0xBD,0x82,0x63,0xE3,0xA8,0x40,0xE1,0xA3, - 0x5B,0x8F,0xD9,0x85,0x14,0x2A,0x36,0x30,0xB0,0xF1,0xE1,0xBF,0x93,0xA0,0x3C,0x97,0xA7,0x81,0x89,0x0E, - 0x17,0xA7,0x0A,0x92,0x39,0x72,0x81,0x06,0x74,0x62,0x1E,0x44,0xE7,0x07,0xD8,0x16,0x96,0xAB,0x70,0x9B, - 0xB6,0x5F,0x88,0x04,0x15,0x5B,0x91,0x15,0xDD,0x8F,0x6C,0xB4,0x95,0xED,0x46,0xD6,0x41,0x4D,0x80,0x14, - 0x16,0xA5,0x97,0xB0,0x0A,0x8B,0x81,0x03,0xD1,0x2D,0x44,0xE7,0xCB,0x94,0x61,0x05,0x95,0x39,0xEA,0x09, - 0x7A,0x1B,0x20,0xB5,0x15,0xEF,0x21,0x0D,0x64,0xA2,0x81,0x53,0x74,0xEA,0x7A,0x36,0xD5,0xB5,0x65,0x6C, - 0xFE,0x20,0x12,0x27,0x84,0x79,0x44,0xDD,0xD8,0x65,0x32,0x7C,0x80,0x74,0x6A,0xEE,0xF1,0xEB,0x68,0x00, - 0x63,0x3C,0x7A,0xBE,0x10,0x1D,0x0C,0x34,0xF4,0xC8,0x21,0x8B,0x85,0x1D,0x66,0x04,0xEE,0x7F,0xE1,0xE3, - 0x37,0x8E,0x4D,0xBF,0x78,0x2D,0x71,0xE2,0x9B,0x32,0xA8,0xBF,0xE8,0x7F,0xED,0x21,0xBF,0x5F,0xE5,0xBA, - 0x04,0x1D,0xFA,0xBE,0x61,0xA3,0xCD,0x88,0xA7,0xAF,0xF8,0x7E,0xFD,0xEA,0x9C,0x58,0x09,0xD0,0x8A,0xFE, - 0xA3,0xA0,0xA8,0x8B,0x42,0x5E,0x82,0xFC,0x5E,0x80,0x1D,0x4D,0x6F,0x0D,0x57,0xBF,0x61,0xA1,0x0C,0x93, - 0xCE,0xB5,0x7B,0x5F,0xBD,0xCE,0xC7,0xC9,0xB3,0x85,0xA1,0xE0,0x3C,0xA9,0xA4,0x41,0xB8,0xFA,0x83,0xFD, - 0xDE,0x8A,0x21,0x29,0x78,0x77,0xE5,0xA6,0x2C,0x10,0xC2,0xE6,0xC5,0x59,0x74,0x4A,0x82,0xAD,0x3C,0xE1, - 0x0F,0x17,0xEC,0x12,0x52,0xC6,0x30,0xCC,0xC4,0x5B,0xEE,0x8D,0x5B,0x64,0xC9,0xF0,0x82,0x14,0xFC,0x88, - 0x51,0xB9,0x7B,0xC3,0xA9,0xD4,0xCD,0x98,0x9E,0x27,0x29,0x53,0xBA,0x3E,0xA5,0x9A,0xB3,0xEA,0x42,0x51, - 0x67,0xFB,0x6D,0x5F,0xFD,0xB1,0x01,0x3F,0xA4,0xEF,0x84,0x87,0xB2,0xB9,0x0A,0x52,0x2E,0x97,0x4B,0x04, - 0xF4,0x13,0x36,0x18,0x54,0xA3,0xE4,0x73,0xD6,0xBA,0xA3,0x70,0x9F,0x1C,0xC4,0x09,0xF5,0x92,0x6D,0x2D, - 0x5D,0xD4,0xEF,0xC3,0x15,0xB0,0x55,0xD0,0x91,0xE0,0x22,0x85,0x01,0x93,0x32,0x11,0x94,0xD7,0x8D,0x96, - 0x33,0xBA,0x26,0xF3,0xE1,0xBC,0xB4,0x95,0x04,0x92,0x74,0x18,0x0C,0x35,0xCC,0x0A,0x51,0xD0,0x09,0xC8, - 0x2D,0x98,0x31,0x5D,0xA0,0x5B,0x62,0x6B,0x8E,0xD9,0xD6,0x1A,0x4A,0x34,0x61,0x62,0x6B,0x22,0x9D,0x1A, - 0x61,0xFD,0xF3,0x19,0xA4,0x90,0x9D,0x0D,0x52,0x92,0x4F,0x56,0xCA,0x98,0x14,0x1F,0x24,0x99,0x11,0xA7, - 0x2F,0x9E,0xBF,0x8A,0xF5,0xF9,0xE2,0x39,0xE8,0x39,0x96,0xCD,0x02,0x24,0xDE,0x39,0x63,0x8C,0xAC,0x35, - 0x9D,0xBA,0x1F,0xF5,0x50,0x08,0xCE,0x15,0x78,0xA7,0x04,0x36,0xF1,0x66,0x96,0x5C,0x3E,0xDF,0x2F,0xC4, - 0x5E,0x28,0x45,0x1C,0xD3,0x00,0xDF,0x38,0xBF,0xE5,0x6F,0xA3,0xDD,0x9E,0xA6,0xF0,0xD4,0x4A,0x89,0x6D, - 0x18,0xE1,0x05,0x27,0x71,0xDD,0xD7,0x8F,0xBB,0xB0,0x62,0x7F,0xAE,0xB0,0x87,0x17,0xD3,0xB2,0xFD,0xB2, - 0x48,0xA2,0x40,0x81,0x4D,0x6C,0x30,0x60,0xE1,0xC7,0x91,0x5F,0xF7,0x9D,0x73,0x37,0xA0,0xBE,0x20,0x0C, - 0x17,0x63,0x2C,0x95,0xC3,0xCB,0xE1,0x5A,0xF6,0x71,0x61,0xB7,0x27,0x0F,0x04,0x81,0x9E,0x7E,0x16,0x21, - 0xC1,0x02,0x87,0x47,0xB0,0x8C,0xF6,0x4F,0x70,0xDF,0x2B,0x53,0x8B,0x61,0x79,0x00,0x60,0x28,0x24,0xD3, - 0x85,0x67,0x42,0x07,0xD4,0x0E,0xC3,0xBD,0x1A,0xD1,0x00,0x01,0xA3,0x4B,0x89,0x64,0x54,0x6F,0x52,0x55, - 0x20,0x9E,0x91,0x5B,0x57,0x21,0xC8,0x02,0xA8,0x54,0x18,0xBC,0xF3,0x27,0xC1,0x02,0x12,0xFB,0xD0,0xC1, - 0xB1,0x71,0x57,0x5D,0x4B,0xC4,0xD1,0xE1,0xC9,0xEA,0x77,0x25,0xC1,0xA8,0xCC,0xA5,0xCD,0x56,0x03,0x19, - 0xAB,0x56,0xC1,0x75,0xD5,0xB6,0xC2,0x61,0xD6,0xF5,0x46,0xC1,0x1E,0x6A,0x36,0x06,0xC0,0xFD,0x78,0x31, - 0xD8,0x34,0x9A,0xDF,0x8B,0xCE,0xD0,0xCD,0xBA,0xD2,0x3E,0x8B,0xC1,0x5E,0xD8,0xCF,0x7B,0x62,0xFB,0xE9, - 0xE1,0xF5,0x85,0x8F,0x10,0x52,0x37,0x12,0x40,0x4D,0xAD,0x8D,0x55,0x08,0x75,0x7B,0x4B,0x0B,0x8B,0xE1, - 0x9F,0x6B,0x3F,0x7A,0x41,0x87,0x9E,0xD5,0x42,0x26,0x5C,0x5B,0x2F,0xDD,0x02,0xEC,0x3C,0x81,0x2B,0x0E, - 0xA1,0x7D,0x65,0xE8,0x6D,0x62,0xD6,0x98,0x72,0xB8,0xDC,0x74,0xA8,0x80,0x1C,0x51,0xA2,0x7C,0x5F,0x91, - 0x07,0xE0,0x7D,0x75,0x05,0xA8,0xD2,0xAF,0xF9,0x37,0x19,0x74,0xEB,0x6F,0x13,0x3C,0x39,0x6A,0x51,0x22, - 0x04,0xA9,0xDE,0xBB,0xD3,0x3E,0x11,0x64,0xEA,0xAF,0xA4,0x80,0x7C,0xB4,0x82,0x10,0x01,0x12,0x7C,0xF7, - 0x12,0x72,0x61,0x24,0x6A,0xB5,0xAA,0x04,0x18,0x7D,0x6C,0x26,0x92,0x53,0x25,0xDF,0xC8,0x0D,0xA6,0x52, - 0xC0,0xDE,0x0B,0x4B,0x63,0x3C,0x17,0x84,0x83,0xC0,0x0A,0xF4,0x25,0xAF,0x35,0xA4,0xE6,0x70,0x87,0x7F, - 0x43,0x3F,0x49,0x2A,0xDA,0x13,0x50,0x94,0x08,0x3F,0x7D,0xB3,0x9D,0x5C,0x4E,0x4B,0x82,0x73,0x14,0x2D, - 0xB3,0x89,0xDC,0xC0,0xB7,0x55,0x45,0x64,0x5F,0xDB,0xF1,0x60,0x45,0x16,0xE5,0xAE,0xB6,0x69,0x95,0xDB, - 0xD6,0x3E,0x9B,0xDD,0x65,0x56,0xE9,0x12,0x57,0xAE,0x6C,0x8A,0x5B,0x2A,0xFB,0x1C,0x91,0xC6,0xF8,0x9E, - 0x7F,0xDD,0x8C,0xF6,0x17,0x6D,0xF2,0x9E,0xD4,0x17,0x4C,0xAA,0x90,0xD7,0x8D,0x01,0x1C,0x58,0xDD,0x05, - 0x98,0x86,0x5D,0x8C,0xA8,0xA8,0xBE,0x84,0x4B,0xEF,0x86,0x2A,0xE8,0x90,0xC9,0xA9,0x7E,0xC8,0x4A,0x23, - 0x2F,0x7B,0xF3,0x18,0x61,0xE3,0xD7,0x3A,0xE9,0x51,0xB8,0x80,0xF5,0xD4,0x67,0x3F,0x4B,0x58,0xD8,0x73, - 0x3B,0x37,0x2F,0xD9,0xF8,0x51,0x75,0xBE,0x84,0x3E,0x7C,0x64,0xA9,0xC0,0xB5,0x62,0x44,0x57,0x45,0x46, - 0x4A,0xD6,0xCF,0x39,0xAC,0x74,0x78,0xF1,0x2C,0x1F,0x9F,0xEB,0x9D,0x2C,0x0C,0x0A,0x02,0x6D,0x29,0x92, - 0x18,0xE9,0x35,0x23,0xDC,0x71,0x5D,0x34,0xA7,0xF0,0x06,0x40,0x6D,0x5E,0x7A,0x9E,0xF6,0x1F,0x5B,0xAB, - 0x55,0x93,0x3F,0x8B,0x8A,0x72,0x29,0xC0,0xA9,0x51,0x2C,0xF2,0x7E,0xD1,0x8F,0xC4,0x4A,0xC4,0xBD,0xDC, - 0xA7,0x39,0x98,0x06,0x02,0x4E,0xA0,0xDA,0x5A,0xCE,0x40,0xB4,0xE7,0x8D,0x38,0x33,0x96,0xA4,0x14,0xE1, - 0xEC,0xA3,0x4B,0x2E,0xF1,0x1F,0x48,0xA4,0xBE,0x8C,0x29,0x64,0xB6,0xEF,0x0C,0x16,0xC2,0x23,0xAE,0x54, - 0x35,0xDF,0x43,0x07,0x87,0xA0,0x2B,0x65,0x76,0x32,0x05,0x86,0x6C,0xA1,0x91,0x1A,0x3D,0xE1,0x4B,0x13, - 0x07,0x44,0xEF,0x93,0x9B,0xFF,0xA9,0x75,0x8B,0x82,0xC0,0x51,0x22,0xF3,0x7E,0x82,0x54,0x39,0xDE,0x6E, - 0x9B,0x22,0x60,0x56,0x69,0x49,0x17,0xE2,0x29,0x76,0x4E,0xB0,0x77,0x2A,0xCB,0x72,0x24,0x71,0xCC,0x43, - 0x77,0x87,0x6F,0xF2,0x75,0xDD,0x47,0x36,0x25,0x03,0x66,0x87,0x92,0x8A,0x0E,0x00,0xCA,0x4D,0xCB,0x98, - 0xB5,0x83,0x7E,0xAF,0x87,0xC5,0x53,0xA4,0xCC,0x7C,0x29,0x3A,0x26,0xC8,0xC1,0x97,0xC7,0x6C,0x5B,0x68, - 0xCE,0xC8,0x62,0x47,0xE6,0xE9,0x08,0xD5,0x48,0x33,0x0A,0xD1,0xB5,0xEB,0xBA,0x75,0x6D,0x56,0x0F,0xBE, - 0x2E,0x47,0x65,0x3A,0x3E,0xC0,0xC3,0x58,0x21,0x16,0x6B,0x0E,0xF3,0x2A,0x80,0x33,0x44,0x5B,0x47,0x2F, - 0xFF,0xA1,0xA5,0x4D,0xBC,0xF4,0x33,0x8F,0xCF,0x82,0x10,0xF9,0x8D,0x56,0xE4,0x3A,0xC9,0xA2,0xFA,0x59, - 0xAB,0x34,0x32,0x2B,0xAF,0x2D,0x11,0xB3,0x05,0xD7,0x28,0x92,0x26,0xDD,0x90,0x53,0x58,0xEF,0x3C,0x76, - 0xE4,0xDC,0x35,0xC6,0x2C,0x98,0xB8,0x09,0x77,0x47,0x0D,0x63,0xE2,0xAF,0xF6,0xB8,0xB2,0x03,0x64,0x3D, - 0x65,0xEC,0x0A,0x19,0x69,0xE3,0x4B,0x1D,0x7D,0x1E,0x6C,0x59,0x58,0xCD,0x53,0xA0,0xF6,0x15,0x03,0x1B, - 0x80,0x3A,0x2F,0xD6,0xD9,0x25,0xA4,0x06,0x1D,0x66,0xC2,0x26,0x37,0xB3,0x54,0xA0,0x21,0x92,0x0F,0x44, - 0xD8,0x0D,0x94,0xE3,0x0F,0x98,0x00,0x05,0x17,0xBB,0x55,0x30,0x83,0x18,0x23,0xD4,0x9E,0x00,0x82,0x22, - 0x97,0xF3,0x1A,0x97,0x43,0x6F,0xF5,0xFA,0xE2,0xB9,0xCD,0x83,0x76,0xF6,0xA9,0x6E,0xA5,0xD2,0xBF,0x13, - 0xE8,0x38,0x86,0x51,0x49,0x2E,0xE5,0xB3,0x7C,0xE7,0x64,0xB1,0x5E,0x9E,0xC4,0x9A,0x97,0xD8,0x2A,0x00, - 0x32,0x51,0x8B,0x94,0x58,0x6B,0x44,0xD5,0xA6,0xD1,0x04,0xEA,0xD6,0xAE,0x46,0x42,0x85,0x97,0x48,0xD1, - 0xD6,0x99,0xA4,0x47,0x84,0xBF,0x21,0x67,0x17,0xF6,0x67,0xA4,0x0D,0x92,0x52,0xE1,0x22,0x92,0x55,0x2C, - 0x5A,0x9B,0x48,0x21,0x5E,0x0D,0x29,0xFB,0xE4,0xF5,0x39,0x0B,0xF7,0x46,0x46,0x2D,0x1A,0xDA,0x1E,0x60, - 0x2C,0xF5,0x4E,0x28,0xEC,0x2A,0x76,0x52,0x7C,0xE3,0x67,0x1E,0x2B,0x85,0xCD,0x5E,0x33,0xFB,0xC8,0xFE, - 0x0E,0x73,0x3A,0xA7,0x94,0x30,0xE7,0x24,0x2E,0xFD,0x5A,0xC8,0x66,0xE7,0x6D,0xFB,0x4F,0xDC,0x50,0xC9, - 0x03,0x7D,0xF0,0x8A,0x89,0x9D,0x20,0x6F,0x4C,0xF4,0x47,0xFD,0xA7,0x56,0xFD,0x41,0x14,0x52,0x5E,0x4E, - 0x0C,0xE7,0xFE,0xFB,0x49,0x6B,0xB6,0x4A,0x41,0x9E,0x09,0x90,0x0C,0x90,0x06,0xDC,0xAC,0xF9,0xC8,0x33, - 0x63,0x46,0x6F,0x7E,0x4D,0xB3,0x01,0x80,0x5E,0x9D,0xCB,0x09,0x0F,0x68,0x38,0xD0,0xB8,0x9D,0x27,0xDF, - 0x11,0x73,0x33,0x11,0x03,0x9C,0x17,0xD9,0xE7,0xDD,0x53,0x23,0x61,0xFD,0xBF,0x5A,0xFF,0xD7,0x20,0x00, - 0xDB,0xBE,0x60,0x02,0x5E,0x8B,0xD0,0x84,0x52,0x2F,0x42,0x31,0x6A,0xE0,0xAF,0x7C,0x73,0x9C,0x48,0x62, - 0xEA,0x22,0x70,0x25,0x21,0x63,0x3C,0x7D,0xE0,0x48,0xCE,0xDC,0xE9,0xAC,0x9A,0xE3,0xEB,0x81,0x06,0x07, - 0x15,0xA9,0x45,0x20,0x90,0x44,0x51,0x75,0x67,0x6A,0x37,0xB0,0x0C,0x85,0xD9,0x95,0x1E,0xA5,0xD9,0xB5, - 0xB6,0xA4,0x66,0xB0,0x2A,0x0F,0x80,0xE0,0xDD,0x09,0xBE,0x43,0x36,0xAF,0x50,0x60,0xBD,0x44,0x98,0x50, - 0x54,0x9C,0x5D,0xBA,0xA6,0x8C,0x68,0x26,0x71,0xB0,0x58,0x70,0xBC,0x45,0x99,0x16,0xA4,0x00,0x19,0x61, - 0xE1,0x1F,0x1B,0x74,0xB8,0x89,0x51,0x9E,0x3D,0x46,0xB3,0x0B,0xD4,0x9E,0x4D,0x31,0xCD,0xBB,0xB7,0x52, - 0xB7,0xAC,0x59,0x8E,0x3C,0x47,0xE1,0x8A,0x32,0xF8,0x86,0xC8,0x6B,0xA5,0x86,0x4C,0x50,0xDD,0xCD,0xC6, - 0x4E,0xF3,0xCB,0xFA,0xFD,0xDE,0xCA,0x9D,0x84,0x0F,0xD0,0xFA,0x71,0x38,0xC5,0xD6,0x4F,0xF2,0x0B,0xFC, - 0x75,0x2B,0x57,0x8D,0x82,0x89,0x92,0x89,0xB2,0x2F,0x58,0xAD,0xBB,0x57,0xC9,0x2F,0xDE,0xE2,0xFF,0xB5, - 0x54,0x04,0x4B,0xBD,0x9B,0xAC,0x50,0x3B,0x78,0x0A,0x91,0xE7,0xDF,0xE3,0x7F,0x13,0xF6,0x1D,0xE7,0x75, - 0xF1,0x68,0xAD,0x68,0xB5,0xB3,0xAD,0x1F,0x6C,0x9D,0xF5,0xCB,0x37,0xD0,0x6E,0x78,0x78,0x85,0xA5,0x78, - 0x4B,0x4D,0x09,0x8F,0x61,0xD0,0x83,0x29,0x2F,0x62,0xF9,0xFD,0x74,0x81,0x53,0x96,0x35,0x4E,0xAD,0xC1, - 0x33,0x5D,0x2D,0x75,0x88,0xCF,0xDC,0xAE,0x1F,0xA2,0xA4,0x86,0xCB,0x4F,0x8D,0xD5,0x30,0x7C,0xD4,0x9F, - 0x0E,0xAB,0x85,0x00,0x01,0x30,0x23,0x89,0x9C,0x41,0xB5,0x62,0x34,0x31,0x04,0x90,0x27,0x73,0x7F,0x7C, - 0x35,0x7C,0xE3,0xCF,0xEC,0xF7,0x43,0x52,0x06,0x87,0x01,0xF3,0x5F,0x50,0x45,0x79,0xB6,0x13,0xD5,0x7D, - 0xAC,0xDF,0x48,0xB8,0x11,0xCD,0x7E,0xAF,0xC3,0xB3,0x76,0x9D,0x14,0x8C,0x52,0x71,0xD3,0xD8,0x5D,0x48, - 0xA3,0x08,0x7A,0xE8,0x24,0x17,0x39,0x35,0x91,0xC4,0x54,0xE0,0x28,0x54,0x14,0x64,0xD2,0xA9,0xF8,0xA3, - 0x1F,0x1A,0xB4,0xC9,0xF3,0x74,0x5C,0xF1,0x52,0x55,0x35,0x96,0x75,0x8D,0x90,0xB2,0x96,0x19,0xE7,0x27, - 0x0F,0x9D,0x55,0xE1,0x92,0x56,0xAD,0xC2,0x0F,0x79,0x4B,0xF9,0x8B,0xA9,0xB3,0xD2,0x12,0xE8,0x5D,0xE5, - 0x69,0x57,0xBF,0x86,0xDD,0x78,0x54,0x0C,0x2A,0xC6,0xAD,0xF2,0xE9,0x85,0xD1,0x95,0x6E,0x5B,0x11,0x55, - 0x87,0x83,0xDE,0x67,0xDD,0x9A,0xB1,0xAD,0x98,0xC6,0x46,0x94,0x80,0xC3,0x41,0x24,0x98,0xD6,0x39,0x2C, - 0x0B,0xB7,0xC0,0x6D,0xB0,0xA8,0xC7,0xCB,0x81,0x4B,0x50,0x51,0x58,0x38,0x09,0x29,0xAF,0x19,0xB4,0x38, - 0x4E,0x96,0x44,0xB9,0x81,0x2A,0x8E,0xCE,0xC9,0x17,0xD6,0xC9,0x2A,0x3C,0x72,0xAE,0xC5,0x91,0x56,0x64, - 0xC8,0x5C,0x62,0x9F,0x18,0x73,0x4A,0xD8,0x2B,0x1D,0x90,0x3E,0x3F,0x90,0x5E,0x20,0xDA,0xF0,0xE4,0x59, - 0xE6,0x80,0x43,0xC8,0xA2,0xE1,0x8F,0xFC,0x1B,0x7F,0x57,0x79,0x39,0x5E,0xEA,0xDD,0xF6,0x81,0x4B,0x26, - 0x54,0x1F,0x40,0xEF,0x50,0x7B,0xD0,0xC8,0x4A,0xDE,0x72,0x13,0x1A,0x40,0x94,0x7D,0xA7,0x2D,0x20,0x17, - 0xE8,0xB1,0x0A,0xD1,0x74,0x4B,0xA3,0xE6,0x4A,0xFB,0x95,0xE1,0x81,0x0C,0xB9,0x65,0x25,0xCD,0x68,0xB2, - 0xCA,0x47,0x3C,0xF6,0x59,0x21,0x75,0x32,0x25,0x03,0x61,0xC7,0x94,0x02,0xC9,0x12,0xF4,0x80,0x03,0x51, - 0x59,0x64,0x7B,0xA5,0x83,0xE1,0xCB,0x0A,0x96,0xE3,0x3D,0x73,0xF6,0x36,0x99,0xB7,0xD3,0x6B,0xC3,0x6E, - 0xDA,0xF5,0xB2,0xF1,0xFD,0xC0,0x70,0x9D,0x46,0x3B,0xCB,0xD7,0x38,0x4B,0xEF,0x09,0xEE,0xB4,0xD0,0x66, - 0x26,0x0A,0x32,0xBE,0x54,0x9F,0x21,0x62,0xE2,0xA7,0x44,0x6A,0x9E,0xB1,0x71,0x76,0x37,0x07,0x8E,0xAF, - 0xCD,0x9C,0x27,0x6B,0x56,0x48,0x13,0x33,0xAF,0x0C,0x49,0x25,0xF5,0x60,0x36,0xBF,0xA6,0x9D,0x76,0x06, - 0x3E,0x24,0x8E,0x88,0xA2,0x92,0xA6,0x29,0x38,0x03,0x23,0xAE,0x71,0x47,0x55,0x69,0xB5,0x91,0x52,0x68, - 0xF6,0x76,0xC0,0x58,0x33,0x04,0xEB,0x58,0xA6,0x98,0x7A,0x6E,0xCC,0xAB,0x8C,0xE9,0x20,0x77,0x73,0x90, - 0xF7,0xC9,0x94,0x02,0xCA,0xC9,0xD1,0x2E,0xDF,0x8A,0xEB,0x5B,0x8D,0x5F,0xB0,0x4E,0xA0,0xA0,0x8F,0x59, - 0x26,0xBA,0xB1,0xED,0xDB,0x42,0xA5,0x7B,0x3E,0xCE,0x9C,0x49,0x3A,0xB7,0x6D,0xA6,0x7D,0x96,0x65,0x9D, - 0xDA,0x41,0x12,0x6A,0xA8,0xCF,0xB3,0x73,0xBA,0x12,0x7A,0x7A,0x07,0xCD,0x6C,0xFA,0x02,0x6B,0x33,0xEF, - 0x67,0xBF,0xD3,0x39,0x40,0x71,0x55,0xA7,0x0C,0xCE,0xA5,0xD3,0xD8,0x16,0x3B,0xDB,0xCF,0x80,0x47,0x21, - 0x45,0xEE,0x7B,0x7B,0x83,0xCF,0xA5,0x9D,0xDB,0xB2,0xCF,0xFD,0x87,0x6C,0x70,0xBB,0xDF,0xF4,0x4B,0xD8, - 0x0E,0x81,0xD2,0x7F,0x77,0x69,0x2A,0x22,0x23,0x93,0x08,0xF4,0x91,0x5C,0x04,0x5C,0xC9,0xDC,0x7C,0x16, - 0x77,0xF8,0x1A,0xDC,0x50,0x11,0x9B,0x23,0xC2,0x1D,0x4E,0x27,0xC6,0x81,0xEF,0xC0,0x9C,0xE3,0xC6,0xEC, - 0x06,0x6F,0x69,0x79,0x19,0xBE,0xD1,0x28,0x50,0x45,0x72,0x47,0x0A,0x5C,0x64,0x3D,0x26,0x6B,0xC2,0x24, - 0xBA,0xF5,0x42,0x11,0xE2,0x59,0x8D,0xD9,0x40,0x21,0x6C,0x2D,0xD8,0x95,0xCF,0x67,0xEF,0x76,0xEC,0x70, - 0x89,0xD7,0x2A,0x72,0x2B,0xBF,0x9A,0x3D,0x59,0xB6,0x46,0x62,0x6A,0x35,0x27,0x55,0x0D,0xB2,0xA0,0xDC, - 0xC4,0x63,0x69,0xD3,0x58,0x68,0x50,0x90,0xB9,0x35,0x45,0xC3,0x1C,0x78,0x6D,0x85,0x1C,0x0F,0x1D,0xD5, - 0xD8,0x1B,0x62,0x61,0xC5,0x19,0x3E,0x2E,0x0F,0x2A,0x27,0x5D,0x40,0x57,0xC5,0xE5,0x8E,0x12,0xA4,0xFF, - 0x88,0xCD,0x64,0x45,0xCE,0x52,0x0A,0x97,0x7B,0xFA,0x21,0x3B,0xAA,0x98,0x9F,0x70,0x4D,0xF8,0xA0,0x2F, - 0xCE,0x99,0xA2,0xDD,0x47,0x71,0x2D,0xAA,0xCF,0x34,0xD7,0x1B,0xE9,0x9A,0xC7,0x8A,0xDD,0x99,0xB2,0xDD, - 0xDC,0x3A,0x99,0xCA,0xD1,0x63,0x9B,0xBC,0xD5,0xEF,0xD6,0x98,0x0C,0x1B,0xD0,0xB3,0x7D,0xFF,0x91,0x25, - 0xD0,0x62,0x90,0x6B,0xAA,0x80,0x36,0xCB,0x17,0x72,0xE8,0x3E,0x94,0xF7,0x67,0x34,0xAE,0x9E,0x99,0x66, - 0x55,0xAD,0x09,0xEC,0xCA,0x55,0x76,0xFB,0x9D,0xF6,0x6F,0xDB,0x50,0x9F,0x46,0xB1,0x32,0xC9,0xDF,0x89, - 0x8D,0x38,0xC1,0x3F,0x97,0xF2,0x12,0x80,0xEB,0x44,0xDB,0xC5,0x67,0xD6,0xB0,0xA4,0x46,0x52,0x68,0x00, - 0x63,0x31,0xC5,0x48,0x61,0x02,0x07,0xFC,0x88,0xFC,0x98,0xB4,0x2E,0x05,0x58,0xD0,0x16,0x23,0x3B,0xB1, - 0x12,0x40,0x5E,0xD7,0x96,0xBA,0xD1,0x59,0x48,0xB9,0x29,0xDE,0xAF,0x42,0x77,0x17,0x60,0x80,0x71,0x1D, - 0x6C,0x6C,0x49,0xA4,0xCD,0x01,0x16,0x13,0xAE,0xA8,0x44,0xA2,0x85,0x66,0xBE,0x42,0xF3,0xA7,0x10,0xF0, - 0xE1,0xE4,0x81,0x16,0x76,0x90,0x5B,0x4B,0x7B,0x88,0xCC,0xB6,0x4F,0x09,0xCB,0x33,0x17,0x04,0x86,0x96, - 0x57,0x98,0xA9,0x7E,0xA6,0xF2,0xA4,0xB6,0x1E,0xAD,0xC6,0x63,0x66,0xE6,0x42,0x0A,0xF1,0x07,0x37,0x6D, - 0x6A,0xBD,0xAA,0x71,0xF0,0x36,0x82,0xFA,0xBC,0x4C,0x19,0xD5,0xFF,0x7C,0x63,0x8C,0x5B,0x31,0xE2,0xA6, - 0xE0,0x25,0x49,0x2D,0x4E,0xCA,0x49,0x28,0x5E,0x13,0x71,0x3F,0xA8,0x65,0x9E,0x7E,0x59,0x26,0xDA,0x4D, - 0xB0,0x0B,0xC0,0x3D,0xFA,0xC4,0xC3,0xC5,0x17,0x07,0x2F,0x9F,0x9A,0x20,0x92,0xAD,0xBB,0xF8,0xBC,0xAF, - 0xD9,0x8D,0xEC,0x63,0x5F,0x01,0xCA,0x7B,0x6E,0x3B,0x84,0x5A,0xBE,0x8E,0x45,0x0C,0x78,0x94,0x00,0xB7, - 0xE3,0xDD,0xD4,0xF8,0xF1,0x68,0x6C,0x1C,0xF5,0x17,0x54,0x32,0xD7,0x0E,0x10,0xC5,0x63,0xDC,0xB4,0x5B, - 0x3F,0x4E,0x00,0xB2,0xAA,0xB2,0xA7,0x8C,0x3C,0xDC,0xEF,0xD6,0x89,0x65,0x99,0x66,0xF0,0x8D,0x53,0x1B, - 0x31,0x0C,0x78,0xE8,0x49,0x51,0x8B,0xF9,0xAD,0x02,0x30,0x1A,0x72,0xEC,0xE4,0x3E,0x01,0x86,0x1B,0xDD, - 0x3B,0x62,0x19,0x6D,0x28,0x4B,0xB7,0xFD,0x03,0xB0,0x62,0x22,0xE0,0x88,0x90,0x20,0x0F,0x38,0xC1,0x58, - 0x27,0xC1,0xFD,0xBB,0xC4,0x3E,0xD8,0x60,0x3F,0x50,0xB6,0x64,0x2D,0x77,0xF7,0x68,0x6D,0x50,0x45,0x98, - 0x5B,0x34,0x2D,0x5E,0xEE,0x30,0xF5,0xA7,0x89,0x7F,0x95,0x6A,0x2E,0xEE,0x74,0xB2,0x4C,0x3C,0x25,0x21, - 0xC1,0x81,0xCD,0x38,0x52,0x75,0x84,0x61,0x34,0x1E,0x96,0x3B,0xD9,0xD7,0x2A,0xE6,0x83,0xD7,0x14,0x44, - 0x8E,0x79,0xDF,0x54,0x54,0xD9,0x1E,0x27,0xB7,0xBE,0x58,0x12,0x9E,0x5C,0xA2,0xF2,0x92,0xF6,0x96,0xFA, - 0xDE,0xE3,0x55,0x35,0x82,0x97,0x30,0x12,0x6E,0xDD,0xAE,0x15,0x54,0xC7,0x17,0x4C,0xCB,0xE6,0x7F,0x64, - 0xD9,0x98,0x98,0x00,0x40,0x17,0x29,0x06,0x7F,0x7A,0x61,0xF6,0xE2,0x17,0x7B,0x08,0x79,0xAF,0x52,0x2C, - 0x78,0x58,0xB6,0x8F,0xD9,0xF2,0x47,0xE6,0xF5,0x16,0x6B,0x14,0x9C,0x6F,0x9A,0x98,0x27,0x8B,0xE6,0x54, - 0x2F,0x34,0x0F,0x80,0xAE,0x60,0x6B,0x65,0x7B,0x77,0x4E,0xAF,0x0D,0x53,0x11,0x2F,0xFD,0x33,0xCF,0x85, - 0x3F,0xBB,0x87,0x85,0x3B,0x2C,0x46,0xA7,0x0C,0x40,0xFF,0x1D,0xE1,0x74,0x86,0x68,0x0C,0x97,0x62,0xAE, - 0xD1,0x1F,0x64,0xD8,0xED,0x1E,0x2F,0x96,0x1A,0x1C,0x8E,0x25,0xF7,0xB0,0x94,0xF4,0x53,0x2E,0x9A,0xB8, - 0x33,0xD6,0xD6,0xF5,0xCE,0xFC,0xB8,0x2B,0x56,0xCF,0x2B,0x5E,0xC2,0x7F,0x84,0x7F,0xEC,0xAD,0x28,0x86, - 0x75,0x88,0xDC,0xA8,0xD3,0x16,0xB1,0xDB,0xD8,0xFA,0xC0,0xC4,0x00,0x1B,0x5B,0x03,0x0A,0x11,0x21,0x86, - 0x13,0xFE,0x18,0xF9,0xF5,0x3F,0xEF,0x0A,0x37,0x75,0xE9,0x17,0xF1,0x3F,0x50,0x61,0x06,0x20,0xD6,0xF6, - 0xFC,0x58,0x89,0x5A,0x43,0xCA,0x90,0x6B,0x14,0xE0,0x9A,0xE1,0x28,0x7F,0xDE,0x74,0xB7,0x53,0x6E,0x7F, - 0x78,0xFB,0x9B,0x82,0xFA,0x68,0x11,0x23,0x86,0x2C,0x7A,0xE4,0xE8,0x1E,0x62,0xB7,0xA0,0x65,0x44,0x0C, - 0xB8,0x18,0x7E,0x7A,0x25,0xED,0x07,0xB5,0x70,0x09,0x38,0x0F,0xBB,0x86,0x8B,0x96,0xFA,0x55,0xFF,0x21, - 0x7B,0xE9,0x78,0x69,0x7A,0x7E,0xCC,0x10,0xBC,0xDE,0x0C,0x74,0x73,0x48,0x5F,0x7F,0xC6,0x29,0xB7,0xD9, - 0x7D,0x05,0xA2,0xE1,0x67,0x59,0x8F,0x61,0x37,0x65,0x0F,0x8A,0x84,0x6D,0xE9,0x28,0xFF,0x64,0x1F,0x05, - 0x4A,0xA5,0x6A,0xF3,0xFD,0x0D,0x82,0x78,0x6E,0x9E,0xF4,0x72,0xF7,0x71,0xF2,0xAE,0x03,0x8A,0xB6,0xAA, - 0x23,0x2B,0x72,0xE9,0x89,0x04,0xB5,0x3A,0xE1,0xA2,0x1D,0x48,0xB6,0x8B,0xE3,0x0A,0xF8,0x46,0xE3,0xC6, - 0xDD,0x0B,0x98,0xBE,0xE5,0x05,0xAC,0x5B,0xCA,0x88,0xEA,0x1C,0x39,0x95,0x79,0x91,0x8B,0x11,0x18,0x62, - 0x65,0x72,0x61,0xF1,0xCB,0x48,0x73,0x4D,0x26,0x10,0x38,0xD7,0x66,0x7D,0x9C,0xFA,0xEB,0x0F,0x8F,0xAD, - 0xB7,0xBA,0x32,0xCE,0x3A,0xF7,0x74,0x62,0x2C,0x65,0xD4,0xEA,0x7F,0x52,0x60,0x78,0xDD,0xC5,0x51,0xFB, - 0xCC,0xD2,0xA3,0xEB,0xA8,0x83,0xB5,0xBC,0xF4,0xEF,0x29,0x69,0x7D,0x53,0x75,0x31,0x53,0x8C,0x5C,0x66, - 0x73,0x5E,0x95,0xF7,0x76,0x0C,0x74,0x8B,0xEC,0x3E,0x86,0x8F,0x17,0x5E,0xAB,0xF1,0x79,0xFC,0x11,0xE4, - 0xCB,0xD5,0x92,0x54,0x62,0xA9,0xED,0x22,0xD1,0x2F,0xBC,0x61,0xA9,0x9C,0x13,0x70,0x33,0xA8,0xFC,0x67, - 0x51,0x93,0xE1,0x71,0xF0,0xA4,0x47,0x9E,0xA5,0x86,0x9D,0xD8,0x13,0xA2,0x02,0x27,0xC1,0xBD,0xB4,0xC1, - 0x0B,0xB0,0x56,0xB4,0x04,0x2C,0xE3,0x57,0xE1,0xA8,0x34,0xB3,0xE3,0x72,0x7D,0x32,0x1F,0xB1,0xE6,0xB1, - 0x5A,0x3D,0xB2,0x73,0xDD,0xD0,0x4E,0x52,0xFC,0x7B,0x17,0x26,0x22,0xC9,0x68,0x2E,0x27,0x80,0x72,0x46, - 0xC8,0x18,0x42,0x86,0x25,0x0A,0x10,0x68,0x76,0x15,0x72,0x23,0xA8,0x1D,0xDD,0x38,0x92,0x1B,0xD1,0x13, - 0xEE,0xD9,0xE7,0xE2,0x01,0x6B,0x7E,0xDB,0x27,0x37,0x3D,0x90,0x69,0xF6,0xC2,0xB4,0x31,0xDD,0x44,0x30, - 0x29,0xFF,0xE6,0xE2,0xDB,0xD9,0xFB,0xE8,0x7C,0xF7,0x3D,0x2E,0x5E,0xD8,0x69,0xAE,0xFE,0xFB,0xB0,0x10, - 0xA8,0xD9,0xAF,0x6F,0x16,0x79,0x67,0xE3,0x49,0x02,0x0A,0x4E,0x7F,0xF6,0x37,0x8F,0xA0,0xD8,0x1F,0x1D, - 0xB0,0xB2,0xF7,0x56,0x24,0x98,0xF6,0x5F,0x6E,0xF5,0xF0,0x9A,0xAB,0x70,0x3F,0xED,0x8E,0x80,0xD8,0x46, - 0x2E,0x99,0xDF,0x1F,0xF1,0x70,0xCA,0x6F,0xFB,0xFF,0xD8,0x7E,0x81,0x27,0x33,0x95,0x68,0x2F,0x76,0x29, - 0x5A,0x90,0x3E,0x21,0x4C,0xD2,0x6E,0xC7,0xFF,0x10,0xBE,0x47,0x61,0xD5,0x06,0x16,0xE5,0x32,0xCC,0x01, - 0x15,0xDC,0xE7,0x30,0xC9,0xBE,0xFB,0x6F,0x98,0x18,0x67,0x9D,0xCD,0xEC,0x79,0xE3,0xA9,0x9C,0x3D,0xEF, - 0xB7,0x10,0x78,0x0B,0xC4,0x2E,0xA6,0xDB,0x58,0xBE,0x59,0x13,0xE5,0x89,0x7F,0x7E,0x66,0xFF,0xE6,0x71, - 0xE3,0xFB,0x50,0xD8,0xBE,0x22,0x19,0x63,0x31,0x6D,0x51,0x6A,0xC5,0x82,0x9E,0xF0,0x2B,0xB5,0xEA,0x30, - 0x55,0x0D,0x05,0xE1,0xB5,0xAD,0x41,0xA5,0x38,0x60,0x15,0x5A,0x4D,0xC4,0x4E,0xC8,0x39,0x01,0x6F,0xC8, - 0x82,0x2A,0x2E,0xA1,0x24,0x61,0xB9,0x2F,0x4D,0x26,0x09,0x47,0x3A,0xE0,0x26,0xEC,0xFD,0xA9,0x82,0xA2, - 0xEF,0x2F,0x58,0xC2,0x21,0xB4,0x89,0xF9,0xBB,0xB5,0x88,0x24,0x71,0xA8,0xC7,0x26,0xF8,0x34,0x5A,0xF4, - 0x4C,0x07,0xA0,0x9C,0x55,0x28,0x17,0xD2,0xB8,0xD9,0xC5,0xA3,0xB0,0x67,0x29,0x46,0x23,0x49,0x29,0xE7, - 0xF0,0x96,0x98,0x6C,0x7C,0xAA,0xF7,0x7D,0x1E,0x3C,0xC9,0x80,0x60,0x07,0x22,0x7D,0x76,0x98,0x3C,0x20, - 0x60,0x05,0xD2,0x56,0x1E,0x2B,0x2A,0xD2,0x4E,0x32,0xAC,0x9C,0xD5,0xEE,0x50,0x7F,0x61,0x18,0x26,0x99, - 0xCC,0x4B,0xBA,0x26,0xC5,0x2C,0xBA,0x79,0xF8,0x62,0x15,0x6B,0x63,0x3B,0x11,0xE5,0xD4,0xF6,0x94,0x53, - 0x6B,0xBE,0xD1,0xED,0x5F,0x6C,0xCB,0xB9,0x8B,0x02,0xE2,0xF6,0x66,0xA0,0xAF,0x5B,0xA1,0x46,0x9D,0x4E, - 0xF7,0xEC,0x17,0xF4,0xFD,0x60,0x61,0xDA,0x19,0x64,0x6C,0xC1,0x4C,0x4F,0x12,0x85,0xD5,0x2E,0x2C,0xED, - 0x0A,0x5D,0xB3,0x3A,0x3A,0xEE,0x62,0x8B,0xCF,0x59,0x62,0x83,0x4B,0x20,0xFC,0xDA,0xB8,0xD3,0x99,0x52, - 0xF2,0x3F,0x80,0x0B,0x79,0x2B,0x01,0x58,0xE9,0x2C,0x75,0xF1,0xEB,0xF0,0x7C,0x75,0x9D,0xF4,0xFF,0x3E, - 0x09,0x49,0xBB,0x7F,0xF9,0x93,0xFF,0xFF,0xAD,0xC6,0xD2,0xBF,0x56,0xE5,0x4D,0x82,0x85,0x56,0xB7,0x11, - 0xA8,0x63,0x2C,0x94,0x5E,0x11,0x8B,0x86,0xCC,0x40,0x18,0x34,0x7E,0x03,0x4D,0xC7,0x1F,0xF2,0x0D,0x91, - 0xDF,0x32,0xD3,0xBA,0xD6,0x70,0xE3,0xEC,0x43,0xE9,0xAF,0x94,0xC2,0xDD,0xB2,0x41,0xFD,0x1A,0x72,0xEB, - 0x87,0xEC,0x25,0x4E,0xD2,0xC5,0xE6,0x46,0xCB,0x1F,0x3C,0x42,0x2B,0xC9,0x7C,0x3F,0xBF,0xC9,0x1C,0x68, - 0x01,0xA6,0x6F,0x86,0x31,0xCB,0x74,0x80,0x2B,0x1A,0xD2,0x36,0xA1,0x3D,0x8C,0x00,0x9C,0x5A,0xE4,0x24, - 0x88,0x7A,0x7D,0x91,0xA6,0x19,0xA2,0x35,0x32,0x29,0x43,0x48,0xE4,0x55,0xAD,0x67,0xFB,0x39,0x2D,0x91, - 0xE5,0x9A,0xCB,0xEA,0x83,0x75,0x03,0x13,0xE7,0xFA,0xBD,0xB4,0x14,0x7A,0x07,0x0C,0x1B,0x2E,0x16,0x93, - 0x16,0x3E,0xAC,0xEF,0xB6,0x50,0xA8,0x1D,0xBA,0xF8,0xB6,0xA7,0x19,0x5B,0xCE,0x7E,0xD8,0x3F,0x66,0x3C, - 0x76,0xA9,0xF8,0x08,0x86,0xF2,0xB0,0xA1,0xAE,0x01,0xA7,0xDC,0x19,0xB2,0x15,0xB0,0x12,0x9A,0xDF,0x34, - 0x75,0xF7,0x41,0xEF,0xAF,0x2A,0xAB,0xC1,0x1A,0x96,0x27,0x3B,0x0F,0xC4,0x9D,0x2E,0x93,0xA4,0x3E,0x4A, - 0x2B,0x9B,0xC9,0x37,0x72,0x2D,0x03,0x6C,0x48,0x8F,0x9C,0x17,0xD9,0x7A,0x8E,0x1D,0x74,0x97,0xD9,0x58, - 0x04,0x4D,0x26,0xDC,0x08,0xAF,0xA1,0x1E,0xF9,0x55,0xFC,0x2B,0x06,0xE3,0xE7,0x7B,0x9E,0xCA,0x0D,0x16, - 0x49,0x3B,0xDB,0x13,0x5B,0xF4,0x30,0x5D,0xA4,0xCA,0xAF,0x6B,0x48,0xC2,0xC8,0x7D,0xC9,0x1C,0xE0,0x79, - 0xF4,0xDA,0x2B,0x3D,0x34,0xC2,0x50,0x2B,0x12,0x83,0x4B,0xD2,0x05,0x71,0x34,0x2B,0x2B,0xFD,0x72,0x70, - 0x24,0x20,0x3F,0xE9,0xE4,0x72,0xCE,0xC1,0xC9,0xCC,0x54,0x27,0x37,0xE5,0xFA,0x03,0x06,0x86,0x3B,0x65, - 0xE7,0xA2,0x4F,0x25,0x25,0x41,0x6A,0x22,0xD2,0x09,0x85,0x60,0xA8,0x25,0x52,0x93,0xB7,0x36,0xC4,0x74, - 0x34,0xB5,0x05,0xB5,0x55,0x8B,0x9F,0x31,0x68,0x07,0xE0,0x01,0xFF,0xCD,0x4E,0x65,0x84,0xC4,0x88,0x41, - 0xAB,0xEB,0xE0,0x45,0xE6,0x8A,0x44,0x25,0x7E,0x03,0x18,0x08,0x85,0xC5,0x4C,0x05,0x23,0xEA,0x9E,0xBD, - 0xA2,0x80,0x87,0x23,0xD6,0x59,0x79,0xD3,0x3F,0x40,0x45,0x14,0xAE,0xE9,0x09,0x17,0xB9,0x88,0xF3,0x47, - 0x60,0x5A,0x71,0x4B,0xC1,0xC4,0x39,0x82,0xDB,0xA9,0xBA,0x1A,0xF3,0xE4,0x62,0xE2,0xE9,0xEA,0x49,0xAE, - 0x53,0x9A,0xE8,0xD1,0xFF,0xEE,0x28,0x05,0xAE,0x0C,0x88,0x50,0xE8,0xF5,0xBE,0x07,0xB2,0x44,0x05,0xDC, - 0xD2,0xA8,0x1D,0x7A,0x46,0x03,0xF7,0x1C,0x9A,0x1A,0x08,0xC9,0x94,0x41,0x93,0x7E,0x7D,0x60,0xD4,0x79, - 0xED,0x2B,0x06,0x60,0x00,0x3E,0xE8,0xC5,0x4D,0x67,0x18,0x8E,0x01,0x28,0x02,0x0B,0x4A,0x07,0xA8,0xA4, - 0x3D,0x9E,0xA3,0x08,0xFD,0xA9,0xB6,0xEA,0x25,0x7A,0x68,0x4A,0xAC,0x8B,0xA8,0x21,0xCB,0xA2,0xDE,0xBD, - 0x8D,0xC1,0x6A,0xFC,0x5A,0x09,0xE3,0xA9,0x0C,0xA6,0x58,0x9F,0x2D,0xA5,0x4B,0x98,0x4A,0xDA,0xBB,0x6B, - 0x5B,0x4D,0x67,0x24,0xEC,0x2F,0xD9,0xA0,0xAC,0xF4,0x45,0x7C,0x0D,0xCF,0xC1,0x9D,0x5D,0xC7,0xD7,0x73, - 0x87,0xD0,0x70,0x34,0x38,0x10,0x4C,0x86,0xF9,0x6D,0x74,0xD2,0x06,0x9C,0xE1,0x16,0x0F,0xCA,0xD4,0x14, - 0xB5,0xD9,0x85,0x36,0x47,0xD0,0xBE,0x28,0x82,0xF2,0x1B,0xAB,0x26,0x97,0x9F,0x05,0x34,0x9A,0x98,0xED, - 0x19,0x8E,0x8F,0x38,0x0B,0x79,0xBD,0x82,0x95,0x97,0x93,0x32,0x16,0x48,0x64,0xA6,0x30,0xBF,0x03,0x1F, - 0x14,0x2C,0x1C,0x40,0x27,0xF3,0x9C,0xD5,0x4E,0x65,0xC9,0x00,0x06,0x9B,0x94,0xA7,0xDD,0xB6,0x92,0xB0, - 0x66,0xB5,0xFF,0xB0,0x5F,0x04,0x78,0x10,0x61,0xD6,0xF0,0x05,0x71,0x9F,0x5F,0x21,0x24,0x9E,0xB5,0x57, - 0xB4,0xAD,0xB5,0x43,0x7C,0x5D,0x39,0x7C,0x55,0xF0,0x15,0x51,0xA6,0x50,0x93,0xEB,0x95,0x37,0xAC,0x89, - 0x44,0xB2,0x9A,0x15,0x75,0xDF,0x47,0xAE,0x5B,0x9C,0x9F,0x72,0x30,0xFA,0xF2,0xF4,0x62,0xC6,0x49,0xAC, - 0x52,0x96,0x0B,0x6A,0xAD,0x96,0x97,0x63,0x8C,0x62,0xAB,0x3E,0x47,0x03,0x80,0x0F,0xB7,0xCA,0xF8,0x8D, - 0x2E,0x7D,0x79,0x48,0xBA,0x21,0x4A,0x54,0x8F,0xBF,0x89,0x1B,0x36,0xA9,0x76,0x00,0x48,0x9D,0x2B,0x1B, - 0xD2,0xD5,0x07,0x43,0xED,0x2A,0xB7,0x97,0x14,0x38,0x5E,0x1A,0x72,0x14,0x64,0xF1,0x46,0x13,0x49,0x08, - 0x4A,0xC7,0x89,0x6A,0x71,0x4A,0x9E,0xB8,0x6C,0x6D,0x2D,0xAD,0x47,0xF2,0x58,0x0C,0x5C,0x38,0x7E,0x7A, - 0x70,0x28,0x7F,0x29,0x2C,0x96,0xF0,0xD0,0xCA,0xA5,0xD4,0x9D,0x11,0xC5,0x37,0x2A,0xA1,0x76,0x65,0x5B, - 0x0C,0x99,0x8F,0x7F,0xA7,0xB0,0xC7,0x9B,0xA3,0x92,0xC5,0x1D,0x7D,0xF7,0xF4,0xE2,0x82,0x08,0x06,0xC3, - 0xED,0xA6,0x2A,0x90,0xC0,0xEF,0x4A,0x24,0x40,0xAB,0x02,0x30,0xA2,0x07,0xC0,0x1C,0xE8,0xA7,0xE7,0x42, - 0x23,0x61,0xC1,0x30,0xF4,0xCE,0xF1,0x63,0xC3,0xF2,0xC9,0x7B,0x52,0x22,0xB5,0x43,0xA0,0x42,0x95,0x63, - 0xA8,0x23,0x01,0xB3,0x70,0x0C,0xC1,0x6F,0x53,0x23,0x36,0x4E,0x18,0xDC,0xCB,0x3D,0x74,0xCC,0xF6,0xB1, - 0xEA,0x54,0xC1,0xB4,0xBF,0xD5,0xAF,0x9C,0x42,0x06,0xDC,0x63,0xF3,0xEC,0x77,0x0E,0xF2,0xD9,0xB0,0x2B, - 0x7B,0x28,0x98,0x69,0x85,0xB8,0x49,0xF6,0x50,0x83,0x3F,0x73,0x07,0x10,0x01,0xE5,0x08,0xFB,0x5D,0xA6, - 0xB1,0x46,0xD5,0x87,0xD4,0x9D,0x10,0x45,0x0E,0x64,0xDF,0x37,0x6C,0x9A,0xCC,0x9E,0x36,0x14,0x83,0x5B, - 0x70,0x61,0xB6,0x73,0xAB,0xF5,0x8A,0x99,0x27,0x48,0xAD,0x48,0x72,0xE5,0xC4,0x3D,0x29,0xC5,0xCA,0xD4, - 0xB0,0x04,0xE8,0xBC,0xEC,0xAF,0x28,0x09,0xE8,0xB6,0x07,0x4F,0x33,0xC8,0xC3,0xCC,0x8E,0x4B,0xA3,0x88, - 0x17,0xD7,0x8D,0x3A,0xF0,0x45,0x88,0xCD,0xDC,0xCA,0x6B,0xB9,0x91,0x04,0x8B,0xDD,0x89,0x96,0x25,0xDB, - 0xE7,0x94,0xA3,0xC2,0x30,0xE8,0xE9,0xED,0xDF,0x12,0xD4,0x2E,0x72,0x21,0xA9,0x37,0xF7,0xB0,0x25,0x12, - 0x39,0xC9,0x69,0xA9,0x97,0x4D,0x54,0x65,0x1D,0x2E,0x4B,0x6B,0x26,0xDC,0x8A,0x60,0x50,0x6B,0x3E,0xBA, - 0x52,0xDA,0xBC,0xB1,0xDA,0xA5,0xC3,0x91,0x2E,0xF5,0xAB,0x4A,0x79,0x2F,0xA3,0xD3,0xA9,0xD9,0x86,0x3F, - 0x68,0xA4,0x9B,0x0D,0x14,0xE2,0x29,0x87,0x7A,0xD0,0x5D,0xB2,0xC5,0xCF,0x44,0x74,0xA3,0x92,0x4A,0xA9, - 0x66,0x9B,0x77,0x5E,0x99,0xD3,0x74,0x82,0xD6,0xEC,0x53,0xD6,0x37,0xAA,0x8D,0x34,0x18,0xC1,0xCE,0x11, - 0x86,0xFA,0x13,0xF4,0xE2,0xC6,0xD9,0xA1,0xC7,0x16,0xBE,0x9A,0xDC,0xC7,0x83,0xC7,0x0F,0xDF,0xAE,0x73, - 0x61,0x08,0xC1,0x69,0x39,0xC8,0x23,0x98,0xC2,0x46,0x75,0x88,0x1A,0x37,0xFF,0x9A,0xC3,0x6B,0x2F,0x17, - 0x16,0xCF,0x47,0xE1,0x64,0x36,0x33,0x09,0xB1,0xD0,0x54,0x58,0xC2,0xA4,0x0B,0x34,0x3B,0xE7,0x62,0x85, - 0x08,0x5A,0x0E,0x09,0xF2,0xAE,0xBC,0xBB,0xE1,0xC9,0x15,0x39,0xB2,0xCB,0x30,0x65,0xDC,0x29,0xC2,0x54, - 0x3A,0xA7,0xB2,0xAB,0xC1,0xC8,0x72,0x89,0x90,0xD8,0xDD,0xC3,0x83,0x96,0x7B,0x71,0x86,0x32,0xE1,0x7E, - 0x1B,0x9D,0xAE,0x08,0x69,0xC0,0x86,0x07,0x64,0x9A,0xCC,0x27,0x0E,0xD7,0xB4,0x87,0x8A,0x9D,0x39,0x3C, - 0x7F,0x1B,0xA5,0x2A,0x69,0x53,0xA1,0x5E,0xFB,0x7D,0xBD,0x76,0x9B,0xEC,0xDE,0xC6,0xBE,0xB2,0xBB,0xD6, - 0x2A,0x59,0x33,0xD7,0x5B,0x1F,0x31,0x7B,0xAF,0x61,0x4F,0xCD,0x7D,0x79,0x14,0xFE,0x10,0xDD,0x95,0xDF, - 0xB8,0x7F,0x1F,0x8B,0x2C,0x34,0x9C,0x2E,0x3C,0xF7,0x29,0x9B,0xC9,0xDF,0x0D,0x73,0x05,0xF2,0xF3,0xE5, - 0x94,0x40,0x94,0xD8,0x98,0x3B,0xA1,0x7C,0x65,0x6B,0x81,0xE9,0x7D,0xD6,0xEC,0x4D,0xF2,0xD8,0x69,0x4F, - 0xBB,0x46,0xE5,0x13,0x81,0xCF,0x62,0xD1,0x4E,0xCF,0x9C,0x37,0xD8,0x5F,0xC7,0x91,0xF9,0x30,0xDF,0x54, - 0x54,0x59,0xDA,0x01,0x25,0x84,0x40,0xB5,0x10,0xC2,0xC2,0xA6,0xE5,0x26,0x8F,0x12,0xC5,0x6F,0x70,0x76, - 0x7D,0x4D,0x78,0x0F,0xA6,0x87,0xAE,0x49,0xA8,0x5D,0x46,0x1E,0x72,0x37,0xA3,0xD4,0x22,0xD7,0xE8,0x79, - 0x25,0x84,0xA1,0x47,0x90,0xD9,0xA4,0x5D,0xA6,0x26,0x2C,0xC5,0x78,0x4F,0x09,0x6A,0x24,0x02,0x39,0x64, - 0xBE,0xAA,0xE4,0xE1,0xAE,0x60,0x66,0xF5,0x3C,0x40,0x1F,0x31,0xEC,0x2C,0x7E,0x7B,0x10,0xA7,0xEA,0xF2, - 0x8E,0x2D,0xE8,0x2A,0x65,0x56,0x43,0xBC,0xB8,0x81,0xE0,0x46,0x28,0x85,0xF8,0x40,0x27,0xD4,0x5F,0x94, - 0xB7,0x41,0x13,0xA3,0xC2,0x0D,0xAC,0x25,0x19,0x30,0x09,0x51,0xAD,0xC9,0x49,0x98,0x3F,0x0F,0x6B,0x7D, - 0x71,0xF2,0xC9,0x53,0xA8,0xA7,0x06,0x00,0x64,0x44,0x81,0x4E,0x3C,0x36,0xA2,0x88,0x2E,0xFA,0x68,0xC9, - 0xDE,0x48,0x32,0x39,0x21,0x0B,0xA0,0x2F,0xA7,0x65,0x4A,0xAD,0x15,0x84,0x75,0x36,0x22,0xA9,0xA1,0x1C, - 0x4B,0x02,0x66,0xF4,0xD0,0x62,0x5B,0xE3,0x52,0x4A,0xAB,0x8F,0xEB,0x6F,0x84,0x06,0x3B,0x88,0xE5,0x9F, - 0x2F,0xA8,0xD4,0xE9,0xAC,0xC9,0x72,0x0B,0x7C,0x14,0x90,0xC2,0xDD,0x89,0xBF,0xA0,0x26,0x66,0x95,0x15, - 0xB3,0x70,0x59,0x9E,0x16,0xD5,0xC0,0x90,0xA7,0x25,0x92,0x6C,0x00,0xE1,0x02,0xDC,0xF3,0xCC,0x7D,0xDA, - 0x3D,0x97,0xBA,0x0E,0x90,0x56,0xED,0x7E,0x97,0x04,0xC8,0x25,0x5B,0x80,0xFB,0x47,0xFD,0x47,0x09,0x7B, - 0x25,0x5F,0x81,0x3F,0x9A,0x45,0x44,0x24,0x56,0x13,0xD0,0xBD,0xC3,0x1F,0xC9,0x82,0xFF,0x64,0x68,0x87, - 0xDF,0xB4,0x32,0xE0,0xD7,0xF5,0x78,0x4C,0xC9,0x39,0x64,0xD8,0xA6,0xD0,0xCC,0x82,0xFB,0xF2,0xD7,0xB5, - 0x84,0x6E,0x73,0x93,0x33,0x98,0x1C,0x0F,0xDB,0x71,0xD4,0xA8,0xB3,0x05,0x1D,0x78,0x08,0x9F,0xA1,0xDB, - 0x95,0x12,0x7D,0xE6,0xDB,0x72,0x02,0xA6,0x79,0xFE,0x4D,0x37,0xE4,0xD1,0xE1,0x13,0xFB,0xE2,0x28,0xF4, - 0x18,0x55,0x5B,0x46,0x3F,0xB3,0x3B,0xC2,0xD7,0x9D,0xBB,0xE6,0x45,0xB4,0x54,0x44,0xC7,0x7B,0x9E,0xC9, - 0x02,0xA1,0x57,0x62,0xD8,0x8E,0x2C,0xA7,0x92,0x48,0xE2,0x76,0x59,0xAA,0x5A,0x72,0x0E,0x65,0x24,0xB1, - 0xDE,0x69,0x3A,0xC7,0xC1,0xBA,0x62,0x0E,0xEE,0x23,0xE2,0x1E,0x77,0x6D,0x45,0x57,0xAE,0x4B,0x66,0xB7, - 0xF9,0xB1,0xED,0x1B,0x2F,0x15,0x6D,0x73,0xCC,0xD1,0x66,0xEF,0x28,0x43,0x66,0x77,0x40,0xF6,0x77,0xD4, - 0xAE,0xD8,0xE8,0x3C,0x78,0x75,0x68,0xB3,0x4E,0x66,0xBE,0x3A,0x6D,0xBA,0x5C,0x32,0x9C,0x5F,0xE0,0x25, - 0x6D,0x56,0x42,0x98,0xC9,0xAB,0xB0,0x2F,0xC0,0x4A,0x7F,0xA6,0x61,0x67,0xC9,0x31,0x17,0x0C,0x39,0xB2, - 0x46,0xDF,0x3D,0x8A,0x8E,0x8F,0x3F,0x7B,0xE9,0xA0,0xDC,0x4C,0x19,0x54,0xA6,0xD3,0xE8,0x61,0xEA,0xB9, - 0x5D,0x23,0x2C,0x8D,0x16,0x9E,0x36,0x6A,0x8D,0xF7,0x97,0x22,0x27,0x26,0x34,0x89,0x40,0xDD,0xC2,0xC7, - 0x69,0xDE,0x09,0xFF,0x73,0xBF,0xF2,0x24,0x5B,0xCD,0x9F,0x3F,0x78,0xFC,0x27,0x6B,0x19,0x55,0x73,0xEB, - 0x8D,0xE3,0x6F,0x33,0x51,0xD2,0x2F,0xBE,0xB4,0xB9,0x3F,0xBC,0x39,0xD5,0x24,0x48,0xDB,0xFF,0x5E,0xB0, - 0x88,0xAB,0x37,0x05,0x9D,0x2C,0xA8,0xDF,0xC2,0x57,0x3F,0xA0,0x3B,0x39,0xEF,0xE1,0x6F,0x8F,0x77,0xE5, - 0xAE,0x12,0x20,0xCB,0x47,0x1A,0x23,0xA7,0x2D,0x6B,0x57,0x43,0xEB,0xC1,0xE9,0x1B,0x67,0xD6,0xA4,0x43, - 0x33,0x27,0x3D,0x5A,0x1A,0x61,0x37,0x64,0xE1,0xDC,0xD9,0xEB,0x9D,0x88,0x67,0x76,0x3C,0xC5,0x1B,0x2B, - 0xAD,0x97,0xC2,0x07,0xEB,0x17,0xB8,0xC6,0xEC,0xB9,0x90,0xCF,0xC0,0x83,0xB0,0xC4,0x00,0x6B,0x39,0x77, - 0x05,0x2D,0xD2,0x67,0x30,0x45,0xC8,0x98,0x19,0x08,0x5C,0x96,0x8B,0x21,0xA6,0xB2,0xB0,0x00,0xF9,0xBB, - 0x3E,0x2B,0xEC,0xE5,0xC4,0x5A,0xB1,0x21,0xD9,0xED,0xB3,0x13,0x22,0x1C,0x72,0x25,0x7B,0x2E,0xA6,0x03, - 0x34,0x9A,0xFA,0x72,0x72,0x98,0x7C,0xA1,0xE9,0xA7,0x7F,0x1C,0x73,0x57,0x01,0x56,0x8A,0x68,0xC2,0x27, - 0x2C,0x58,0x6C,0x6C,0x0A,0x1A,0xD4,0xF3,0x49,0x2A,0xA0,0xAA,0x41,0x43,0xE1,0x4F,0x25,0x96,0x52,0x7A, - 0xBA,0x66,0x43,0xFC,0x27,0x88,0x5B,0xAD,0xFB,0x3E,0xB3,0x4B,0x31,0xBB,0x35,0xA8,0xE9,0x8B,0xF2,0xE6, - 0xF2,0x54,0x9F,0x99,0xED,0x5B,0xA0,0xC3,0xFD,0x29,0x75,0xCC,0x0F,0x6C,0xC1,0xB1,0x16,0x6E,0xFE,0xF7, - 0x49,0xBF,0xF8,0xE9,0x54,0x0E,0xFE,0xDC,0x02,0x36,0x6E,0x3E,0x5A,0x0D,0x58,0x3F,0x45,0x0F,0x91,0x9E, - 0xA6,0xE1,0x2B,0x2B,0x08,0x19,0xDF,0x8C,0x18,0x06,0x43,0x64,0x92,0xB3,0x99,0x6C,0x58,0x26,0x2B,0xF3, - 0x67,0x4D,0xB3,0x79,0x06,0x92,0x1F,0x3D,0x3E,0x0D,0x1F,0xAD,0xD7,0x0A,0x52,0x34,0xCB,0xD3,0xDA,0x6B, - 0x12,0x33,0xBF,0xE7,0x6E,0x8C,0x62,0x19,0xD1,0xE6,0x5A,0x63,0x4B,0xCC,0x3B,0x6B,0xB2,0x3F,0xB3,0xDE, - 0xBC,0x13,0x0C,0x49,0x7D,0x30,0xC5,0xD1,0x66,0xB3,0xFC,0x7E,0x44,0xED,0xD1,0x6B,0x5B,0xED,0x9D,0xA0, - 0x8F,0x52,0x5B,0x21,0x4A,0x90,0x6D,0xAA,0x95,0x98,0xC2,0xAD,0x78,0xAE,0x5D,0x30,0xB1,0x7B,0x1E,0xC1, - 0x81,0x12,0x42,0x9A,0xBF,0x56,0x5C,0xE8,0x64,0x76,0x2F,0x9B,0xFF,0xA2,0xB8,0x7C,0x25,0x57,0x33,0x50, - 0x11,0xA0,0x7C,0xE4,0x65,0x77,0x4B,0x1E,0x92,0x3A,0xB7,0xB0,0x01,0x10,0x6E,0x40,0x21,0x09,0x4F,0x11, - 0xE6,0x59,0x9D,0xEC,0x91,0x82,0x23,0x53,0x0D,0x0D,0x72,0x37,0x4A,0x75,0x47,0x01,0xEB,0x58,0x5A,0xF7, - 0x06,0x39,0x00,0x20,0xA8,0x34,0x15,0x8D,0x5B,0xC7,0x3B,0x2C,0x4A,0x33,0x53,0x2E,0xD6,0x2B,0x75,0x90, - 0x8C,0xA6,0xEE,0x2B,0xF1,0x34,0x98,0xE6,0xE4,0x3B,0x61,0x7B,0xFB,0x9E,0x97,0x61,0x65,0x57,0xF9,0xB0, - 0x53,0x39,0xD7,0x09,0x8C,0x41,0xAF,0x53,0x54,0x77,0x6F,0x33,0x15,0x16,0xD1,0x7F,0xE5,0xBE,0xB4,0x3C, - 0x7A,0x64,0x4C,0xDF,0x27,0x7D,0x7E,0x33,0x86,0x11,0x96,0x09,0x3C,0x3E,0xD5,0xA9,0xB6,0x1D,0xC0,0xC8, - 0x9B,0x83,0x36,0xFF,0xD2,0x12,0xD8,0xBE,0x5B,0x11,0x26,0x1A,0xC7,0x52,0xE0,0x99,0xB1,0x34,0x27,0x7F, - 0x17,0xA2,0x12,0xA2,0xD2,0x33,0x37,0x56,0x1B,0xD5,0x17,0x11,0xFA,0x12,0xF0,0xB9,0xF1,0xBE,0xB1,0xDB, - 0x5A,0xBC,0x3F,0xB9,0x05,0xD2,0x20,0xBA,0x12,0xD6,0xDF,0x70,0x6E,0x03,0x61,0x1C,0xE3,0x14,0x69,0xBD, - 0xE1,0xC1,0x74,0x36,0x55,0xF0,0x0E,0xBB,0x14,0xF4,0xF8,0xE8,0x19,0x0A,0x94,0x16,0x43,0xC2,0x3C,0xCB, - 0x55,0xA0,0xDA,0xF2,0xC9,0x82,0x5E,0xF6,0x2B,0x91,0x09,0x27,0x4B,0x83,0x71,0xA2,0xD6,0xEA,0xFF,0x3D, - 0xE3,0x36,0x54,0x07,0xFE,0xDC,0x7C,0xDB,0x89,0x1F,0x79,0xB2,0xD7,0xEB,0x6C,0xB4,0x87,0x89,0x4D,0x1D, - 0xEB,0x18,0x34,0xE6,0x47,0x16,0x88,0x7D,0xD2,0x70,0xEC,0x90,0xA6,0x83,0x28,0xF6,0x3B,0xBE,0x7A,0xF6, - 0x4D,0x16,0x98,0x32,0x72,0xEA,0x38,0x79,0x80,0xCE,0xBF,0xA5,0x92,0x1B,0x21,0x6E,0xEA,0x3B,0x55,0x05, - 0x95,0x06,0x18,0x64,0x81,0xAF,0x6F,0x09,0x1A,0xC5,0xC2,0x9C,0x48,0x85,0x69,0xD7,0xE3,0xCF,0x74,0x30, - 0x6E,0xCA,0x62,0xFF,0xA3,0x0A,0x9E,0xAF,0x99,0xAA,0x77,0xAC,0xF2,0xF2,0xEA,0x4A,0x9F,0x28,0xD3,0xE5, - 0x76,0xD6,0x42,0x3E,0xBC,0x8B,0xC5,0xF9,0xDF,0x0E,0x38,0x08,0x65,0xB9,0xFD,0xE0,0xC8,0xA9,0x5A,0xC0, - 0x7B,0x61,0x8B,0xD5,0x70,0xE7,0xFD,0xE8,0xE3,0x56,0xE8,0xEE,0x22,0xCB,0x6B,0x1E,0xFE,0x2B,0xB3,0x5D, - 0x07,0xED,0x3F,0xA2,0x83,0xC1,0x49,0xCB,0x8D,0x93,0x36,0xEF,0x4F,0x1C,0x5A,0x42,0xDB,0x4D,0xD2,0xEA, - 0x0F,0xC2,0x55,0xDA,0x3D,0xF1,0x48,0xFE,0x45,0x1E,0xFE,0x1E,0x11,0x60,0x75,0xE3,0x29,0x9C,0x1C,0xCB, - 0xBC,0x8B,0xCC,0x9A,0x6D,0xAE,0xAA,0x71,0x3B,0x67,0xFB,0xD9,0x61,0xE7,0x2B,0xFF,0xFB,0xB4,0xC6,0xFF, - 0xC5,0x8D,0x04,0x97,0x0B,0x22,0xDF,0xA5,0x85,0x6F,0x5B,0x6E,0x78,0xFD,0xC9,0xD8,0x62,0xF3,0x42,0x1F, - 0xD5,0x26,0x64,0x13,0x23,0xCA,0xBB,0x36,0x77,0xE1,0x65,0xA7,0xB0,0xBD,0x2C,0x4B,0x71,0xB0,0x89,0x18, - 0x51,0x04,0x32,0xB7,0x17,0x1D,0xFB,0x27,0xC6,0x13,0xBD,0xA2,0x8B,0x72,0x53,0x54,0x58,0x15,0xF4,0xBA, - 0x10,0x4C,0xF9,0xED,0xEB,0xCD,0x62,0xA6,0xD1,0x07,0x5C,0xF2,0xCB,0x3B,0x10,0x35,0xBA,0xF4,0x0C,0x60, - 0x67,0xA3,0x92,0x96,0xAA,0xFB,0x12,0xD5,0x21,0xD7,0x33,0xBB,0x44,0xB1,0x44,0x22,0xB8,0xDA,0xF4,0xFF, - 0x96,0xEE,0xC5,0xB1,0xC4,0x51,0xA5,0xA2,0xC1,0xB2,0x0D,0x61,0xE7,0xB4,0xC7,0x20,0x34,0xC6,0x03,0xAC, - 0xA1,0xB5,0xB2,0xAF,0x6B,0xF3,0x45,0x23,0x19,0xD8,0x5A,0x11,0x70,0x56,0x6F,0xF4,0xEE,0xD8,0x0A,0xFD, - 0x44,0x4E,0x4B,0x51,0xB1,0xA5,0xE7,0x2C,0xFC,0xB2,0xAE,0x5D,0x09,0x82,0x93,0xD9,0xF7,0x08,0x41,0xD1, - 0x6B,0xFA,0x12,0x21,0x7E,0x59,0x2F,0x9A,0x8C,0x5B,0xD9,0xB6,0x87,0x9A,0x98,0x2F,0xC6,0xA9,0x8F,0x50, - 0x15,0xE9,0xC3,0xFD,0x5A,0x8B,0xE7,0x17,0x60,0x86,0xA4,0x9F,0x62,0xD9,0x85,0x4C,0xCF,0xFF,0x34,0x4E, - 0x20,0xF0,0x45,0xC9,0x9F,0xC3,0xB6,0x03,0x37,0x9E,0x66,0xA8,0x16,0xBD,0x16,0xFD,0xD2,0x92,0x6A,0x5C, - 0x3A,0xC7,0xBA,0x98,0x2E,0xDC,0x01,0x01,0x88,0x48,0x07,0x7D,0x13,0x62,0x23,0x4A,0xB0,0x34,0xAC,0xDB, - 0x6C,0xD6,0xDA,0x90,0x67,0x75,0x0F,0x6D,0x16,0xDD,0x97,0xB0,0xFC,0x5F,0x07,0x99,0xAE,0xD7,0xB0,0x8D, - 0x0C,0x50,0x56,0x7A,0x8D,0xA6,0xA0,0x8E,0x13,0xC0,0xE7,0xE7,0x42,0xB5,0xB6,0x46,0xAF,0x0C,0xCF,0x28, - 0x07,0x02,0x48,0xE5,0x27,0x60,0xBB,0xA6,0x9D,0xA7,0x27,0xF3,0x93,0x7E,0x4E,0xC1,0xA2,0x89,0x5A,0xB2, - 0xEF,0x00,0x15,0x66,0x41,0x4C,0xF3,0x2C,0xD1,0xA2,0xD9,0x73,0xB8,0x08,0x65,0x95,0x6D,0x03,0x23,0xC2, - 0x0B,0xE8,0x91,0x21,0x53,0x2B,0xF8,0x87,0xC0,0x8D,0x50,0x82,0x54,0x1F,0x2B,0x68,0xE7,0xFB,0x7B,0x3B, - 0xAB,0x98,0x95,0x52,0xFA,0x1E,0x37,0xDD,0xBE,0x67,0x98,0x11,0xB1,0x91,0x86,0x47,0x5F,0xCE,0x09,0x50, - 0x84,0xFD,0x45,0x22,0xFA,0x2B,0xE6,0x91,0x36,0x2D,0x72,0x53,0x0E,0x83,0x5D,0x37,0xA2,0x78,0xC3,0x34, - 0x32,0x88,0x85,0x6E,0xA0,0x5C,0xEB,0x74,0x56,0x71,0x96,0x27,0x62,0xA8,0x2E,0x4E,0x9B,0xD5,0x70,0x2C, - 0x9D,0xD5,0x0F,0x4E,0x24,0x67,0xCA,0xB8,0x93,0x94,0xB0,0xA0,0xF2,0xEF,0xB9,0xA6,0x95,0xBF,0xCA,0x4B, - 0x05,0x2E,0x55,0xF9,0x4B,0x7B,0x91,0x09,0x73,0xCC,0xB8,0x76,0x31,0xB6,0x03,0x6B,0x13,0x77,0x73,0x9D, - 0xAB,0x78,0xD5,0x8E,0x9D,0x80,0x65,0xA2,0xA2,0xDD,0xF5,0x4F,0x54,0x1D,0x9D,0x48,0x2E,0x4E,0x5F,0x6B, - 0xBB,0x83,0x75,0x0E,0xB9,0x5C,0x73,0x76,0xC6,0xD8,0xDA,0xA5,0x0F,0x4C,0x90,0xA3,0xB8,0x2B,0xE9,0x89, - 0x4D,0x64,0xBB,0xDC,0x8D,0xD2,0x47,0x3A,0xF5,0x2E,0xD8,0xCF,0x1A,0x46,0xEB,0x92,0x36,0x85,0x8D,0x62, - 0xDE,0x20,0xE6,0x26,0x16,0x53,0xEB,0x0C,0x3A,0xA5,0x28,0x67,0xA0,0xBB,0x04,0x7D,0x58,0x61,0x64,0x82, - 0x00,0x1D,0x21,0x9F,0x5B,0x44,0xCB,0xA0,0xE3,0x5E,0xAE,0x2E,0xC3,0x74,0x56,0xB0,0x59,0xBE,0x6F,0x6F, - 0x4E,0x31,0x5F,0x91,0x16,0xB6,0xCC,0x67,0x29,0xFC,0xFA,0x7F,0xDB,0x32,0x05,0x43,0x22,0x31,0xF5,0x9E, - 0xC4,0x51,0x11,0x21,0xAC,0x38,0xAD,0xE3,0xC3,0x17,0xE5,0x57,0x37,0xC6,0xC2,0x30,0xD2,0xF2,0x31,0x2A, - 0x0E,0xFE,0x44,0x9E,0x97,0xC8,0x6F,0x9B,0x8F,0xC8,0xFB,0x8F,0xBF,0x80,0x74,0x96,0x10,0x70,0x4B,0x46, - 0xFE,0xA8,0xB2,0xE7,0x58,0xB0,0x6A,0xF2,0x08,0xD0,0xC4,0xF0,0xFE,0x34,0xEA,0xAE,0x7F,0x54,0x66,0xF3, - 0x6E,0xD3,0xE7,0xFE,0x0E,0xFD,0xAB,0xE2,0x53,0xAF,0xE2,0xAE,0x2C,0xB1,0x4D,0x93,0x21,0x93,0x5F,0xB7, - 0x71,0xF3,0x62,0x15,0x52,0xAC,0x78,0x8F,0x89,0xE1,0x16,0xD7,0xC5,0x84,0xAE,0x98,0x97,0x1E,0x75,0x52, - 0x99,0xCE,0xF5,0x81,0xD3,0xB9,0xF6,0x1C,0xD9,0xC6,0x4E,0x28,0x4B,0x82,0x0E,0x1C,0x33,0xCA,0x5F,0xB9, - 0x55,0xCB,0xB8,0x5D,0xB4,0x91,0x44,0x2D,0xA5,0xED,0xE8,0xDF,0x2A,0xE5,0xB2,0x1B,0x29,0xBA,0xEF,0xD9, - 0x39,0x36,0xE9,0x44,0x85,0x40,0xFF,0xBF,0xF8,0x76,0xDA,0x88,0x26,0xE8,0x4F,0xD6,0xF2,0x44,0x00,0xF2, - 0xA2,0x9F,0xF6,0x11,0x58,0xC7,0x28,0xBC,0x28,0x5D,0x26,0x56,0x19,0xEB,0xB6,0x72,0x49,0x8B,0xB7,0x83, - 0x2E,0x74,0xDB,0xED,0x57,0x72,0xE0,0x3C,0x26,0x5E,0x70,0x18,0x76,0x9E,0xD5,0x17,0xFC,0x15,0xE8,0xBD, - 0x8F,0x19,0xB0,0x20,0xBB,0x31,0x20,0x04,0xEB,0x51,0x5F,0xBA,0xDF,0x11,0x18,0xEC,0xA8,0x8D,0xC2,0x16, - 0xF5,0x0F,0xB0,0x7C,0xF1,0x1C,0x4D,0x54,0xC2,0xBF,0xCB,0xD2,0x1D,0x5D,0xCF,0x1E,0xFE,0x37,0x8A,0x2D, - 0xA9,0x6E,0xD9,0xDC,0xA4,0xE2,0xDC,0x44,0x5A,0xDF,0x42,0xF4,0x4A,0x09,0x9E,0x4C,0x19,0x16,0x8B,0xAC, - 0x6F,0x6F,0x90,0x4D,0x58,0xFE,0x02,0x6D,0x40,0x5F,0x0F,0xC2,0x25,0x83,0x07,0xA2,0x73,0x4D,0xDB,0x0C, - 0xEF,0x6D,0x5F,0xA4,0x99,0xE5,0xAA,0x46,0xC9,0xC6,0x10,0x59,0x72,0xE2,0x6F,0xC4,0xFA,0xEB,0x44,0x14, - 0x94,0x71,0x10,0x6C,0x81,0x31,0x49,0x16,0x53,0x89,0x1E,0xBB,0x86,0xC4,0x0D,0xC7,0x6A,0x86,0xC6,0x62, - 0x4B,0xCA,0xD1,0xD7,0x77,0x6F,0x0F,0x22,0x86,0x07,0x0B,0x48,0x59,0x2A,0x9F,0x82,0x0D,0x87,0x69,0x8A, - 0xC7,0x15,0x8D,0x51,0xFD,0x34,0x9D,0x51,0xC8,0x6D,0x9A,0xA0,0x84,0x20,0x72,0x57,0xC1,0xAA,0x15,0x45, - 0x29,0x92,0x2A,0xEF,0xFD,0xE9,0x64,0x35,0x41,0x87,0x5F,0xD1,0xBC,0xBF,0x20,0x09,0x19,0x76,0x04,0x38, - 0xF7,0x0F,0x10,0x38,0xDD,0x7E,0x34,0xEB,0x3D,0x86,0xBA,0xEB,0x9C,0xC4,0x03,0x95,0x09,0x3F,0x5A,0x9B, - 0x1B,0x74,0x42,0x4D,0x47,0xD4,0xC5,0x3B,0x8E,0x9C,0x9C,0xDD,0x75,0x2A,0x2C,0xF8,0x4A,0x58,0xA8,0xC6, - 0x22,0x43,0x22,0x5E,0xD3,0x04,0x0D,0xAF,0xC5,0xBD,0x1D,0x76,0xAE,0x62,0x84,0x79,0xFE,0x32,0xDC,0x0C, - 0x44,0x07,0x63,0x55,0x48,0x1A,0x90,0x70,0x10,0x65,0x53,0x1D,0xBC,0xEA,0x55,0x2E,0x74,0x14,0x95,0xC5, - 0x4A,0xF2,0x18,0x25,0x7A,0x13,0xA1,0xDF,0xA3,0x40,0x1C,0xBE,0x07,0x52,0x5D,0xA1,0x95,0x3A,0x22,0xC4, - 0x05,0xF0,0xAE,0xBE,0x57,0x01,0x24,0x12,0xD8,0xFF,0xD4,0x68,0x88,0x49,0xBC,0xE7,0x9F,0xCA,0x39,0x97, - 0xF7,0xD5,0x9A,0xC4,0x66,0xD1,0x0A,0x68,0x01,0x1A,0x27,0x5C,0x62,0x41,0x75,0x5F,0x12,0xF3,0x4F,0x7B, - 0xA6,0xC3,0x52,0x15,0xB0,0xB7,0x28,0xD5,0x1A,0xC8,0x36,0xD5,0xB4,0xF7,0x44,0x9B,0x87,0x18,0x8C,0x40, - 0xCA,0xF5,0x1C,0x64,0x9A,0x95,0x64,0x0E,0xA8,0xB9,0xEC,0x12,0x21,0x8E,0x40,0x94,0xB4,0x61,0xCD,0x8D, - 0x06,0xF5,0x66,0xB1,0x79,0x2A,0x2F,0xC6,0x29,0x10,0x09,0x47,0x4A,0x96,0xD2,0x47,0xE0,0x2D,0xB7,0x07, - 0xE4,0x5B,0x9A,0x23,0xE9,0xD8,0x0F,0xC8,0x79,0x3A,0xF6,0x93,0xE1,0x7A,0xEF,0x09,0x08,0x2A,0x7F,0xA6, - 0xD1,0xD7,0x1D,0x6C,0x90,0x45,0x27,0xCC,0x10,0x27,0xCE,0x2A,0x07,0x25,0xF6,0x4E,0x52,0x19,0xE4,0x23, - 0xBF,0xF1,0x00,0x53,0xB3,0x04,0xDE,0xBD,0x28,0xF4,0x58,0x76,0xA4,0xDA,0xDF,0xF4,0xB2,0xD8,0x0D,0x0E, - 0x1B,0xB6,0x8D,0x47,0xD4,0xB5,0xEF,0xFA,0xA6,0x9F,0x32,0x7D,0x3F,0xBF,0x25,0xB9,0x5E,0x50,0xA7,0xA6, - 0xCE,0xDA,0x67,0x3A,0x34,0xD3,0x98,0x5D,0x55,0x3A,0xA6,0x8A,0x26,0x27,0xB4,0x15,0x78,0x1C,0x37,0x88, - 0x4C,0x1F,0x09,0x2F,0xE5,0xAD,0xD6,0x6E,0x8E,0x72,0x3A,0x01,0x3F,0x42,0x66,0x3B,0xFC,0xD1,0x67,0x3C, - 0x68,0x11,0xF7,0x6F,0xC7,0xF4,0x90,0x9C,0x9B,0x92,0x97,0x33,0x33,0xD2,0x91,0x45,0x6A,0x22,0xE2,0x08, - 0x9E,0xB3,0x3F,0xEA,0x25,0xBE,0xDD,0x1D,0xE1,0xBF,0x7F,0x0C,0xF5,0x9F,0xBC,0x62,0xC3,0x94,0xBA,0xF4, - 0xF3,0xE8,0xC8,0xED,0x53,0x8C,0x84,0x41,0x9C,0x43,0x66,0xA3,0x2A,0xC7,0xFA,0x30,0x85,0xA4,0xDE,0xE8, - 0xF7,0x07,0x41,0xF8,0xC5,0x60,0xF3,0x3E,0x0E,0xCF,0x11,0xD6,0x1A,0xC9,0x77,0x39,0x68,0x12,0xF6,0x66, - 0xFB,0x5C,0x99,0xC2,0x17,0xEC,0x3E,0x02,0xBA,0xC6,0x9C,0xC4,0x20,0xC5,0x42,0xAC,0x52,0x69,0x28,0x3F, - 0xB7,0xB8,0x2F,0x17,0xD6,0x92,0x8C,0x0E,0x0D,0x1B,0x3F,0x41,0xB2,0xA2,0x50,0xD5,0x20,0x65,0xD8,0x8A, - 0x77,0x18,0x18,0x54,0x57,0x6A,0xB3,0x6B,0xD4,0x20,0x91,0x18,0xC9,0x40,0x2E,0x16,0x5E,0xE0,0x34,0xAE, - 0xE0,0xA3,0xCB,0x48,0x3F,0x2A,0x21,0x55,0x16,0xBA,0xCF,0x73,0x2C,0xEA,0xAE,0xE0,0xDC,0xCE,0x56,0x9F, - 0xB9,0x77,0xF5,0xD9,0x92,0x58,0x12,0xDD,0xB8,0x28,0x1C,0x30,0xE2,0x4D,0x59,0xE2,0x1F,0x01,0xB1,0x67, - 0xB0,0xB5,0x3F,0x27,0x32,0x1D,0x4B,0x9C,0xEB,0x67,0x3E,0x30,0x67,0x77,0x6D,0xB3,0x1D,0xD7,0x3B,0xA7, - 0x4C,0xFE,0x31,0xA9,0x57,0xA4,0x05,0xE2,0x16,0x9D,0xB8,0x0F,0x15,0xAE,0xDA,0xFB,0x4B,0x68,0x51,0xCC, - 0x28,0xF9,0xB0,0x48,0x0E,0x37,0xF9,0x98,0xE6,0x9D,0x84,0x6B,0xAD,0x00,0xF3,0xDC,0x21,0xD4,0x93,0x4C, - 0xBC,0x29,0xA5,0x88,0x2C,0x9C,0x92,0x7D,0x7F,0xB1,0x83,0xE8,0xB0,0xB1,0x76,0xB9,0x82,0xA3,0x93,0xC8, - 0x9D,0x43,0x6C,0xF6,0x2F,0xF8,0xDB,0x02,0x76,0xB3,0x4F,0xD9,0xEC,0x81,0x9B,0xD9,0x2B,0x42,0xE0,0x23, - 0x06,0xD2,0xB3,0x81,0xAD,0x1C,0x85,0xE2,0xCF,0x72,0x26,0x90,0xE9,0xFF,0x05,0xC6,0x11,0x50,0xEA,0xE2, - 0xCA,0xB7,0x34,0x6B,0xB3,0x32,0xDC,0x10,0xD4,0x13,0xB8,0x98,0xD2,0x33,0x6D,0x9F,0x66,0xE6,0xD8,0x42, - 0x83,0xE0,0xB5,0xD3,0x82,0xD5,0xCD,0x3D,0x11,0x74,0x53,0x03,0xA5,0xBC,0x88,0x77,0x82,0xC1,0x49,0xAB, - 0x10,0x5C,0x5D,0x98,0xD2,0x03,0xD3,0x33,0xA6,0x9F,0xFE,0x74,0x25,0x9B,0xAB,0x93,0xC1,0x07,0x74,0x14, - 0xFA,0xA7,0x73,0x32,0x3F,0xE5,0x96,0xD5,0xBD,0xCA,0x08,0xAC,0xC2,0x0A,0x52,0xF4,0xBB,0x9C,0x70,0x7D, - 0x49,0x72,0x61,0xB7,0x3C,0xE9,0xAE,0xC5,0x1B,0x14,0x62,0xE3,0x05,0xDD,0xBA,0xD1,0xAB,0xC7,0xF7,0x2E, - 0x4A,0x5B,0xE9,0x93,0x5C,0xAA,0xD4,0xDA,0x89,0x22,0xB4,0x7B,0xC4,0xB3,0xD6,0x1C,0x68,0x75,0xA2,0xD3, - 0xCB,0xA5,0x56,0x51,0x1D,0xF5,0xA6,0x12,0xF9,0x8D,0xEE,0x3C,0x61,0xB4,0x0C,0x3F,0x82,0x1D,0x1E,0xBD, - 0x90,0x82,0x31,0x81,0x43,0x9F,0xE7,0x2D,0xE4,0x35,0x49,0x4B,0xBC,0xDF,0xF7,0xAF,0x8C,0x75,0x28,0x82, - 0xC2,0x6F,0xF7,0x9F,0xF1,0xC6,0x25,0x09,0x03,0x19,0x9B,0x39,0xD0,0x51,0x66,0xBE,0x7A,0x18,0xA0,0x20, - 0x39,0xDE,0x40,0x8A,0x6C,0x7F,0x85,0xD7,0x04,0xE9,0xE5,0xA7,0x69,0x14,0x8E,0xE5,0x3D,0x66,0xE3,0x7C, - 0x49,0x01,0x32,0x7C,0x87,0x5D,0x68,0xED,0x7F,0xA3,0x07,0x21,0x1C,0xB5,0x74,0x87,0x49,0x3B,0x04,0xE9, - 0x8B,0x5A,0x4A,0xC9,0x88,0xAE,0x65,0x59,0x8C,0x78,0x9F,0x79,0x4B,0x52,0x73,0xBF,0x78,0xAB,0x84,0x60, - 0x25,0x20,0xA8,0x03,0xC9,0x1D,0x4E,0x11,0x2F,0x45,0x53,0xDD,0x2B,0xE0,0x8F,0x03,0x35,0x85,0x7A,0x22, - 0xF2,0xB1,0x1B,0x3D,0x9D,0x6A,0x28,0xB4,0xD5,0xE9,0x96,0x2B,0x82,0x79,0x0E,0xEF,0x64,0x0F,0xB1,0x65, - 0x56,0x96,0xD9,0xE5,0x52,0x17,0x15,0x91,0x6B,0xB3,0x97,0xA2,0xF1,0x6C,0x9C,0x37,0x42,0xD5,0x81,0xC5, - 0xF4,0x33,0x53,0x32,0xF7,0xEA,0xB9,0x69,0xF3,0xCA,0x0F,0xE6,0x39,0x14,0x5F,0x42,0x82,0x77,0x53,0x41, - 0x6A,0x8A,0x37,0x57,0x11,0x7C,0x88,0x4E,0x41,0xE6,0xDF,0x94,0xB7,0x44,0x07,0x32,0x85,0x37,0x83,0x4F, - 0x97,0x16,0x5A,0x1C,0x17,0x4D,0x56,0xDE,0x3F,0x0F,0x5B,0xBF,0x87,0x26,0xD3,0xD3,0xD9,0xF6,0xE3,0x11, - 0x38,0x4C,0xC1,0x88,0x3E,0xE8,0x78,0xF5,0xAF,0x93,0x22,0x67,0xE1,0xE6,0x62,0xB4,0xB7,0x33,0x72,0xFE, - 0x23,0xEE,0x14,0xFF,0x80,0xEB,0xF0,0x1B,0xBE,0xEB,0x8D,0x1E,0x95,0x98,0x0B,0x5E,0x51,0x62,0x80,0x7D, - 0xAD,0x2A,0xA4,0x8D,0x99,0x50,0x33,0xE9,0x4F,0x8C,0x93,0x6F,0x7D,0x63,0x53,0x3F,0x02,0x89,0x6F,0x4F, - 0x38,0x74,0x84,0xCA,0x6E,0x1B,0x44,0xDD,0x5F,0xCF,0xFA,0xB5,0xBB,0x2F,0x22,0xA2,0x90,0xE2,0x54,0x56, - 0x48,0xCF,0x26,0x90,0xA3,0x6D,0xD7,0x9D,0xC5,0xE4,0x24,0x21,0x77,0xA0,0x87,0x54,0xEC,0x50,0xA8,0x48, - 0xB4,0x3E,0x1B,0xB5,0x32,0xC7,0xB3,0x6B,0x98,0x75,0xC4,0xEF,0xE4,0xFD,0xE2,0x9C,0xA0,0x33,0x23,0xCB, - 0xEC,0x9E,0xF9,0x6C,0x74,0xEB,0x05,0x99,0x2F,0xBE,0xA1,0x3D,0xA3,0x40,0x65,0x44,0xB6,0x93,0x5C,0x02, - 0x3A,0x17,0x64,0xCC,0x62,0xF3,0x94,0xD4,0x50,0xB2,0x05,0xA4,0xC7,0x81,0x24,0x91,0x56,0x31,0x03,0x50, - 0x06,0xA4,0x17,0xF1,0x7B,0x2D,0xC6,0x78,0x35,0xEF,0x65,0xEA,0xD1,0xB4,0xD7,0xD9,0x47,0xB7,0xE5,0x2E, - 0xC7,0x12,0x9F,0x20,0x15,0xFB,0xD5,0xB3,0x3A,0xB1,0xAA,0x59,0x40,0x0C,0x79,0x7D,0x4E,0x0C,0x04,0x82, - 0x08,0x19,0xDA,0x2A,0x4E,0x35,0x8D,0xC5,0xC7,0xAB,0x16,0xF9,0xB8,0x5F,0xA0,0xB0,0x64,0x6B,0xEB,0xD4, - 0x9A,0xF4,0x28,0x64,0xD2,0xDA,0x7C,0x84,0x9C,0x30,0x1D,0xE7,0x24,0xDE,0xA5,0x43,0x81,0x7A,0xCA,0xD2, - 0x47,0x94,0x93,0xE3,0x9D,0x70,0x15,0x51,0xA2,0xFC,0x4A,0xD1,0x63,0xD3,0xC9,0x9C,0x44,0x5C,0x83,0xC0, - 0x9C,0x52,0x94,0xB0,0x3C,0x5D,0x11,0x8F,0xB1,0xB4,0x6C,0x63,0x10,0xC7,0xEC,0x5A,0x0C,0xBA,0x46,0x1C, - 0xD1,0xD8,0x0A,0x8D,0xB1,0x7F,0x68,0xA1,0x0B,0xAD,0x7E,0x43,0x29,0xA5,0x10,0x76,0xAC,0x94,0xCF,0x90, - 0x38,0x6E,0x8C,0x4D,0xC8,0x2E,0xE7,0x9D,0x5D,0x45,0xC3,0x1B,0x51,0xBB,0x89,0x99,0x73,0x06,0xE9,0x53, - 0x1D,0x16,0x00,0xF1,0xFB,0xF8,0x3C,0xCB,0x8D,0x9A,0x5B,0xF7,0xC1,0x31,0x2B,0xD3,0x68,0xDF,0x77,0x1D, - 0x9E,0xB0,0x0E,0x9E,0x16,0x92,0x4E,0x41,0xD6,0xD9,0x33,0xC7,0xDC,0x00,0xD9,0x0F,0xE3,0xEF,0xEF,0xB3, - 0x4F,0x91,0xB4,0x31,0x31,0x13,0xA7,0x89,0x19,0x55,0x96,0xF5,0x2E,0x4A,0xDB,0x5F,0xA0,0xA9,0x0C,0x9F, - 0xEF,0xC2,0x87,0xDF,0xDC,0xAA,0x17,0x75,0xDD,0x29,0x7F,0x3F,0xFE,0xD5,0x63,0xFF,0x6F,0x20,0x05,0xC0, - 0x10,0x5B,0x5E,0x6B,0x89,0x9D,0x7B,0xD2,0x82,0x47,0x18,0xD3,0x13,0xD4,0xCF,0x02,0xBE,0x94,0xE6,0x32, - 0x3A,0x05,0xF2,0x3A,0x7A,0x97,0xE9,0xC7,0x16,0xD7,0x03,0x47,0xAB,0x4D,0xBE,0x5E,0x27,0x3F,0xBE,0x35, - 0x04,0x00,0x8D,0x52,0x10,0x2D,0x61,0x33,0xD9,0xEE,0x99,0x46,0x55,0x9C,0x44,0xA2,0x80,0x00,0x40,0xB4, - 0x81,0x22,0x70,0x20,0x21,0xBB,0x3C,0x40,0xAF,0xE6,0x88,0x09,0x05,0x6E,0xB0,0xA8,0x93,0xDE,0x00,0xFD, - 0xC1,0x41,0x1C,0xE4,0x72,0x57,0x86,0xB1,0xFF,0x44,0xE1,0xF5,0xF1,0x73,0x29,0xE5,0xC4,0x37,0xC9,0xE5, - 0x90,0x6F,0x20,0xD3,0x6D,0xE7,0x99,0xAC,0x9F,0xBC,0x47,0x13,0xE2,0xE5,0x9B,0x15,0xC9,0xE6,0xAA,0xB9, - 0x8D,0x8B,0xBD,0x5E,0x5B,0x27,0x07,0x9A,0x40,0xF8,0x7E,0xB7,0x59,0xC8,0x3B,0xF0,0xB5,0xC6,0xD4,0x87, - 0x09,0xFD,0xDA,0xD5,0x90,0x4F,0x65,0x18,0x26,0x96,0xAB,0xAC,0x8E,0x82,0x89,0x05,0x73,0x8C,0xCC,0x2B, - 0xBF,0x0A,0xAD,0x2B,0x2F,0xD7,0x52,0x4A,0xEA,0x4B,0x39,0x02,0x75,0x80,0x13,0x8E,0xAA,0x6B,0xA1,0xC3, - 0x22,0x6D,0xF9,0xAA,0xA6,0xF1,0xC2,0xC8,0x35,0x32,0x32,0x6B,0x7E,0x41,0xD0,0x8C,0x48,0x2C,0x72,0x24, - 0x28,0x6D,0xF0,0xC2,0x99,0x29,0x9A,0x8D,0x58,0x47,0x1A,0x78,0x7C,0xB2,0x3B,0xCB,0x6C,0xC7,0x6F,0x3F, - 0x44,0xD1,0x49,0x68,0xEB,0xEE,0x89,0x71,0xFA,0x6D,0xFF,0x3B,0xF6,0x06,0x19,0xBF,0x37,0xD2,0x5A,0x0B, - 0x49,0x6B,0x8B,0xDD,0x8B,0x2D,0xBB,0x66,0x04,0x0B,0xBA,0x6D,0x11,0xF2,0xD1,0x3D,0x9D,0x56,0xAB,0xFA, - 0x28,0x74,0x6C,0x1B,0x22,0x1E,0xDE,0x6B,0xC6,0x4C,0x46,0xB0,0x1D,0xFE,0x0C,0x36,0x8F,0x7E,0x51,0xE7, - 0x2D,0x70,0x97,0x7A,0x4F,0xBF,0xC8,0xCB,0x6E,0x8D,0x7C,0xFA,0x05,0x8E,0xD2,0x90,0x5C,0x7F,0x1A,0x66, - 0x35,0x6E,0xBD,0xC3,0x83,0x57,0xC7,0xB4,0x52,0x75,0x3C,0x20,0x66,0x12,0x04,0x39,0x60,0x76,0x34,0x57, - 0x6B,0x59,0xAC,0x66,0x7B,0x10,0x34,0x12,0xA0,0x1B,0x05,0x92,0x29,0x33,0xAB,0x8E,0xC0,0x30,0xB4,0x36, - 0xF0,0x31,0xB3,0xD8,0x03,0x96,0x01,0x8B,0xB4,0x54,0xB9,0x7E,0xC6,0x50,0xED,0xB5,0xFA,0x79,0xED,0x13, - 0x2F,0x19,0xED,0x48,0xD0,0xBF,0x25,0xD5,0x94,0xA1,0xB5,0xF2,0x70,0x78,0x60,0xFD,0x2B,0x39,0x55,0x7F, - 0xB4,0x35,0x68,0xAF,0x9D,0x57,0x61,0x5E,0x1B,0xE6,0xB6,0x66,0x4A,0x3A,0x55,0xF4,0x84,0x98,0xF2,0x38, - 0x95,0x79,0xA0,0x6D,0xDA,0x1C,0x5D,0x29,0xD4,0x05,0x78,0xFF,0x43,0x78,0xA8,0x49,0x5D,0x1B,0xEF,0x2F, - 0x06,0xB5,0x98,0x73,0x0C,0x77,0xD2,0x6E,0x3D,0xB6,0xB3,0xFB,0x6A,0xF0,0xA1,0x69,0x5A,0x06,0x7E,0x6C, - 0xA8,0x1F,0xBE,0x31,0x3A,0xE7,0x89,0x3A,0x83,0xB5,0xBE,0x8E,0x5C,0xC0,0x36,0x5A,0x09,0xAF,0x22,0x34, - 0x37,0x70,0x07,0x63,0x8E,0xA2,0xF5,0x78,0x00,0x36,0x80,0xAB,0xEB,0x5E,0x07,0xC9,0x9F,0xDF,0xAA,0x05, - 0xEA,0x1F,0x68,0xB6,0x2B,0xA3,0x15,0xD8,0x08,0x19,0xAD,0xA5,0xA9,0x72,0x65,0x07,0x88,0xE0,0x72,0x82, - 0x66,0x23,0xD8,0x0A,0x67,0x9A,0x96,0x00,0x7F,0x25,0x48,0xCA,0x5E,0x6D,0x46,0x35,0xF5,0x7F,0xD2,0xFA, - 0xCF,0x4C,0x8B,0x19,0xCD,0x0A,0x1C,0x72,0x26,0xF2,0xFB,0xB4,0xBB,0xE3,0xD9,0x71,0xB7,0x47,0xA3,0x41, - 0x06,0xF6,0x24,0xC5,0xE0,0xC4,0x8E,0x60,0x06,0xE8,0x70,0x38,0x62,0x2E,0x0C,0x8F,0x12,0xB5,0x41,0x14, - 0xA6,0xE0,0x81,0x4E,0xF4,0xA1,0xE4,0xB3,0x2D,0xA4,0x98,0xBA,0x96,0x5F,0xE1,0x80,0x42,0xE4,0x31,0x11, - 0x52,0x4D,0xCC,0x10,0x83,0x89,0xB8,0xBB,0x07,0xE5,0x64,0xB3,0xC7,0xFB,0x38,0x8A,0x6C,0xA4,0xF1,0x01, - 0x27,0x8A,0xB0,0xBF,0x16,0x1D,0x4F,0x9E,0xCE,0x84,0xE6,0x63,0xE5,0x8D,0x01,0xA2,0x04,0x97,0xB0,0x57, - 0x91,0xE5,0x20,0xE0,0x22,0x38,0xD1,0x15,0x56,0xE8,0xBC,0x3A,0xFB,0x77,0xF2,0x90,0xE7,0x53,0x4A,0x0D, - 0x0C,0xC7,0xE8,0xEE,0x24,0xAA,0x18,0xE5,0x3E,0xC9,0x1D,0x3A,0x80,0x54,0x60,0x7A,0xEE,0xAC,0x16,0xA1, - 0x5E,0x29,0x1D,0x7F,0x50,0x85,0xA3,0xCD,0x1F,0xEC,0x09,0x0C,0x6F,0xAF,0x7A,0xC0,0x7D,0x75,0x15,0xF9, - 0x2A,0x9B,0x06,0x51,0x68,0xF7,0x61,0xBB,0x6E,0x30,0x14,0x45,0x00,0x37,0x3B,0x6B,0xAB,0x0C,0xE4,0xA6, - 0x00,0xE3,0x9E,0x19,0x6F,0x3A,0xDA,0x69,0xDF,0xA8,0x52,0x4A,0xAC,0x8B,0x65,0xB3,0x2D,0x12,0xB5,0xF0, - 0x6B,0xCB,0xBB,0xFA,0x20,0x96,0x9B,0xC9,0x60,0xFE,0xE2,0xA9,0x98,0xCC,0x29,0x69,0x7D,0x67,0xDB,0xAD, - 0xB5,0xE0,0x9D,0x47,0x2E,0x0F,0x34,0x23,0xE8,0xC8,0x8D,0x2B,0x6E,0x30,0x9B,0x3F,0x71,0x62,0xC7,0x7C, - 0x80,0x7D,0x75,0x75,0xB8,0xBD,0xD6,0xA2,0xBC,0x36,0x9E,0x03,0x5A,0x7A,0xBB,0x61,0xA1,0x1C,0x77,0xFE, - 0xA8,0x4C,0x42,0x20,0xB1,0x14,0x74,0xE4,0x5B,0x7B,0xE1,0x78,0xC7,0x98,0x5A,0x7E,0xB0,0xF2,0x6B,0x30, - 0xF8,0x5F,0x9D,0xFE,0x03,0x5F,0x7F,0x18,0x4E,0xF7,0x00,0x13,0xFA,0xCF,0x9A,0x84,0x8E,0x76,0x85,0xEB, - 0x0E,0x57,0x34,0x5F,0x87,0x1C,0x86,0xC7,0x37,0x94,0xE7,0x66,0x71,0x29,0x4F,0xA8,0x70,0x4F,0xAF,0xA0, - 0x84,0x93,0x53,0xA6,0x3F,0x6D,0xEF,0x76,0x70,0xAA,0x03,0x88,0xE1,0x2A,0x61,0x21,0x24,0x95,0x75,0x43, - 0xC9,0xE3,0xCA,0x01,0x85,0xDC,0x2D,0xA0,0x0B,0x80,0xE5,0x07,0xC4,0xF7,0xF5,0xD3,0x3A,0xF6,0x47,0x11, - 0x84,0x27,0x51,0x88,0x2D,0x2A,0x19,0x68,0x70,0x9C,0x0F,0xF1,0xA9,0xE5,0xB2,0x5B,0x8C,0xF8,0xFC,0x62, - 0xC0,0x92,0x77,0x13,0x88,0x30,0xEC,0x03,0x0E,0xC8,0x9B,0xA1,0x06,0xAD,0xE7,0x99,0x9A,0xFF,0x4A,0xAF, - 0x70,0xAB,0x78,0x8F,0x4B,0xB9,0x9F,0x21,0x78,0x4E,0x37,0x47,0x90,0x77,0x3A,0xFB,0xC1,0x36,0x17,0xB2, - 0x42,0xF9,0x7E,0x7D,0x7F,0xD8,0x49,0x3D,0x5C,0x73,0x1E,0x4E,0x59,0x89,0x26,0x33,0x29,0xA7,0xE1,0x15, - 0x3A,0x0B,0x95,0xAE,0x72,0x92,0x58,0xA8,0x8C,0xF8,0x6A,0x56,0x9A,0x64,0xA1,0x0E,0x50,0x1B,0xC3,0xDA, - 0xFD,0xF5,0xB8,0x9B,0x2C,0x59,0xE3,0xA9,0xC3,0xB5,0xF6,0x81,0x99,0x4B,0xD7,0xEE,0x73,0xF4,0x80,0x21, - 0x8B,0x99,0xF7,0xDB,0x32,0xFE,0xA6,0xFB,0x0E,0x60,0x43,0x80,0x5C,0xBE,0xA3,0xA9,0xDC,0x53,0xD0,0xA0, - 0xF9,0x6B,0x44,0xA4,0x01,0xB6,0xF0,0x64,0x1F,0x6D,0xB5,0x70,0x1F,0x73,0x0C,0x34,0x61,0x41,0xC3,0xB4, - 0x47,0xE8,0xA0,0xE4,0xA6,0x6E,0x22,0xAC,0x58,0x91,0xF9,0x21,0xB0,0xA1,0xD1,0x49,0xC0,0x00,0x6E,0xA7, - 0xD9,0x0F,0x37,0xA9,0xBD,0xAC,0x09,0xAC,0xAD,0xAE,0x38,0xF7,0x85,0x01,0xA1,0x65,0xD5,0x6C,0x78,0x20, - 0x5A,0x1F,0xA3,0xBA,0x36,0x48,0xC5,0x8F,0xAB,0x4B,0xF8,0xA6,0xAF,0xEE,0x52,0x90,0x4B,0x47,0x2B,0xAA, - 0x37,0xFE,0x98,0x2D,0x2F,0x31,0x5C,0x49,0xAC,0xE8,0x55,0x27,0x0D,0x80,0xFE,0xDA,0x6D,0xBB,0x80,0x8F, - 0x5E,0x02,0x55,0x05,0xCE,0xED,0x96,0xBC,0x03,0xBA,0xCD,0xA5,0xDA,0xF6,0xF9,0x7F,0x4F,0x05,0x0A,0x8B, - 0x0E,0xED,0xA2,0x7A,0x62,0x7B,0xFC,0xBC,0xF1,0xAB,0x18,0xFA,0x09,0x40,0x02,0xA8,0x23,0x23,0x34,0xB4, - 0x35,0xA6,0x0D,0xF4,0xCF,0x84,0x8A,0x4B,0x6C,0x40,0x9B,0x4A,0xA2,0x05,0x7D,0x0E,0x29,0xF5,0x2F,0x9E, - 0xFD,0x20,0x6B,0x79,0x48,0x45,0xCA,0x37,0x3D,0xF5,0xAB,0x6B,0xE3,0x38,0xD9,0xFB,0x9F,0x98,0x9B,0xA8, - 0xEC,0xE6,0x24,0xA6,0x22,0xB6,0xC2,0xB0,0x06,0x81,0x02,0x81,0x40,0x21,0x09,0xDD,0x6E,0x97,0xA9,0x33, - 0xD9,0x62,0x05,0x98,0x45,0x86,0xC2,0x4C,0x4F,0xFA,0x51,0x25,0x78,0x71,0xE2,0x3E,0xF8,0x61,0x38,0x33, - 0x07,0xA8,0xBC,0x32,0x17,0x98,0x77,0x94,0x4B,0x0C,0x33,0x52,0xFE,0x62,0x8C,0x61,0x8D,0x0C,0x49,0x22, - 0xF8,0x1B,0xE0,0x9F,0xDB,0xB2,0x7F,0x3F,0x5F,0x63,0x00,0x62,0x02,0xEF,0xBE,0x66,0xB2,0x34,0xE9,0xDB, - 0x5C,0x2F,0x2F,0x46,0x13,0xD4,0x34,0xB0,0x80,0x2E,0x49,0x76,0x35,0xEA,0xB0,0x3F,0xD4,0xD8,0xA4,0x4A, - 0x12,0x36,0x7A,0x03,0xA1,0xED,0x9A,0xE7,0x32,0x31,0x2F,0x04,0x57,0xAF,0x02,0x21,0xD2,0x87,0x9D,0x15, - 0xA7,0x62,0x07,0x17,0x4F,0xBC,0x3D,0x5B,0x82,0x57,0x0A,0x31,0xDB,0xBA,0x3C,0xC4,0xC2,0x95,0xC6,0x26, - 0x16,0xBF,0x6E,0x50,0x8C,0xFB,0x53,0xB4,0xD2,0x7B,0x34,0x60,0xCB,0xBA,0xF6,0x64,0x9D,0x9A,0x66,0x40, - 0xF9,0xFA,0xA4,0xD3,0x8E,0x7A,0x2F,0x32,0x26,0xBB,0xE9,0xF8,0x59,0x72,0xF1,0xC5,0x09,0x12,0xB5,0xA5, - 0x50,0xAB,0xE9,0xAF,0x00,0x72,0x69,0xB7,0x44,0xBC,0xF9,0x8B,0x40,0x16,0x4D,0x77,0xF2,0x90,0x1E,0x10, - 0x1B,0x4D,0xDC,0x88,0x9B,0x3E,0x77,0xE8,0x64,0xAD,0x2D,0x4E,0x5C,0xF5,0xB6,0xA5,0x8E,0x54,0xF6,0xBB, - 0x5A,0x93,0x79,0xF8,0x29,0xA4,0x47,0x89,0xC2,0x66,0xBF,0x76,0x9B,0xBF,0x70,0x7B,0xDB,0x6F,0xCE,0x8D, - 0x15,0x36,0xEC,0x56,0xC7,0x78,0xE3,0x0B,0xEB,0x13,0xF7,0x1F,0xB8,0x46,0x78,0x46,0xCD,0xA0,0x5F,0xA1, - 0x34,0x00,0xF9,0x2A,0x0E,0xC7,0x6E,0xF1,0xD1,0x78,0x6C,0x1B,0x5A,0xD7,0xEC,0x0E,0xF8,0x74,0x5F,0x29, - 0x26,0x4C,0x6A,0xBE,0xB6,0xEB,0x0E,0x78,0xE4,0xDB,0xA6,0x9E,0x38,0x8D,0xF5,0x34,0x9A,0x65,0xFD,0x7D, - 0x14,0x91,0xAF,0xD8,0xDA,0x1C,0x25,0x8F,0xB9,0xA1,0x78,0xB0,0x5B,0x06,0xCD,0x22,0x9F,0xC2,0x5B,0xB9, - 0xA3,0xAA,0xD5,0xBD,0x58,0x79,0x5E,0x05,0xF9,0x8F,0x35,0xC6,0x1C,0xE1,0xAE,0xB2,0xBB,0x6D,0xD3,0xDC, - 0xD9,0x5D,0xDF,0xFD,0xF8,0x8E,0x04,0x32,0x97,0xA2,0xB8,0x23,0x68,0x6C,0xB8,0x76,0xB0,0xF3,0x01,0x65, - 0xA0,0x84,0xA7,0xB7,0x14,0xFF,0xAD,0x64,0x1A,0xC8,0xD3,0xE1,0x25,0x64,0x49,0xAC,0x32,0x3E,0x6E,0x75, - 0xD6,0x7C,0x23,0x53,0xC1,0x61,0x02,0xC1,0xC5,0x1E,0xB0,0x20,0xF9,0x0B,0x73,0xC2,0x09,0xE6,0x88,0x8A, - 0xC9,0x86,0x98,0x97,0xD5,0xE6,0x47,0xD6,0x20,0x49,0x57,0x19,0x24,0xEC,0xCD,0x0C,0xE4,0xA0,0x90,0xB4, - 0xD3,0xEB,0x79,0x4A,0x5F,0x1B,0xD9,0xB8,0xB2,0xDA,0x7B,0x5C,0x44,0xD1,0x31,0x36,0x82,0xE8,0x30,0x5C, - 0xC3,0x17,0x29,0xD7,0xEB,0xDA,0xC6,0x91,0xC1,0x4F,0x5D,0xB5,0x74,0xE9,0x5A,0x88,0xF2,0xB7,0xDA,0x8C, - 0x19,0x62,0x28,0x59,0x29,0x4A,0x48,0x0A,0x3F,0x23,0x53,0x69,0x1A,0x86,0x6D,0x7C,0x5E,0x16,0xDD,0xFA, - 0x49,0x69,0x82,0xC0,0x3E,0x8C,0x9E,0xE9,0x0E,0x7D,0x99,0xED,0x1E,0xA9,0xCC,0x58,0xA5,0xA6,0x24,0xAB, - 0xFE,0x6F,0x4B,0x5B,0x30,0x00,0xD3,0x9D,0xBF,0x19,0x25,0x1F,0x24,0x90,0x2C,0xBB,0xF7,0x31,0x42,0x2D, - 0x2A,0x97,0xF4,0x2C,0x76,0xA1,0x01,0x4E,0xB3,0x7D,0xCA,0xCA,0xDC,0xE4,0xA9,0x9A,0x41,0x96,0xF7,0xDA, - 0x1D,0xC4,0x04,0x7D,0xAE,0xAB,0xF2,0xD8,0xFE,0x65,0x01,0x3D,0x03,0x08,0xF1,0x3A,0x98,0xEC,0x0D,0x6D, - 0x2F,0x1D,0x07,0x1D,0x7D,0xE8,0x09,0x2D,0xCB,0x24,0x8B,0xED,0xD0,0xA2,0x00,0x5F,0x24,0x8B,0xFF,0x9D, - 0x7E,0x65,0x60,0x7F,0x28,0xD2,0xFE,0x87,0x97,0xB3,0x34,0x86,0xB8,0x53,0xA3,0x4A,0xCA,0xCB,0x88,0xF0, - 0x64,0xB1,0x53,0xF4,0x15,0xBC,0x6E,0x36,0x4F,0x09,0xA3,0x25,0xF7,0xF2,0x39,0x42,0x26,0xBA,0x5A,0x7C, - 0x36,0xBA,0xF5,0x8A,0x12,0x7F,0xB4,0x4F,0xF4,0xB0,0x55,0xB7,0x44,0x88,0xD0,0x6A,0xB5,0xF2,0x03,0x56, - 0x46,0xB6,0x7F,0xC5,0x56,0x96,0xA4,0x22,0x50,0x30,0x6F,0x26,0x7E,0x44,0x65,0x66,0x0A,0xDE,0xFC,0x54, - 0x83,0xFB,0x74,0x3A,0x48,0x38,0xD3,0x8E,0x14,0x15,0xD0,0x60,0x3B,0xDD,0x72,0x26,0x4D,0xF6,0x74,0x1E, - 0x6E,0xA7,0x12,0xC7,0xBE,0x66,0x73,0xCB,0x0F,0xC7,0x41,0x98,0x55,0xB7,0xFC,0x35,0xB7,0x3A,0xEA,0x6C, - 0xB7,0x97,0xC7,0xD7,0x46,0x76,0xAD,0x2A,0xB2,0x6F,0x10,0x6C,0x08,0xF4,0xC6,0xCF,0x91,0xB5,0x08,0x5A, - 0xCF,0x75,0x09,0x4C,0x58,0xFE,0x66,0x9F,0x2B,0x11,0xA4,0x9F,0x9E,0x42,0xFE,0x1B,0x5A,0x52,0x9E,0x5C, - 0x7B,0x42,0x19,0xE6,0x6E,0xBA,0xED,0x74,0x1F,0xB7,0x65,0x2F,0xCE,0x51,0x93,0xF3,0x5D,0x72,0x06,0xDD, - 0x8B,0xD7,0xB5,0x1B,0xC6,0x21,0x62,0x8A,0x8F,0x99,0x04,0x3D,0x75,0x23,0xF3,0x2C,0x0A,0xE0,0xE5,0x4A, - 0x66,0x7A,0x4E,0x11,0x8F,0xBF,0xFA,0x2B,0x6F,0x64,0xC7,0xA1,0xA2,0xFF,0x11,0xFA,0x1B,0xD3,0xC5,0x60, - 0x6E,0x3D,0xAB,0x4A,0x51,0x07,0xD8,0x84,0x3B,0x43,0x5C,0xAF,0xB2,0x45,0x0C,0x2C,0x13,0x68,0xF9,0x2A, - 0xF1,0x04,0x31,0x39,0xAB,0x1A,0xAF,0xE0,0xB7,0xD3,0xC0,0x60,0x10,0x02,0xAB,0x5F,0xDD,0xDC,0x98,0xA1, - 0x00,0x42,0xD9,0x96,0x56,0xED,0x68,0x86,0x54,0x01,0x70,0x1B,0xA4,0xC3,0x55,0xF8,0xD7,0xCE,0x9A,0xC6, - 0xFA,0x65,0x60,0xB2,0x40,0x16,0xE3,0xAD,0xAC,0xD0,0x8E,0x27,0x61,0xAD,0xDF,0xE7,0x94,0xA7,0x71,0x61, - 0x7E,0xCF,0x26,0x91,0xF4,0xEF,0xA1,0x0C,0xB2,0x15,0xB7,0xF7,0xF3,0x86,0x21,0xE1,0x36,0x4C,0xE7,0x33, - 0x30,0xB0,0xFF,0x71,0xA3,0xA5,0xA0,0x00,0x96,0xA9,0xF8,0xD1,0xC0,0x40,0xEA,0x86,0xAF,0x6B,0xE8,0x22, - 0x61,0x82,0xB0,0x73,0xB0,0x65,0x20,0x54,0xA2,0xEA,0xC8,0xE1,0x5F,0x27,0x79,0x71,0xEF,0xA9,0xB9,0xC7, - 0xB4,0x6E,0x5B,0x03,0x83,0x42,0x41,0xE1,0xE8,0x3F,0x89,0xD0,0xC0,0x47,0x12,0x01,0x6E,0x49,0x04,0x99, - 0x51,0x88,0x84,0x92,0xF7,0x93,0xF8,0x4E,0x1C,0x44,0xFC,0x0B,0xB9,0xF7,0x2A,0xF8,0x14,0x47,0xEC,0x2B, - 0xF9,0xF9,0xA2,0x19,0x8E,0x69,0xD4,0xC1,0x99,0x82,0x62,0x1F,0xB4,0x46,0x35,0x46,0x84,0x28,0x42,0xE1, - 0x2C,0xC5,0x37,0x6F,0x67,0x6B,0x73,0x69,0x7A,0x97,0xE8,0x56,0xFB,0x45,0x9B,0x9D,0xF2,0x19,0x93,0x1D, - 0xAA,0xC0,0x8B,0x4B,0x36,0xC0,0x8B,0x8D,0xDB,0x05,0x02,0x9D,0x79,0x3A,0xA5,0x0C,0x5A,0xD1,0x32,0x28, - 0xF4,0x43,0x06,0xE8,0x2D,0x6C,0xF2,0xB6,0x1B,0x40,0xF5,0xC3,0xE4,0x6C,0xCA,0xFA,0x69,0x2D,0x62,0xDC, - 0x59,0xCD,0x1C,0x8B,0xB9,0x4E,0xA4,0xB2,0xBE,0x42,0x51,0x8B,0x4D,0x1B,0x64,0xC8,0xDE,0x75,0xB6,0xA4, - 0x48,0xD4,0x6C,0x5B,0x4F,0x4B,0x61,0x9B,0xE9,0xB0,0x73,0xFD,0xDD,0xDE,0x63,0x7F,0xD5,0x86,0x2C,0x2C, - 0x22,0xFB,0xD4,0x24,0x93,0x59,0x17,0x66,0xF3,0x36,0xA0,0xE2,0xFF,0xEE,0x20,0x07,0x06,0x3B,0x9C,0x48, - 0xD0,0x13,0x01,0xC7,0x4A,0x7A,0xFE,0x21,0x4D,0x02,0x67,0xA1,0x59,0x09,0x91,0x1E,0xEC,0x32,0x22,0x81, - 0xF6,0xE9,0x37,0x0F,0x56,0x52,0x8E,0x11,0xC2,0x4A,0xC6,0x06,0xC5,0x11,0x9E,0x44,0xCA,0x8C,0x76,0x3B, - 0x24,0x0F,0x9D,0xF1,0xB0,0xC3,0x6B,0x82,0x23,0x74,0x2B,0x1B,0x8D,0x8B,0x13,0x20,0x27,0x1A,0xEA,0x10, - 0x24,0x75,0x9C,0x84,0x9A,0xDE,0x23,0x0B,0x8C,0x8A,0xB6,0xE5,0x20,0x5E,0xBF,0x35,0xBA,0x39,0x2D,0xC5, - 0x3A,0x35,0x2A,0x1A,0x0D,0x89,0x2D,0x75,0xE2,0x55,0x94,0xE0,0x4E,0x93,0xE1,0xC0,0xCD,0x15,0x22,0x0A, - 0x0C,0x88,0x96,0x0C,0x69,0x77,0x46,0x71,0x38,0x7A,0xD7,0xDF,0x81,0x73,0x56,0x58,0x7F,0x3A,0x58,0xDA, - 0x52,0x08,0xEB,0x8D,0x02,0x78,0x09,0x3C,0x6F,0x81,0xDF,0x98,0x98,0x86,0x59,0x39,0x20,0xB1,0x9C,0xDA, - 0xBE,0xE1,0x0F,0x28,0xEE,0xF3,0x48,0xAD,0xFE,0xF3,0x54,0xAF,0x61,0x02,0xEF,0xDD,0x55,0x36,0xDF,0x5C, - 0x7A,0x5D,0xC5,0x7D,0x85,0x39,0x06,0xB5,0x60,0xB6,0x58,0x2E,0xDA,0x8D,0x06,0x63,0x8B,0x53,0x29,0x13, - 0x85,0x83,0x97,0xE8,0xD0,0xE2,0x35,0xF8,0x4C,0x39,0x76,0xD7,0x52,0x08,0x21,0x03,0x84,0x82,0x09,0x18, - 0x8E,0xB3,0x38,0xBF,0xD0,0x31,0xC7,0x11,0x62,0xE5,0x28,0x12,0x05,0x81,0x71,0x35,0x24,0x99,0x10,0x95, - 0xC0,0x0C,0x46,0x04,0x6A,0x84,0x20,0x02,0x04,0x80,0xFF,0x2A,0x73,0x45,0xFA,0xFB,0xB3,0xB0,0xEA,0x1F, - 0x42,0xBA,0xE9,0x70,0xF1,0x66,0xE3,0x08,0x27,0x73,0xF1,0xDE,0xB2,0xBA,0xFC,0xB7,0x06,0x33,0x98,0xA4, - 0xDD,0xE9,0xE1,0x4B,0x5B,0xC0,0xFB,0xF8,0x33,0x2F,0xB7,0x41,0x33,0xA0,0xA2,0xAF,0x71,0x6B,0xAF,0xEE, - 0xB5,0x58,0x65,0xF1,0xB1,0x2E,0x46,0x74,0x30,0x75,0x39,0xF0,0xF1,0x8F,0x87,0x46,0x25,0x1F,0x5D,0x26, - 0x52,0xD6,0x0F,0xE0,0x64,0xA4,0xF7,0x42,0xD4,0xE0,0xC4,0x10,0x84,0x85,0x16,0x72,0x95,0xAD,0x42,0x8C, - 0x9A,0x18,0x80,0x52,0x51,0x6D,0x8D,0xC3,0x7A,0xA6,0xDE,0xA5,0x3A,0xA2,0x2B,0x62,0x65,0x87,0xFB,0x05, - 0x97,0x66,0x37,0x44,0x8F,0x87,0x64,0xA7,0x9B,0xA8,0xD6,0x01,0x3C,0x85,0x5B,0xF3,0xF8,0xF9,0x90,0x8E, - 0x56,0x7E,0xDC,0xEF,0x2F,0xD4,0x4A,0x37,0xB2,0x0E,0x22,0xE9,0x5E,0x1D,0x9E,0x78,0xFE,0xEC,0x52,0x16, - 0xBA,0xB9,0xE2,0xD2,0x9D,0x14,0x05,0x9E,0xFC,0x49,0xA3,0xE7,0x83,0xEF,0x5B,0x49,0xFA,0xBA,0x8A,0x0F, - 0xCA,0x71,0xB7,0x68,0x5D,0xE4,0x13,0xE0,0x00,0x76,0x53,0xF7,0x2D,0x64,0xC1,0x33,0x30,0x04,0x3C,0x80, - 0xDD,0xCB,0x0A,0x88,0x88,0x79,0x82,0x0E,0x0B,0x21,0xA9,0x02,0x1A,0x1B,0x62,0x11,0x3E,0x0C,0xD4,0xB2, - 0x9D,0x4B,0x90,0x2C,0xBC,0xD9,0x76,0x04,0xEE,0x47,0x05,0x81,0xA0,0x12,0xF3,0x0C,0xB5,0xF8,0x9B,0x6B, - 0x1C,0x59,0xE6,0x99,0xEA,0xC8,0x8D,0x8E,0xFA,0x11,0x29,0x48,0xB8,0x80,0x22,0xB2,0x97,0xEF,0x04,0x99, - 0x4D,0xE7,0x04,0x80,0x20,0x10,0xAA,0x91,0x1D,0x88,0x5F,0x04,0x35,0x55,0xC6,0xD6,0x91,0xDF,0x7D,0x49, - 0xD5,0x2F,0xAC,0xEA,0xAD,0x97,0x4B,0xD6,0x39,0xDF,0x5C,0xF3,0x9C,0xDC,0x4B,0xBA,0xDE,0xB1,0x92,0x32, - 0x50,0x11,0x9D,0xC0,0x62,0xDE,0x81,0xDC,0x47,0x93,0x19,0x22,0x57,0x02,0x7D,0x1B,0x87,0xC3,0x8D,0x96, - 0x38,0xB9,0x77,0x4D,0x46,0xB6,0xE6,0x2C,0xF3,0xC8,0x66,0x82,0x66,0x69,0xBF,0xC6,0x30,0xDF,0xD2,0xE6, - 0x45,0x4F,0x0B,0x19,0x89,0x0B,0xC3,0xA2,0x2B,0x69,0x33,0x76,0x08,0xA5,0x5C,0xB2,0xC6,0x52,0x03,0x09, - 0x88,0x0A,0xA1,0xD3,0x59,0xD7,0x8C,0xE3,0xC1,0xB2,0xB5,0x02,0x5E,0xD0,0x0A,0x18,0x09,0x09,0x57,0xEE, - 0x58,0x1A,0xB2,0x06,0xB3,0x4C,0xCC,0xF6,0x84,0x28,0x02,0x08,0x08,0x08,0x23,0x7A,0xBE,0x97,0xDE,0xAA, - 0xB3,0xBA,0x0E,0x7A,0x9B,0xD7,0xD2,0x2A,0x7A,0x67,0x0E,0x8F,0x4E,0x8F,0xA6,0xA8,0x9C,0x16,0x5E,0xFB, - 0x98,0xD4,0x3A,0xBA,0x0A,0x1E,0x93,0x7B,0x2E,0x95,0x10,0x8E,0x31,0xBC,0x83,0x5B,0xB0,0xD5,0xAF,0xAA, - 0x02,0x9A,0x57,0xBC,0xCE,0x99,0xF9,0x8C,0x62,0x78,0x35,0xBF,0x4E,0x9A,0x7F,0x47,0x4C,0xBA,0x34,0x6E, - 0xF2,0xD8,0xA5,0x4A,0x3B,0x8E,0x0E,0xCE,0x5D,0xCA,0x09,0x11,0x81,0x03,0xFE,0xA8,0xC4,0xE4,0x6E,0x26, - 0xFF,0xBB,0xDD,0x18,0x8F,0x62,0x01,0x01,0x80,0x02,0x19,0xCC,0x57,0x91,0x38,0x3B,0xC9,0xFE,0xCD,0x15, - 0x07,0x85,0x08,0x10,0x01,0x01,0x11,0xA3,0x2A,0x6E,0xE7,0x78,0x1E,0x40,0xBF,0x13,0x19,0x9E,0x00,0x00, - 0x94,0x9A,0x80,0x0D,0xBA,0x40,0x3B,0xA1,0xE7,0xDD,0x4E,0xB6,0x98,0xEB,0xA8,0xDB,0xA5,0x03,0xBF,0x11, - 0x8C,0x0D,0x33,0xA5,0x1F,0x8E,0x7E,0xC1,0x83,0xC1,0xE6,0xA4,0xA4,0xC2,0x04,0x84,0x0F,0x00,0x97,0x95, - 0x7B,0xA0,0xF7,0x67,0x21,0xED,0x6A,0x5A,0xB8,0xE0,0x61,0x6E,0xC2,0x63,0x4D,0x17,0x9F,0x8E,0x67,0xAF, - 0x2A,0xB5,0x5D,0xC6,0xDF,0x67,0xE8,0xCA,0xE9,0x90,0x20,0x7B,0x36,0x4A,0x2E,0xE1,0xF7,0xED,0x8B,0x64, - 0x54,0xF4,0xED,0x44,0x84,0x13,0xE0,0x96,0xCF,0x27,0xCD,0xE5,0xAA,0xE4,0x27,0x0A,0x7D,0xBA,0x1F,0x5A, - 0x86,0xAD,0x81,0x7A,0x9A,0x4A,0xC3,0x81,0xB2,0xE2,0x68,0x1A,0xBA,0x6B,0x19,0xCF,0x78,0xA3,0x99,0x5D, - 0xD3,0xDC,0x07,0x93,0xC7,0xC2,0x66,0x45,0x52,0xC8,0x1A,0x05,0x6B,0x68,0x50,0x3D,0xB9,0xD7,0x4C,0xB3, - 0x58,0xE7,0x56,0x5F,0x3E,0xC9,0xF1,0x47,0x4A,0x96,0x35,0x2D,0x5B,0x86,0x44,0x0F,0xC8,0xE6,0x4E,0xC2, - 0xA4,0xC8,0x94,0xF6,0x69,0xD9,0xBD,0xBC,0xB6,0xF5,0x70,0xD8,0x2C,0xFE,0xAB,0xD2,0x31,0xC9,0xA4,0xDB, - 0x0A,0x4D,0xC9,0x63,0xF3,0x49,0x2D,0xC8,0x29,0x0B,0xD9,0xCE,0x9B,0xB6,0xB5,0xB7,0xC2,0xDB,0xC2,0x4E, - 0x1E,0xD7,0xE1,0x8A,0x22,0xCE,0x17,0x12,0x38,0x88,0x6C,0xE2,0xF8,0x38,0xC9,0x4C,0x64,0x6D,0x9E,0x8B, - 0x45,0xB8,0x6D,0xFC,0x2C,0x6D,0xB8,0x5A,0x70,0xB1,0xC7,0x52,0x94,0x2D,0x2D,0xF9,0x3F,0xED,0xAD,0xE1, - 0x5A,0xFC,0x0A,0x32,0x04,0x89,0xEB,0x59,0xE4,0x0F,0x9A,0x06,0xE5,0xE9,0xEC,0x4C,0xA8,0x6F,0x96,0x78, - 0x20,0x52,0x84,0xBF,0x54,0xAB,0xCB,0xA1,0xBC,0x52,0xCC,0xA1,0x74,0x30,0x34,0x6F,0xD4,0x72,0x33,0x7C, - 0x35,0x5D,0x7A,0x39,0x62,0x31,0x48,0x27,0xD0,0xAE,0x06,0xEF,0x5D,0xB3,0x85,0x01,0xE0,0x6F,0xC8,0xA5, - 0x5D,0x3C,0x6C,0x9A,0xE6,0x8F,0x22,0xEE,0x78,0x8C,0x59,0xCB,0x9F,0xEF,0x9D,0xB5,0x16,0xFE,0x22,0x84, - 0x50,0x8C,0xE1,0xD4,0xA5,0x02,0x40,0xC0,0x3E,0xC8,0xEF,0xF3,0x98,0xE9,0x00,0x1A,0x8F,0xD5,0x8A,0x17, - 0xE1,0x15,0x9C,0x94,0x3F,0x75,0xA1,0x78,0x75,0x15,0x8A,0x78,0x98,0x27,0x15,0x45,0xD3,0xBB,0xFB,0x45, - 0x3F,0x90,0x73,0x5B,0x13,0xFD,0x10,0x16,0xEC,0xAB,0x45,0x61,0x4A,0x76,0xCB,0x6D,0x5A,0x74,0xDD,0xD9, - 0xF9,0x17,0x5D,0xE5,0xBC,0xDA,0x56,0x80,0x64,0xA5,0xEF,0x67,0x50,0xFA,0xC2,0x08,0xC9,0xF8,0x2D,0x09, - 0x8F,0x85,0xDA,0x62,0xC0,0xC8,0xC8,0x6F,0x73,0x9D,0x9A,0xCA,0x82,0x0B,0x25,0x0D,0x73,0xD6,0x11,0xEB, - 0x53,0x87,0xF9,0x19,0x4D,0x99,0x49,0x25,0xE0,0x5E,0x81,0x29,0x13,0x38,0x25,0x49,0x0A,0x93,0xDB,0x15, - 0x9B,0x8B,0xA2,0xC9,0xED,0x50,0xDB,0xAE,0xC5,0x99,0x5E,0x48,0xE2,0x5E,0x96,0xAE,0x30,0x97,0xD6,0x71, - 0x83,0xBE,0x96,0xAB,0xB0,0x5F,0x70,0xA6,0xE3,0xE0,0xAE,0x2D,0x75,0x1D,0x4A,0x8B,0x47,0x54,0xD2,0x8F, - 0x5D,0x7E,0xE7,0xDA,0xA0,0x7A,0x81,0x47,0xD1,0xFC,0xBB,0x7B,0xEA,0x56,0xDF,0xE8,0xFE,0xDE,0x37,0x5D, - 0xFB,0x80,0x91,0x55,0x29,0x94,0x1F,0xEA,0xED,0x1B,0xE7,0x7C,0x90,0xDD,0x97,0x26,0x22,0xC0,0xDE,0x83, - 0xFD,0xB3,0x98,0xA8,0x94,0x54,0xE6,0xA3,0xBF,0x82,0x9F,0x13,0x88,0x8D,0x7E,0xB3,0xE2,0x5C,0xB8,0xF4, - 0xD7,0xC2,0x47,0x45,0x3B,0x82,0x21,0x27,0x0B,0x80,0xB7,0x65,0x6B,0x0F,0x16,0x38,0xAF,0xB6,0x8F,0x8F, - 0xBC,0xEF,0x41,0xE2,0x8F,0x67,0xBF,0x87,0x7E,0x21,0xDA,0xC8,0xE7,0xD3,0x42,0x48,0xBD,0x61,0x60,0x82, - 0x0A,0xC4,0x47,0xD6,0x7D,0xE6,0x48,0x9C,0xBB,0x65,0x30,0x7E,0xE3,0x19,0xD1,0x95,0xC5,0x85,0x8E,0xD3, - 0x14,0xC5,0x83,0x0D,0x2F,0x47,0x2C,0x88,0xAA,0x64,0xE1,0x85,0x32,0x47,0x61,0x34,0x90,0xC8,0x49,0x9C, - 0x33,0xA5,0xE7,0x05,0x29,0x3B,0x21,0x56,0x83,0xC7,0x69,0x46,0x9E,0x0A,0x07,0xF7,0x32,0x64,0xD1,0x84, - 0xC9,0x3A,0x7C,0x8E,0x8D,0x23,0x19,0xBF,0x12,0x07,0x30,0xD7,0x4C,0xCC,0xCC,0xBE,0xA9,0x4B,0x02,0x5C, - 0x0B,0x7C,0xE8,0x9A,0x19,0x89,0x7F,0x9A,0x1D,0x49,0xFE,0x2D,0x1F,0xAB,0xE7,0x1C,0xE7,0x08,0x67,0xFC, - 0x96,0x0E,0xB3,0xD6,0xC4,0x3E,0x77,0xDC,0xD2,0x45,0x3A,0xE7,0x8D,0x3E,0x58,0x20,0xAD,0x70,0xE4,0x3F, - 0x4D,0x8B,0x13,0xBB,0x34,0xF9,0xC9,0xBB,0xB1,0xEC,0x36,0x2E,0x56,0x07,0xB6,0x99,0x44,0x82,0xA0,0x79, - 0xB5,0xBE,0x0B,0xAB,0xDF,0x8D,0xD0,0xAD,0x4D,0x00,0x2A,0x90,0xB4,0x69,0x9C,0x1C,0xA8,0x10,0x3D,0xA4, - 0xAC,0xC2,0xA0,0x4E,0x1E,0xCE,0xB3,0xCB,0x18,0x71,0x44,0xF7,0x23,0x8D,0x35,0x40,0x8B,0x24,0x2B,0x2F, - 0x9B,0xA6,0x8C,0x04,0x07,0x18,0xED,0x1D,0x20,0x32,0x25,0x71,0xEE,0x3B,0xA5,0x77,0x3A,0x54,0x7F,0x53, - 0x2E,0x64,0x07,0x37,0x88,0x32,0x0B,0x63,0xC9,0x9D,0x79,0x67,0x3B,0x55,0x6C,0x3A,0x47,0x61,0x86,0x45, - 0xBF,0x5A,0x42,0x8B,0xCF,0x57,0xFB,0x17,0x35,0xB6,0x6B,0x37,0x65,0x76,0x16,0x31,0x28,0x14,0x73,0xA0, - 0x25,0x38,0xF3,0x07,0x34,0x1E,0x6B,0xC0,0x83,0x7B,0xDF,0xB3,0x21,0x25,0x44,0xDB,0xEE,0xD6,0xA1,0x64, - 0xB6,0x44,0x52,0x63,0xEA,0x79,0x95,0x17,0x30,0xFA,0x52,0xAC,0x84,0xF0,0x2E,0x56,0x5C,0x57,0xBC,0xEA, - 0x94,0xD1,0xBD,0x7C,0x1C,0xC7,0xC5,0xD0,0xAC,0xF2,0xBB,0x56,0x24,0x1D,0xCE,0xF0,0x1B,0xD9,0xAB,0x72, - 0xFE,0x5D,0x53,0xAC,0x04,0x35,0xE9,0x26,0xA5,0xA1,0x7A,0xE0,0xE1,0x93,0x85,0xF5,0xAB,0x5C,0x14,0x9A, - 0xA9,0x8E,0x74,0xDF,0x56,0xB3,0x60,0x4A,0x3E,0x2D,0x11,0x31,0x97,0x4E,0x70,0x95,0x7F,0xD7,0x99,0x3E, - 0xCE,0xFB,0x45,0x3E,0x3D,0x84,0x0C,0x4D,0x91,0x52,0x04,0x91,0x74,0x2E,0xE4,0xB0,0xD4,0x65,0x21,0x55, - 0x14,0xF9,0xE9,0x35,0xF8,0x55,0x4E,0x3B,0x7B,0x24,0xAC,0xF1,0x40,0x1A,0x80,0x8A,0x4C,0x24,0x89,0xB7, - 0x16,0x7E,0xA0,0xB9,0x2C,0x37,0xB8,0x47,0x1C,0xBF,0x50,0x6B,0xE2,0x71,0xB0,0x64,0x15,0x3E,0x16,0xEB, - 0x29,0x32,0xF8,0x7F,0xC0,0x30,0xC1,0x18,0x71,0x9D,0xA0,0x76,0xED,0x56,0x1F,0xCF,0x4E,0x4B,0xE0,0xEB, - 0x57,0xBC,0xCC,0x09,0x42,0x73,0xBF,0x1E,0xB0,0xDE,0xAF,0xA5,0xC5,0xBD,0x3B,0x21,0x47,0x1E,0x7F,0xAD, - 0x6C,0xD1,0xBA,0x1F,0xDD,0x4F,0xC3,0x3F,0x02,0xDB,0xC7,0xEA,0xA8,0xD2,0x2E,0x18,0x20,0x4A,0xD8,0x21, - 0x54,0x80,0x08,0x94,0x51,0x5C,0x5C,0x87,0xB0,0xFE,0xE1,0x7B,0xBC,0x7D,0xA6,0x90,0x73,0x6C,0x01,0x3A, - 0xE8,0x99,0x41,0x1D,0x1B,0xDD,0xEE,0x53,0xA2,0x74,0x86,0x9E,0x90,0x10,0xB6,0x20,0x20,0xFC,0x36,0x24, - 0x30,0xDC,0xC4,0x30,0x41,0x83,0x1B,0xC9,0x43,0x98,0xE7,0xD1,0xEB,0x96,0x7F,0x75,0x58,0x8B,0xF4,0x02, - 0xA9,0x06,0x8E,0xE0,0x0E,0xCF,0xE4,0xF5,0xD6,0x66,0xB6,0xC4,0x70,0x35,0x6B,0x44,0xB2,0x2B,0xFB,0x85, - 0x5D,0x45,0xF2,0xCC,0xB1,0x46,0x87,0x3B,0xF8,0xA4,0xE5,0x03,0x29,0x24,0x94,0x5F,0xB9,0x34,0xE2,0x9B, - 0x38,0x86,0xDF,0xC0,0x78,0xC5,0x3B,0x71,0xC0,0x27,0xF9,0x5D,0xB8,0x25,0xB9,0xAD,0xFF,0xF5,0x39,0xA9, - 0xEF,0xD5,0xCF,0x29,0x7F,0x7E,0xF2,0x2E,0x18,0xB3,0xB1,0xA8,0xC5,0xA6,0x31,0xAD,0x53,0x86,0xBB,0xA4, - 0xD1,0xBB,0xD8,0x23,0x13,0xC2,0x11,0x4B,0x63,0x78,0x95,0x99,0x73,0xE8,0x4E,0xE9,0x54,0xF8,0xF2,0xD0, - 0xDA,0xBE,0xCA,0x1B,0xA9,0xA6,0xCD,0x62,0xF1,0x19,0xAE,0xA0,0x7D,0x99,0x59,0x26,0xB2,0x89,0x68,0xBB, - 0x44,0xD1,0xF8,0xFD,0x5C,0x83,0xD2,0x7D,0x72,0xE8,0x51,0x9D,0x40,0xF9,0x74,0xFD,0x29,0x00,0xEC,0xCC, - 0x97,0x20,0xBC,0x89,0x81,0x6D,0x1E,0x7D,0xDB,0x3F,0x11,0x52,0x61,0xCC,0x01,0x5E,0xD0,0x6A,0x12,0xFF, - 0x02,0x7C,0x8D,0xE1,0x6E,0xC5,0x5F,0xF9,0xD7,0x1F,0xB5,0xD9,0x37,0x22,0x05,0xEB,0xC3,0xEB,0x85,0xF9, - 0x87,0xC4,0x47,0xFF,0x0E,0xB6,0x92,0x46,0xB3,0x76,0xAF,0x11,0x72,0xFF,0x5A,0x1F,0x74,0x01,0x34,0x6F, - 0xD4,0x72,0x3B,0x95,0xBC,0x3D,0x22,0x31,0xEE,0xD7,0x1E,0x48,0xE3,0x8A,0x3D,0x7F,0x5D,0xB3,0x32,0xA1, - 0x3F,0x30,0x54,0xB2,0xDC,0x70,0xAB,0x01,0xD2,0x7F,0xF6,0xEE,0xC9,0x61,0xE5,0x8A,0xB3,0x87,0x1D,0xF1, - 0x98,0xF7,0xF5,0xB7,0xB1,0xA8,0x04,0xB3,0x52,0x95,0x9A,0x54,0xA0,0x9F,0x6A,0x61,0x42,0x59,0xF2,0x75, - 0xF6,0xD0,0x29,0x3E,0xBA,0xE8,0xC8,0x25,0x7D,0x23,0x7F,0xF0,0xAB,0x44,0x68,0x96,0x8C,0x00,0x0D,0x3E, - 0x43,0x95,0x83,0x47,0xD9,0xF4,0xD2,0xA7,0x70,0xFD,0x97,0xE2,0x53,0xA9,0x60,0x3C,0xAB,0x13,0x93,0x5D, - 0x11,0x33,0x7A,0x00,0x7F,0x97,0x1F,0xDB,0xBD,0x42,0x78,0x05,0xDD,0xBB,0xC2,0xF3,0x58,0x3A,0xD4,0xAE, - 0xA0,0xFA,0xF7,0x51,0x7B,0xAC,0xDA,0x38,0x88,0x38,0xEB,0x6F,0x2B,0x3A,0x26,0x47,0xD5,0xBB,0xDD,0x82, - 0x67,0x62,0xC6,0x7A,0xBE,0xB7,0xF9,0x04,0x59,0xB9,0xB3,0xCB,0x1F,0x3F,0xD5,0xB2,0xB2,0xD7,0x5F,0x84, - 0xB9,0x60,0x8E,0x8D,0xC6,0x3B,0xAE,0x31,0x51,0x69,0x1F,0xFA,0xD7,0xA7,0xC4,0x25,0x22,0x47,0x41,0x3D, - 0x78,0x2A,0xBE,0x62,0xEA,0xEC,0x97,0x68,0x22,0x3E,0x09,0xD6,0x7D,0x29,0x0C,0xDD,0x50,0xDF,0x5E,0xEB, - 0x5B,0xE9,0x5D,0xF5,0xB3,0x2F,0x22,0x20,0xA9,0x6A,0x99,0x5C,0xB8,0x95,0xFF,0x63,0x81,0xCA,0xA8,0xD7, - 0x59,0x3C,0x88,0xF6,0xF1,0x4A,0xAE,0x2C,0xA9,0x3C,0x01,0xF6,0xA7,0x11,0x7F,0xEE,0xE1,0x1B,0x60,0x33, - 0x26,0x7F,0xDE,0x8F,0xE1,0x03,0x05,0xBF,0x42,0x50,0x98,0x24,0x3F,0x57,0x3E,0xEA,0x05,0xC3,0xEA,0xE7, - 0xB6,0xE1,0x00,0xCC,0xB8,0x60,0xE8,0x54,0x11,0x3A,0x1B,0xA6,0x73,0x37,0xE0,0xF4,0x86,0x0F,0x5D,0xDC, - 0xEA,0x64,0x35,0xAA,0x3D,0xA1,0x2A,0x7D,0x78,0x22,0x9B,0x29,0x36,0x02,0x01,0xCC,0x30,0xA0,0xD8,0xCA, - 0x77,0xE7,0xBD,0x43,0x31,0xB2,0x9E,0xC3,0x34,0x72,0xB0,0xFC,0x8E,0xA6,0xB5,0x5C,0x3D,0xB6,0x56,0x6A, - 0x67,0x8F,0x49,0xCF,0x13,0x05,0x42,0x81,0x95,0x61,0xD8,0x6E,0x3C,0xA7,0x3C,0x83,0x06,0x56,0x9E,0xDF, - 0x92,0x66,0x96,0x92,0x1C,0xD6,0x5B,0x96,0xD8,0xA6,0x96,0x21,0xE5,0xB1,0xB2,0x95,0x14,0xE1,0xBB,0x45, - 0x0F,0x25,0x7E,0x86,0xCD,0x72,0x1A,0xF5,0xF9,0xEB,0x67,0xFD,0x02,0x75,0xC9,0x55,0x24,0x0A,0xB0,0xD2, - 0xCE,0x13,0x54,0x97,0xF8,0x0A,0xEC,0x9F,0x9D,0x3D,0x7C,0xC9,0x07,0x34,0xFC,0xCF,0x1B,0x5D,0xD8,0x74, - 0xEC,0x86,0xF5,0x83,0x77,0xF8,0x4D,0xBF,0x39,0x69,0xE3,0x31,0x9E,0x1E,0x8D,0xE8,0x9B,0x7E,0xED,0x9B, - 0x99,0xCB,0x2D,0xB2,0x26,0xF9,0xE5,0xAA,0x1C,0xEF,0x9B,0x01,0xF3,0xB0,0x55,0x6A,0x91,0xAE,0xC4,0x9B, - 0xA6,0xC8,0xAC,0xE2,0xCF,0x47,0xCB,0xC6,0x97,0x7F,0x82,0x41,0x1D,0x00,0x7B,0x48,0xA4,0x48,0xBE,0x0D, - 0x55,0x81,0xBE,0x4A,0x12,0x3C,0x54,0x4E,0x13,0xA2,0x4D,0x5F,0xA5,0xC1,0x37,0x6B,0x3F,0x41,0x4B,0xC6, - 0xAD,0x7F,0x3B,0xFF,0x3E,0x8D,0x45,0xFB,0xEC,0x4D,0x9D,0xFB,0xDC,0xE5,0x20,0x6E,0xBE,0xAB,0x84,0x82, - 0x4B,0xF0,0xF4,0xBB,0x62,0x6F,0x60,0xF8,0xE7,0xCF,0x3F,0xA2,0x26,0x6E,0x77,0x96,0xCD,0x70,0x39,0xA1, - 0x7B,0x95,0x07,0x06,0xAD,0x5E,0x6D,0x81,0xF0,0x3F,0x02,0x0B,0x48,0xA3,0x06,0x41,0xE2,0x02,0xA7,0xE5, - 0x1F,0x10,0x17,0x23,0x3F,0xCC,0xF6,0x97,0xB3,0x23,0x1B,0x3F,0x69,0x0E,0x7F,0xB5,0xCD,0x5E,0xA7,0xE9, - 0x78,0xD6,0xDA,0x46,0x74,0xBD,0x15,0x12,0x6E,0x75,0x4F,0x04,0xDA,0x09,0x0A,0xB0,0xD0,0x68,0xAE,0xB6, - 0x1D,0x37,0x2A,0x6E,0x8C,0x07,0xBA,0x05,0x3D,0x78,0x66,0x00,0x59,0xF5,0x20,0x57,0x97,0x77,0xB2,0x10, - 0xB8,0x5B,0x8D,0x17,0xF2,0x57,0x7B,0xB1,0x58,0x4A,0xF5,0x6F,0xD7,0x37,0xC8,0x6A,0x50,0xE2,0xAB,0x67, - 0x1C,0x75,0x0B,0xF5,0xB5,0xE3,0x1F,0xF1,0x54,0xB5,0x4E,0x8D,0x91,0xD7,0x66,0x0E,0xDD,0x38,0xED,0x91, - 0x73,0x9D,0xD0,0x13,0x46,0x39,0x40,0x27,0x8C,0x7A,0x9E,0xAE,0x0A,0xEF,0x23,0x84,0xF6,0xCE,0xD9,0x17, - 0x49,0xD9,0x6D,0xAA,0x84,0x28,0x6C,0x25,0x83,0xF5,0xE8,0x3B,0xF1,0x99,0x90,0x58,0x77,0xE9,0xFC,0x48, - 0xBB,0xAE,0x60,0x5F,0x29,0x79,0xB2,0x34,0xD3,0x3D,0xBE,0x9E,0x55,0xFE,0xB1,0x6E,0x3E,0xF2,0xAC,0xEA, - 0x16,0xEE,0x38,0x4A,0xC4,0x1F,0xB0,0x52,0x1C,0x16,0x85,0x85,0x07,0xD0,0x38,0x0D,0x31,0x50,0x21,0x38, - 0xE4,0x43,0x64,0x3E,0xA4,0x2B,0x88,0x4E,0x24,0xD3,0x89,0x67,0x1F,0x5D,0x49,0x4A,0x2B,0x30,0x2B,0xDE, - 0x3F,0x7C,0x80,0x85,0xC1,0x00,0x3B,0x0E,0x5C,0xBF,0x32,0x3E,0xA3,0xA1,0xC5,0x15,0x1A,0x24,0x06,0x42, - 0xBF,0x9D,0x14,0xE3,0xD0,0x40,0x5E,0x99,0xEA,0x33,0x08,0x74,0x1D,0x61,0x5B,0xC3,0x13,0x9C,0xD2,0xA8, - 0xDC,0x03,0xC0,0xF2,0x96,0xDF,0xE3,0x1C,0x69,0xAB,0xC5,0xDF,0x3D,0xE3,0x3D,0xA3,0xCC,0x9F,0x0F,0x90, - 0x01,0x36,0x88,0x99,0x12,0x2D,0x4F,0xBC,0x2A,0x31,0xE7,0x05,0x53,0x55,0x57,0x33,0x20,0xA5,0x80,0x41, - 0x16,0x54,0xC5,0x62,0x52,0x40,0x68,0x9A,0x42,0x29,0x5B,0x61,0x7B,0xAA,0xA8,0x14,0x0E,0x2A,0x7E,0x48, - 0x7F,0x0B,0x07,0x40,0x24,0x62,0x15,0xB2,0xEE,0xAB,0xF0,0xAD,0x9E,0x6B,0xD5,0x72,0xE0,0xB7,0xAE,0x3F, - 0x27,0xFA,0x5F,0x22,0xA1,0x69,0xA9,0x15,0x86,0xAC,0x59,0x73,0x91,0x7C,0x19,0x69,0xC4,0x66,0x3C,0x88, - 0x69,0x88,0x62,0x33,0x3C,0x24,0x2C,0x10,0x20,0xF9,0xDA,0x4E,0x7A,0x85,0x89,0xE3,0xF0,0x02,0x2E,0x5E, - 0x9D,0x25,0x5E,0x4B,0x43,0x25,0x1A,0x7A,0x05,0x6F,0x1B,0x0C,0x8C,0x3A,0xBB,0x4F,0x3B,0x26,0x6D,0xAD, - 0x29,0xE5,0x91,0xEB,0x84,0x6E,0x82,0xE8,0xD3,0x9E,0xE3,0xEC,0x1A,0x3B,0x7D,0xBD,0xCA,0xE2,0xFE,0xFD, - 0x78,0x68,0x24,0xE9,0x0B,0x8C,0xC6,0xAE,0xF3,0x0E,0xA8,0x61,0xE7,0xC5,0x53,0x60,0x69,0x8C,0xFD,0xF9, - 0xD7,0x1C,0xB4,0xD8,0x0B,0x60,0xE6,0x08,0xFF,0x46,0xD2,0x78,0xDC,0x3D,0xF4,0xE9,0x0A,0x4E,0x9B,0x41, - 0x8A,0x63,0x1D,0x89,0x8A,0x7C,0x6B,0x2A,0x18,0x2E,0x12,0xBB,0x6A,0x40,0xB5,0xD8,0x1B,0xEF,0xD8,0xBF, - 0xC3,0x54,0xCB,0x71,0xC3,0x69,0x47,0xFE,0x4A,0x62,0xDC,0x81,0x34,0x60,0xB0,0xC2,0x97,0x35,0xAC,0x4A, - 0xDC,0x7D,0xEB,0x61,0x37,0x9F,0x08,0x90,0x25,0x50,0xBC,0xA3,0x7B,0x35,0xCB,0x54,0x31,0xDE,0x7B,0x0C, - 0xCB,0x20,0xB0,0xB5,0x80,0x39,0x2D,0x5E,0x28,0x00,0x68,0xE2,0xF6,0xC2,0x33,0x39,0xC9,0x1E,0x9F,0x4F, - 0x90,0x53,0xA6,0xAE,0x42,0x11,0x0C,0xB7,0xA8,0x88,0xE3,0x64,0x11,0x4B,0x42,0xA2,0x53,0xB4,0xD7,0xE5, - 0x66,0x24,0xAB,0x15,0xD2,0x83,0x4E,0x2C,0x2B,0x11,0x45,0x36,0x9F,0xBE,0xDB,0x8D,0xE1,0x5D,0xF8,0x0B, - 0x77,0xE5,0xFD,0x3E,0x80,0xBB,0x9D,0xE5,0x30,0x3E,0x24,0x1C,0xF6,0x14,0x8B,0xEE,0xF2,0xDD,0xCD,0x2D, - 0xA3,0xC3,0x49,0x37,0x31,0x1F,0x99,0x93,0xA2,0x47,0xDC,0xF1,0xAB,0xAF,0xF9,0xFB,0x46,0x7B,0x06,0x80, - 0x84,0x23,0x15,0x52,0x20,0x8A,0x92,0x50,0x3C,0xC3,0x70,0x14,0xDC,0xBA,0xCF,0xFA,0xD2,0xF8,0x18,0x21, - 0x82,0x1D,0x16,0x9C,0xD8,0x66,0xFC,0xF6,0xC0,0x48,0x7A,0xEB,0x53,0x0B,0x29,0x35,0xCB,0x1A,0xF7,0x55, - 0xF8,0x7C,0x4A,0x6A,0xB3,0xB6,0xCE,0xFB,0x52,0xEA,0x39,0x20,0x65,0x56,0x2B,0xDF,0x42,0x1E,0x92,0xB7, - 0x69,0xEE,0x62,0xAE,0x7B,0xBC,0x2E,0x8A,0x2B,0x5E,0xEC,0x6B,0xD6,0x63,0xF6,0x2B,0x45,0x0F,0xF6,0x0C, - 0xD4,0x32,0x2C,0xF9,0x23,0xF6,0x5A,0x0A,0xFB,0x5D,0x39,0x60,0x99,0x21,0xBF,0x4F,0xBB,0x5C,0x2F,0x01, - 0xFA,0x13,0xED,0x6A,0x56,0x76,0xF7,0x2A,0x99,0x04,0xF7,0x0D,0x46,0x30,0x1B,0xF8,0x6B,0xCF,0x27,0xF5, - 0x24,0xF0,0x7E,0x9E,0x34,0x2B,0xC0,0x46,0xEB,0xAD,0x0E,0x07,0x67,0x22,0x0A,0x36,0xD3,0x70,0x70,0x01, - 0x53,0xC5,0x29,0xA4,0x26,0x2E,0xFD,0x35,0xE4,0x3E,0xD8,0xBD,0x56,0xEC,0xE4,0x39,0xEF,0x10,0xB1,0x65, - 0x98,0xE2,0x17,0xBB,0x40,0x66,0x91,0x23,0x51,0x72,0x0F,0x8A,0x09,0x8E,0x11,0x87,0xB6,0xC3,0x8D,0x51, - 0x0D,0x91,0xF3,0x8A,0x76,0x18,0xE0,0x4E,0xBA,0x9F,0xBE,0xC2,0xB4,0x0F,0x0A,0x04,0xA4,0xA4,0xF8,0x2A, - 0xB7,0xEB,0x29,0x34,0xF8,0x86,0x50,0xAD,0x64,0xA5,0xF8,0xB4,0x13,0xC3,0xA1,0x7E,0xBE,0xE7,0x9C,0x25, - 0x6D,0x05,0x25,0x73,0xA5,0x66,0xF3,0xA5,0xDE,0xC2,0x45,0x97,0xDA,0xE9,0xD7,0x43,0xF0,0xA7,0x5E,0xD2, - 0x63,0xE5,0x71,0x1D,0xA4,0xE7,0x01,0xD7,0xC3,0x87,0xDD,0xAF,0xC6,0x85,0x22,0x07,0xBF,0x2A,0x92,0x39, - 0x56,0xAC,0xB2,0xD2,0x18,0x53,0xD5,0x64,0x23,0x56,0x0D,0x8E,0x3E,0xC9,0x42,0x38,0x03,0x6D,0x32,0x1E, - 0xFC,0xF6,0xD8,0x74,0xE4,0x87,0xFB,0x0A,0x98,0xFA,0x9C,0xC9,0x60,0x37,0xD3,0xD7,0xDC,0xEC,0x94,0x2A, - 0xDF,0x24,0x2B,0x13,0x41,0x29,0x78,0x3D,0x05,0xB9,0x0F,0x5D,0x66,0x8E,0x42,0x4E,0x79,0x8C,0x22,0x57, - 0xE2,0x97,0x0A,0xCA,0xB1,0x73,0x72,0x62,0xA0,0xA0,0xD0,0x4A,0x70,0xAD,0xB2,0x5B,0x05,0xC0,0x12,0x7D, - 0xCC,0xC2,0x6A,0x38,0xA3,0xF6,0xC0,0x6E,0x73,0x8D,0xE3,0x46,0x33,0x57,0x1B,0xA9,0x4D,0x8A,0x70,0xEB, - 0x82,0xD4,0x4B,0x5F,0xF0,0x8F,0x70,0xBF,0xBD,0xB4,0x13,0x19,0xE9,0xCE,0x04,0x0D,0x38,0xF1,0x74,0xB3, - 0x0E,0x3F,0xE5,0xE0,0xCB,0xD2,0xCB,0x07,0xAE,0xDD,0x8C,0x48,0xD8,0xFD,0x6B,0xA8,0x4E,0x43,0x12,0x93, - 0xBA,0xB5,0xC3,0xCC,0x4B,0x0E,0xEB,0x56,0x5F,0x5A,0xE5,0x81,0xD8,0x39,0x45,0x07,0x49,0xB1,0xCE,0xDC, - 0x8C,0xDF,0x48,0xE0,0xF2,0x42,0xE5,0x62,0xBB,0x06,0xA9,0xD0,0x33,0xA3,0x82,0x82,0xB7,0x7C,0x2C,0xB6, - 0x75,0x62,0x9E,0xA4,0xCD,0x37,0xE5,0x36,0x32,0xFB,0x2D,0xEA,0xC3,0x5D,0xD4,0xCF,0x97,0x92,0x3C,0xDA, - 0x31,0x38,0x6C,0xA5,0x3D,0xBE,0xF9,0xC9,0x8C,0xF7,0xEE,0xEE,0xE6,0x99,0x64,0xA5,0x4D,0x55,0xC5,0x39, - 0xDD,0xB4,0x77,0x83,0xEA,0x96,0x41,0x0D,0xB5,0x16,0xB9,0x73,0x06,0x87,0x6B,0xD5,0xCF,0x1C,0x47,0x0C, - 0x90,0x97,0x29,0xA5,0xB4,0x07,0x78,0x12,0xE9,0x3C,0x19,0x2E,0xD9,0xD8,0x75,0xD4,0x06,0xAA,0xEF,0x41, - 0xD9,0x57,0x8A,0xF8,0xD2,0xFA,0x4E,0x87,0x0E,0xA6,0x28,0x36,0x86,0x8B,0xEA,0x36,0xD8,0x56,0xE4,0x8D, - 0x64,0x28,0x4B,0x8D,0xB4,0xD6,0x49,0x26,0x8F,0x9A,0xE7,0x27,0x59,0x55,0x49,0xF9,0x5A,0x66,0x17,0x60, - 0x9F,0x16,0x05,0x0A,0xF7,0x74,0xAC,0x37,0x58,0x54,0x40,0x6B,0x52,0x9F,0xA6,0xCB,0xBE,0xAD,0x5F,0x94, - 0xFF,0x91,0xFC,0xCE,0xEF,0x98,0x48,0x7A,0x53,0x9E,0x96,0x9E,0xDF,0xC2,0x7B,0x0C,0x92,0x54,0xDE,0xFF, - 0x3A,0x32,0xE0,0xC3,0x2E,0x9C,0xBE,0xDB,0x1B,0x15,0xE0,0x14,0xBA,0x09,0xFF,0xFF,0x1D,0x34,0xE8,0xCA, - 0x67,0x2E,0x5E,0x3D,0x8C,0x3F,0x7B,0x9B,0xAB,0x74,0x10,0x8D,0x7F,0x8F,0x04,0x04,0x40,0x10,0xB8,0x2C, - 0xB3,0x8C,0x10,0xDC,0xC1,0x02,0x13,0x62,0x44,0x2C,0x68,0x0D,0x88,0x8C,0xCE,0x12,0x32,0x61,0xBF,0xB1, - 0xC1,0x80,0x80,0x04,0x72,0x20,0x41,0x21,0x81,0x06,0xF9,0xEF,0x79,0x66,0x16,0x1E,0x14,0x40,0x94,0xA1, - 0x8C,0x4A,0xD2,0x10,0x0F,0x0A,0xCF,0x12,0x30,0x30,0x79,0x71,0xDC,0x4E,0x59,0x28,0xDD,0x98,0xEF,0x1E, - 0xB7,0xD8,0x44,0xA2,0x36,0x4A,0x0E,0x52,0x46,0x08,0xD4,0x23,0x51,0x6B,0xD8,0x97,0x01,0xF0,0xA8,0x14, - 0xA3,0x28,0x7F,0x81,0xDF,0x05,0xDC,0x33,0xD2,0x6B,0x29,0x83,0x04,0xF3,0x81,0x7A,0x9A,0x4A,0x30,0x6F, - 0x12,0x32,0x41,0xA2,0xD0,0x93,0x4D,0x16,0x02,0x09,0xB7,0xD5,0x5B,0x99,0xB1,0xFB,0xE1,0x91,0xE7,0x55, - 0xF0,0xC7,0x71,0x2F,0xF7,0x82,0xFA,0x28,0xA6,0x08,0xFE,0xBA,0x40,0x42,0x13,0xA8,0x04,0x91,0x40,0x85, - 0xFE,0x84,0x2E,0x7E,0xF2,0x26,0x1A,0xC5,0x49,0x92,0x61,0xB8,0x05,0x9C,0xD4,0xA9,0x61,0x3A,0x02,0x06, - 0x1C,0x7E,0x54,0xD0,0x48,0xD1,0xA9,0xC2,0x23,0x95,0xEF,0x3E,0xA8,0x2B,0x3F,0x7F,0xBD,0x21,0x33,0xBD, - 0x91,0xBE,0xA1,0xC2,0x2E,0x29,0xE1,0xB6,0xD6,0xF3,0x86,0x5F,0xCD,0x6E,0x2D,0x95,0x4A,0x42,0xD2,0x9D, - 0x96,0x4C,0xB1,0x5D,0x60,0x72,0x7D,0x63,0x15,0xF8,0xB6,0xF8,0xB7,0x6D,0x6D,0x58,0xD4,0x6F,0x1D,0xA6, - 0xB0,0x0D,0xE5,0x92,0x94,0x68,0x3B,0xEF,0x36,0x0F,0xD3,0xAF,0x59,0x28,0x49,0xA8,0x34,0x4D,0x0B,0x66, - 0x91,0xBA,0xF7,0x3B,0x48,0x9B,0x6C,0x7C,0x56,0x63,0x2A,0x86,0xB1,0x4C,0xFC,0xEA,0xE6,0x78,0x54,0x48, - 0x91,0x5B,0xAE,0x57,0xA6,0xDF,0x31,0x4E,0xCC,0x15,0xF4,0xFE,0xE3,0x99,0x9C,0x40,0xA7,0x1E,0xE2,0x2E, - 0x9A,0xB4,0x2B,0x86,0x35,0xEC,0xFD,0xEE,0x6A,0x7A,0x17,0x51,0x08,0x56,0x72,0x54,0x2A,0x62,0xFE,0x60, - 0xA3,0x13,0xF5,0xB1,0x34,0xC6,0x1C,0x57,0xE5,0xA3,0xE3,0x82,0x9A,0xD6,0xB9,0xDC,0x00,0x0B,0x54,0x40, - 0x6E,0x90,0xF0,0x10,0x6A,0x5B,0x44,0xE5,0x52,0x74,0x12,0x3F,0x2F,0xBE,0x48,0x50,0x67,0x1B,0x18,0x82, - 0x4D,0xAA,0xDC,0xF4,0x73,0x75,0x3A,0x30,0x1D,0x84,0x85,0xC5,0xB6,0x32,0x95,0xFC,0x5C,0x13,0xD5,0xE5, - 0xF2,0x76,0xB0,0x71,0x81,0x08,0x8D,0xD4,0xB7,0x33,0x35,0x33,0x65,0xA2,0xDD,0xF5,0xF3,0x77,0x58,0x09, - 0x0E,0xB5,0xD8,0x26,0x30,0x3E,0x5B,0x07,0x60,0x98,0x17,0x5F,0x98,0x34,0x8E,0x09,0x2B,0xB4,0xF6,0x5A, - 0x89,0x77,0x26,0x9C,0x6A,0x19,0x35,0x54,0x3D,0x15,0x43,0x18,0xA2,0x11,0x8F,0x6A,0xDB,0x1A,0x32,0xAF, - 0x7C,0x3E,0xF6,0xD6,0x2D,0xE7,0x4B,0xC8,0xAB,0x10,0x38,0x1F,0xBC,0x5B,0xA1,0x9D,0x57,0x84,0x4B,0xE3, - 0xD7,0xA7,0x39,0xF6,0xDD,0xE9,0x42,0x48,0x6A,0x84,0xC6,0x48,0x76,0xDD,0xD6,0xEC,0x7A,0x7C,0xF9,0xFC, - 0xA4,0x1F,0xF7,0x5E,0x3A,0x5F,0x0B,0xC7,0x09,0x1F,0xDE,0xFC,0x7B,0x7D,0xB8,0x0B,0x29,0x58,0x07,0xC1, - 0x44,0x3A,0x07,0x69,0xFC,0xEB,0xD7,0xED,0xFA,0x7E,0xF8,0xD8,0x26,0x13,0xF7,0x0D,0x54,0x30,0x59,0xAD, - 0x02,0x6E,0xDF,0xFD,0xFB,0x7F,0xA3,0x5D,0x47,0x8C,0x22,0x11,0xB7,0x90,0x8F,0x13,0x4E,0x6F,0x33,0xAC, - 0xB5,0x1F,0x20,0xB8,0xE4,0xE7,0x53,0x03,0xB8,0x0E,0x46,0xB2,0xC7,0xC9,0x82,0xC9,0xA2,0xA3,0x37,0x61, - 0xA5,0x97,0x1F,0x8E,0xB0,0xD5,0x75,0x5D,0xAE,0xC0,0x4A,0xA3,0x88,0xB4,0x9D,0xFD,0x64,0xE5,0xD1,0x1E, - 0x38,0x91,0xB4,0x51,0x85,0xCC,0xB9,0x23,0xF1,0x8D,0x3E,0xAD,0x4C,0x2F,0xA0,0x62,0x99,0xA6,0x7F,0x7D, - 0x13,0x86,0x98,0x19,0x74,0xE9,0x17,0xA3,0xB8,0xD7,0x80,0xD4,0x16,0x5B,0x81,0x61,0x12,0x81,0xFC,0x6A, - 0xD4,0xEB,0x9C,0x5B,0xA4,0x99,0x56,0x46,0x1B,0xAA,0xF6,0x47,0x3B,0xCF,0xF7,0x7A,0x28,0xE6,0x4A,0xAD, - 0x5F,0x78,0xB3,0x4E,0x34,0xA1,0x5F,0x2A,0x4B,0xCA,0x19,0x48,0xF3,0x89,0x96,0xE0,0xED,0xEE,0x32,0x05, - 0x98,0xFC,0x12,0xE4,0xCE,0xC0,0xF2,0x11,0x54,0x84,0x03,0x54,0xC4,0xED,0xD2,0xEE,0x15,0xCF,0x5A,0x7A, - 0x58,0x44,0x1D,0xA9,0x36,0x4F,0x97,0x41,0x45,0xCE,0x07,0x7D,0x12,0x05,0xBE,0xDB,0xC0,0xC5,0x9B,0xED, - 0x08,0x2C,0x82,0xF9,0x21,0x97,0x3B,0x70,0x43,0x04,0x43,0x48,0xC7,0x63,0x3B,0xCE,0x1F,0xAB,0x3C,0xA5, - 0x34,0x8F,0xEA,0xB5,0xBF,0x2B,0x2A,0x6F,0xC1,0xC8,0xB2,0x51,0x56,0x80,0x68,0xAB,0xB0,0xCF,0xCA,0x5A, - 0x60,0xAD,0x2A,0xFB,0x57,0x69,0x1A,0x41,0x7B,0xEB,0x98,0x4E,0xE5,0xF1,0xE4,0x5F,0xE1,0x8E,0x77,0x2C, - 0x48,0xEC,0xDB,0xAD,0x5D,0xE0,0x35,0xB4,0xC5,0x24,0x83,0x9D,0x19,0x5A,0xF0,0x7D,0x07,0x77,0xF3,0xA0, - 0x3E,0xE0,0xDC,0x00,0x25,0xF2,0xFE,0x9B,0x97,0xB6,0xB4,0xC5,0x40,0xE4,0xDD,0x4D,0x9F,0x44,0x14,0xC2, - 0x27,0x9E,0x2C,0x74,0x94,0x3B,0xD8,0x96,0x98,0x65,0x3C,0x70,0xE7,0xF2,0x1D,0xD3,0xB4,0x9D,0x2D,0x83, - 0x15,0x3A,0x95,0xAD,0x68,0x5F,0x16,0xBD,0x9F,0x86,0x4D,0xD3,0xB8,0x1E,0x56,0x75,0x37,0xFB,0x45,0x81, - 0x55,0xDC,0x5E,0x4C,0x1C,0x54,0x0C,0xDC,0xE0,0x60,0xDC,0x16,0xCB,0xBB,0x36,0x93,0x04,0xDF,0xF4,0xE6, - 0x76,0xF4,0x32,0x40,0x23,0x3A,0xE8,0x34,0xB5,0xBD,0x1E,0xF6,0x66,0xF7,0xFC,0xF6,0x77,0xF5,0x83,0xB1, - 0x4D,0x30,0x85,0x87,0x58,0x3D,0x34,0x90,0xDC,0xBA,0xF5,0xE7,0xF6,0xF6,0x8E,0x20,0x79,0x3C,0x18,0x35, - 0x93,0xB1,0xBD,0xF3,0x83,0xD3,0xFD,0xF7,0xF7,0xF7,0x5E,0x08,0x2D,0xC0,0x20,0x7E,0x60,0xB7,0x99,0xB0, - 0xCF,0x5D,0xB8,0x1C,0x5F,0x38,0xEA,0xDC,0x35,0x22,0xA4,0x9A,0x9E,0xB4,0x0C,0x86,0x9A,0x98,0x9E,0xAE, - 0xC9,0x2E,0x25,0x69,0x8E,0xAA,0xC7,0xCB,0xF8,0xB7,0x26,0xF5,0x34,0xD5,0xED,0xF5,0x4B,0x85,0x37,0x63, - 0xAD,0x60,0xE5,0x61,0x1E,0xF7,0x11,0x59,0x5E,0xBE,0x0A,0x00,0x20,0x86,0x01,0xC2,0xC5,0x0A,0xEE,0xF9, - 0x9F,0x63,0x75,0xD5,0x0C,0x9E,0xF6,0xEE,0x7E,0xFC,0x51,0x85,0xFB,0x58,0x42,0x40,0xB2,0x4B,0xC9,0x4A, - 0x69,0x3D,0xFE,0xFE,0x7F,0xFD,0xCC,0xB1,0x7B,0x62,0x87,0x8F,0x52,0xB3,0xF3,0xEE,0x6E,0x7E,0xF7,0xEF, - 0xFE,0xFE,0xC8,0xEC,0x44,0x3A,0xE7,0xDA,0x30,0xBB,0xAF,0x13,0x4C,0x54,0xFF,0xFF,0xCD,0x90,0x80,0x00, - 0x55,0x40,0xF8,0x86,0x98,0x71,0x69,0xF0,0x0C,0xC1,0x2C,0x2D,0xF3,0x05,0x88,0x89,0x0B,0x41,0xD2,0xEB, - 0xB2,0x63,0x32,0xE0,0x1D,0xC9,0xBD,0x32,0xC5,0x05,0x01,0x25,0x05,0x02,0xF9,0x87,0x18,0x7A,0x12,0x6B, - 0x4D,0x21,0x7E,0xCB,0x50,0xEB,0x09,0x0D,0x87,0x03,0x18,0x49,0x14,0xD6,0x09,0x7B,0x4D,0x4B,0xA1,0x12, - 0x36,0x73,0x6E,0x47,0xD3,0x0B,0x7D,0x5A,0xB1,0xA1,0x28,0x91,0xE1,0x54,0x04,0x8B,0x50,0x8A,0x61,0x0A, - 0xCA,0x61,0x6F,0xB6,0xF3,0xD9,0x8C,0x8B,0x42,0xA5,0x65,0xFF,0xEC,0x95,0xF5,0x0B,0x4B,0x42,0x3A,0x6E, - 0x31,0x5B,0xEE,0x5C,0x3D,0xFB,0x55,0xEE,0xD3,0xE6,0x62,0x8E,0x36,0xD9,0xE7,0xB7,0xE7,0x9B,0x38,0xB1, - 0x87,0xE9,0xB0,0x06,0x32,0x58,0xC3,0xAC,0x2C,0x48,0x42,0x35,0x80,0x2E,0x10,0xDA,0x0F,0x4C,0x7D,0xC2, - 0xD8,0x72,0x99,0xBC,0x2D,0x49,0x3E,0x0C,0xBA,0x6B,0x20,0x3A,0x55,0x69,0xA2,0x1B,0xFE,0x79,0x10,0x3A, - 0x8E,0x0A,0x0B,0xA1,0x79,0x25,0x17,0x7D,0x2F,0xB4,0xB6,0x2B,0x4C,0x0E,0x08,0x31,0x8F,0x0B,0x9C,0x01, - 0x45,0xB3,0x9B,0x29,0xD9,0x49,0x74,0xD3,0x59,0xF3,0x7B,0x4A,0x95,0x38,0x97,0xB2,0xFB,0xBF,0x2A,0x8E, - 0x6E,0x20,0x2B,0x48,0x69,0x7E,0xAE,0x7F,0xAC,0x1D,0x61,0xED,0xB8,0x92,0x22,0x16,0x6F,0x01,0x0E,0x82, - 0xA2,0x0E,0xE3,0x47,0x06,0x83,0xB8,0x23,0x7A,0x9F,0x32,0x92,0x96,0xE0,0x6C,0x50,0x25,0xB3,0xA4,0xB2, - 0x0B,0x93,0xF1,0xE5,0x68,0x6E,0x35,0x03,0xE9,0xA2,0xA4,0x07,0xF5,0xF0,0x04,0x80,0x78,0xF8,0x88,0x90, - 0x93,0x36,0x2C,0xC0,0xD0,0x58,0xB1,0xA2,0xE4,0x14,0xDE,0xB0,0x26,0xE9,0xF4,0x16,0x38,0xB1,0xE5,0xC2, - 0xEF,0x34,0x28,0xFE,0xB8,0x35,0x4F,0x28,0x82,0x11,0x89,0x94,0xD3,0xC2,0x64,0xD3,0x6E,0x37,0xAE,0x4B, - 0x11,0x14,0x02,0x1D,0x24,0xE6,0xF5,0x91,0xED,0x4B,0x64,0xC3,0x6F,0x36,0xB4,0xEF,0x38,0x17,0xE4,0xE5, - 0xA0,0x34,0xC7,0x37,0xB6,0xE9,0x2F,0xE2,0x6E,0x16,0x2B,0x9A,0x5C,0xAB,0xC9,0x6E,0x23,0x24,0xB3,0xAE, - 0xA9,0xAA,0xDA,0xB7,0x82,0xA3,0x08,0xAE,0xE2,0x16,0x75,0x24,0x50,0x16,0x20,0x3B,0x4B,0x60,0xD5,0xB5, - 0xC0,0xF8,0xEA,0x40,0x09,0xEA,0xF2,0xCA,0x00,0x93,0x4A,0x06,0x10,0xF9,0xA2,0x83,0x35,0x88,0xF4,0x75, - 0x3C,0x97,0xC6,0xB1,0xB0,0xB3,0x38,0x85,0xDF,0x28,0x3F,0xFB,0xEC,0x44,0xBD,0x4E,0xD4,0x64,0xFD,0x69, - 0x33,0x19,0x30,0x95,0x9E,0x29,0x66,0x9F,0xF8,0xF5,0xB0,0xBB,0xA8,0x87,0x37,0x37,0xC3,0x08,0x68,0x63, - 0x38,0xF2,0xBE,0xFA,0x64,0x06,0xB9,0xAB,0x69,0xE6,0x51,0x50,0xBB,0xB0,0x60,0x73,0x39,0xE8,0xBF,0xF3, - 0x7C,0xF7,0xA2,0x63,0x14,0x7F,0xB9,0xF3,0x89,0x5D,0xFC,0x92,0x85,0xB1,0xC6,0x82,0xB6,0x53,0x33,0x96, - 0xEC,0x61,0x36,0xD0,0xD6,0xEC,0xB3,0xF6,0xBF,0x7C,0x6C,0xC0,0x98,0x60,0x3B,0x07,0x8A,0x2B,0x7D,0x93, - 0x19,0xB5,0xE8,0x23,0x5B,0xA2,0x65,0xB3,0x76,0x51,0xB2,0xAD,0xEE,0xC3,0xB0,0xA7,0x85,0xC0,0xBE,0xDD, - 0x32,0x08,0xFC,0x1B,0x0B,0xCE,0xA4,0x97,0x61,0x60,0xE0,0xA6,0x22,0xC0,0x60,0x82,0xF7,0x5B,0x20,0x62, - 0xC4,0xC6,0x90,0xE0,0xD4,0xBF,0x82,0xB6,0x23,0xC1,0xF6,0xBC,0x45,0xEF,0x3C,0xB5,0x64,0x56,0x98,0x5F, - 0xD5,0xAE,0x21,0x97,0x80,0x53,0x74,0x83,0xE8,0xD9,0xA4,0x3D,0x25,0x19,0x91,0x71,0x54,0x6C,0x29,0x3A, - 0xCD,0x39,0x98,0x95,0x94,0xEC,0x8D,0xCC,0x86,0x30,0x99,0x92,0x55,0xE1,0x41,0xA0,0xFB,0x8D,0xBE,0xA4, - 0x06,0x0F,0x75,0xC4,0x8D,0x49,0xDD,0xC3,0xCF,0xE6,0xC4,0x58,0xA4,0x38,0x17,0x28,0x39,0x7A,0x1B,0x88, - 0xB2,0xC6,0x19,0x36,0x1B,0x78,0x65,0x5F,0xD3,0x8F,0x41,0x47,0x6B,0x57,0xDD,0xF8,0x3D,0x4B,0x1F,0x76, - 0x48,0xDB,0x7B,0x57,0x65,0x07,0xC6,0xF2,0x4E,0x3B,0xC7,0xE2,0x61,0x69,0x1C,0x8D,0x6E,0xB1,0xB2,0x0A, - 0x0C,0xC8,0xF8,0x0F,0xBF,0xE4,0x62,0x59,0x54,0x42,0x92,0x18,0xDC,0xB5,0xBA,0x1A,0x0D,0xC9,0x99,0x9C, - 0x14,0x49,0x8E,0x5A,0x45,0x19,0x9A,0xF0,0xDD,0xA4,0x23,0x27,0x09,0xFB,0x10,0xC9,0x20,0xE4,0xF4,0xD5, - 0x2D,0xAC,0x93,0xA1,0x5C,0xFF,0x2B,0x87,0x8D,0x8B,0xF1,0x0B,0x3E,0xAD,0x94,0xEB,0x4C,0x6A,0x9B,0x71, - 0x5D,0x88,0x62,0x8A,0xB4,0x23,0x36,0x14,0xD7,0xE8,0x48,0x2D,0x90,0x33,0x8F,0x73,0xCD,0xE1,0x18,0x4A, - 0x0F,0x87,0xD5,0xD0,0xEE,0x9B,0xFA,0x2E,0xC2,0x40,0xD1,0x91,0x7B,0x46,0xC3,0x24,0xEE,0xCE,0x37,0x1C, - 0x1A,0xD8,0x49,0xF5,0x39,0x8C,0xC9,0x24,0x69,0x63,0xDC,0x7E,0xA3,0x27,0xD5,0x59,0x0D,0xA7,0x1C,0x80, - 0x2E,0x59,0x83,0xFF,0x22,0x1E,0x01,0x82,0x4F,0xB4,0x85,0x80,0xE4,0xD4,0x90,0xEC,0xBB,0xED,0xB3,0xAD, - 0xF0,0xA4,0xAC,0x92,0x94,0x1C,0x43,0x78,0xB5,0xF2,0x63,0xFA,0x1A,0xF1,0x46,0xBE,0xAA,0xCE,0xDA,0x87, - 0xA4,0xF7,0x1B,0x8E,0x17,0xD7,0xDE,0xD4,0x64,0x05,0x11,0xD5,0x7A,0x97,0xC9,0xB4,0x16,0x1E,0x11,0x9E, - 0x52,0xA3,0xFD,0x82,0x20,0x9D,0x86,0x59,0x4D,0xFC,0x5F,0x67,0xD5,0x49,0xE4,0x0F,0x80,0xB4,0x0F,0xEC, - 0xC5,0x69,0x73,0x35,0xD5,0xAA,0x6A,0x28,0xD2,0x23,0xCE,0x89,0xE2,0x09,0xDF,0x10,0x87,0x69,0xD7,0x18, - 0x96,0xE9,0x02,0xB9,0x34,0x9E,0xF2,0xBD,0x2A,0xB9,0x47,0xDB,0x15,0x8B,0xCF,0xBC,0x49,0x7B,0x96,0xCE, - 0x6C,0x98,0x96,0xA4,0x14,0xCB,0x4C,0x11,0x7B,0xD8,0x80,0xD3,0x4A,0x01,0xC2,0xAD,0x2D,0xF8,0x49,0x60, - 0xBC,0xA3,0xB6,0xD8,0xEE,0xDC,0x89,0x41,0x58,0xCC,0x2F,0x45,0xCE,0x9D,0x41,0x70,0xBD,0xB2,0xB2,0x4A, - 0x92,0xD6,0x47,0xDC,0xD1,0xE5,0xDD,0x89,0xA4,0xD5,0x1B,0x86,0x1B,0xAA,0x3B,0x49,0x6E,0xDE,0x17,0xA1, - 0x70,0x67,0x3A,0xE9,0x23,0xFE,0x8E,0x99,0x6D,0xDF,0x05,0x9C,0x4E,0xBE,0x91,0xB9,0x6C,0x67,0x5B,0xB8, - 0xFB,0x23,0x9B,0x26,0x2C,0x41,0x44,0xD3,0xBF,0xCF,0x88,0x0C,0xCB,0x2A,0x16,0xA4,0xEF,0x9C,0x15,0xA5, - 0x11,0x02,0xD9,0x18,0x8F,0x4C,0x76,0x1C,0xCE,0x6B,0xF7,0xB0,0x1D,0x31,0x70,0x30,0x4B,0xDD,0x61,0x09, - 0x15,0xE3,0x7F,0x0D,0x47,0x48,0x87,0x43,0x58,0x2A,0xD4,0x7A,0x4C,0xC2,0x50,0x4A,0x4C,0x40,0xF1,0x1D, - 0xDB,0xE2,0x18,0x1D,0xF1,0x6C,0x44,0xD4,0x1C,0x3B,0x2A,0xC8,0x5D,0x0F,0x23,0x44,0xD0,0x20,0x77,0x6E, - 0x0F,0xDE,0xD3,0xBF,0x6A,0x01,0x59,0xD6,0x36,0x16,0xB8,0x38,0xB8,0xFB,0xC5,0xFB,0x79,0x60,0x8F,0xE3, - 0xA3,0xBC,0xB9,0x11,0x47,0x92,0x22,0x44,0x04,0xF8,0xB6,0x94,0x7E,0x1D,0x54,0x14,0xA6,0x27,0xC6,0x99, - 0xFE,0x83,0x75,0xA7,0xCD,0x6B,0x12,0xBE,0xA5,0x02,0x55,0x82,0x90,0x27,0x70,0x99,0xE3,0x27,0x54,0xE0, - 0x44,0xF3,0x28,0x52,0x12,0x08,0x98,0x4C,0x4B,0x23,0x8D,0xF2,0xC3,0x06,0x1F,0x32,0x5B,0x2B,0x61,0x08, - 0x23,0xD9,0xC4,0x36,0xAA,0x29,0xB1,0x69,0xE0,0x56,0xEB,0x9A,0xD4,0x97,0x36,0x2F,0xB0,0xD6,0x99,0x48, - 0x7A,0x76,0x61,0x82,0xFB,0x22,0x6E,0xF1,0xAF,0x84,0x7E,0x2C,0xB9,0x01,0xDF,0xDF,0x6F,0x28,0x4D,0xD7, - 0x4E,0xB9,0x16,0xDD,0x0B,0x18,0xF5,0x66,0x27,0xD6,0x9A,0xF4,0x4D,0xB2,0xE0,0xC9,0x64,0x29,0xD8,0x2F, - 0x0A,0x66,0x84,0x76,0x05,0x69,0x5C,0x45,0x9E,0x6A,0x57,0x5B,0xFB,0x0E,0xAD,0x4D,0xB0,0xF0,0x34,0xBC, - 0x72,0x96,0x78,0xE4,0x6E,0x50,0x7B,0x3B,0xD8,0x46,0xB9,0xD5,0xEA,0xA4,0xBA,0x33,0x1A,0x43,0xBA,0xCE, - 0x38,0x9C,0x6A,0x9B,0x7E,0x4A,0xB2,0xD2,0x5A,0xB1,0xB1,0xDA,0x8B,0x55,0xEC,0x75,0x2F,0x2B,0x83,0x8E, - 0xE7,0x40,0x4A,0xBB,0x59,0x98,0x23,0x4B,0x97,0x03,0xF9,0xAF,0x1A,0x1E,0x73,0x85,0x6B,0x55,0xAB,0x4A, - 0x27,0x61,0x73,0xA2,0x7E,0x14,0x9B,0x44,0xF8,0x0F,0x02,0x81,0x2C,0x54,0xDF,0x3A,0x5A,0x61,0x94,0xAA, - 0xA4,0xB4,0x7E,0xF6,0xDB,0xCA,0xC9,0x50,0x81,0xEF,0x11,0x63,0x99,0xFB,0x64,0x96,0x27,0x91,0x58,0x12, - 0x37,0x54,0x8F,0xCD,0xE3,0x55,0xFE,0xB1,0x70,0x91,0xA1,0x63,0x23,0x76,0xE5,0x87,0x95,0x3F,0xD5,0x9C, - 0xEA,0x10,0xF7,0xA5,0x19,0x19,0x44,0x15,0xE1,0x09,0xB5,0xB3,0x58,0x75,0x12,0xD3,0xEF,0x31,0x42,0xB0, - 0xF7,0x01,0xBB,0x22,0xA0,0x23,0x04,0xB6,0x1C,0xBC,0x1C,0xE4,0xE5,0xC5,0x47,0x7A,0xBA,0x85,0x39,0x51, - 0x80,0x98,0x74,0x2A,0xF2,0x56,0xA7,0x72,0xE3,0xBC,0xBF,0xF0,0x98,0xB0,0x85,0xA3,0xE2,0x10,0xE5,0x3A, - 0x81,0x26,0x35,0xE3,0xD3,0x5B,0x32,0x16,0x28,0xDD,0x33,0x08,0x48,0xEF,0x19,0x05,0x32,0xCF,0x65,0x0A, - 0x16,0xF8,0xA3,0xC2,0x98,0xD2,0xC6,0x98,0x3B,0x5A,0x85,0x64,0x43,0xF3,0x5C,0x15,0x66,0x1E,0xE3,0xAF, - 0xAA,0x7E,0x34,0x1F,0x85,0xB5,0xB0,0xFD,0x51,0x30,0x1A,0x5E,0xEB,0x5D,0x9F,0x5E,0x90,0x52,0x05,0x41, - 0x49,0x71,0x83,0xAD,0xE8,0x0A,0xD4,0x41,0xAD,0xD1,0xB7,0xFD,0x59,0xF2,0xAB,0xCA,0x0A,0xB7,0xF1,0xFD, - 0x58,0x94,0x57,0xDB,0x81,0x56,0xE6,0xCF,0xC2,0x88,0x38,0x3C,0xA8,0x18,0x39,0xBF,0x6B,0x9D,0xC0,0x93, - 0x81,0x4D,0xD7,0x1F,0x9A,0x30,0x5C,0xC9,0xC0,0xC7,0xB0,0x95,0x04,0x1D,0xC9,0xA4,0xE9,0x59,0xB8,0x4C, - 0x90,0xC9,0x8D,0xAB,0xE9,0xEE,0xFF,0x90,0xFB,0x3F,0x47,0xD1,0xB2,0x1C,0xB6,0xAA,0x13,0x5D,0x31,0x80, - 0x4A,0x04,0xF8,0x08,0x47,0xA5,0x41,0x9B,0x00,0x6E,0xE1,0x5D,0x39,0x7F,0xF4,0xF8,0x97,0xAF,0xA4,0xEA, - 0x94,0x9B,0x50,0x21,0x01,0xCF,0x8E,0x46,0x3C,0xC9,0x72,0x13,0x8B,0x3E,0xB8,0x92,0x11,0xA0,0x58,0x31, - 0x08,0xCE,0x1F,0xD7,0x53,0xE1,0xB1,0x71,0x0A,0x1D,0x57,0xFB,0x94,0x59,0x51,0x21,0xDD,0xCF,0xCF,0xC7, - 0x3F,0x98,0x73,0x17,0x0B,0x5C,0xC9,0x15,0xB0,0xAE,0x59,0x31,0xD0,0xCE,0x6B,0x45,0x2A,0xA1,0x34,0xA4, - 0xFF,0x94,0x98,0xAE,0x52,0x09,0xA9,0x14,0xB9,0x69,0x53,0x5A,0x8A,0x15,0xAC,0xD6,0x67,0x72,0xD6,0x7A, - 0xB0,0x7E,0xBD,0x01,0x73,0x33,0xC6,0xC6,0x3C,0xEA,0x99,0x05,0x7A,0xCA,0xF4,0xA1,0xA5,0x46,0x64,0x24, - 0x18,0xCE,0xD2,0xC7,0x0E,0xC5,0x09,0x51,0x6D,0x8A,0xC9,0xAA,0xAA,0x3C,0x71,0xE7,0xF4,0x5C,0x79,0x45, - 0xBF,0x16,0x78,0x0F,0x82,0x77,0xE8,0x93,0xF7,0xA1,0x52,0x29,0x5D,0xC7,0x27,0x7B,0xB5,0xE3,0x15,0xF8, - 0xA1,0x54,0xD4,0x7F,0xB1,0xA4,0x5A,0x39,0x54,0xC6,0x9C,0xDC,0x72,0x46,0xB3,0x71,0x2F,0xEF,0x17,0x6D, - 0xDF,0x58,0x53,0x29,0xD1,0xC7,0x95,0xCE,0x7F,0x6F,0x53,0x3C,0x70,0x84,0xE1,0x02,0xAE,0x50,0xE0,0x38, - 0xB2,0x53,0xE1,0x6E,0xF2,0xE2,0x02,0xE1,0x08,0x83,0xC2,0xB7,0x6F,0xEE,0xC8,0x95,0xA7,0xFD,0x0D,0x1D, - 0xFD,0x4F,0x6C,0x25,0x4C,0x76,0x9B,0xDA,0x2F,0xAA,0x44,0x56,0x91,0xC7,0x1C,0x0C,0xB4,0x4B,0x5B,0xB4, - 0xA0,0xC8,0x71,0x1B,0x98,0x2C,0x9F,0xF4,0xCD,0x5E,0x60,0x9C,0x18,0x1A,0x13,0xBB,0x83,0x04,0x2B,0xC2, - 0xD5,0xEA,0xFD,0xFF,0xAB,0x43,0xA5,0xED,0xDB,0x4B,0x80,0xC8,0xED,0xD4,0xB8,0x6E,0xB4,0x7B,0x22,0xC0, - 0x8F,0x7B,0x48,0xCC,0x1C,0xFD,0x88,0xC1,0x86,0x3D,0x53,0x65,0x7A,0xB7,0xB8,0x43,0x0E,0xD9,0xC5,0xC4, - 0x4E,0xD9,0x0C,0x61,0x08,0x3E,0xA1,0x6F,0xCB,0x7F,0xD9,0x31,0xE5,0xDA,0xF0,0x40,0x1D,0xF9,0x89,0xD9, - 0x6C,0xD7,0x8D,0xEB,0x14,0x6C,0x5D,0xB1,0xA6,0xDE,0x41,0xDD,0x9D,0xFE,0x62,0x24,0xCF,0x4E,0x24,0xFA, - 0xDD,0xAF,0xC0,0x80,0x8D,0x85,0x8A,0xFC,0x1D,0x80,0x93,0xEC,0x84,0xD7,0xEF,0xC6,0xD6,0x0A,0xBC,0xCA, - 0x8C,0xD3,0x1F,0x0D,0xE6,0x88,0x3B,0x21,0xD8,0x13,0x3A,0xB1,0x09,0xB7,0xAA,0x93,0x91,0xD6,0x71,0x21, - 0x64,0xF5,0x7E,0x91,0x25,0x9F,0xCD,0xD3,0x4F,0x2D,0x5D,0x8A,0x46,0x5D,0xD4,0xC1,0x15,0xE7,0x0F,0xAE, - 0xCC,0x39,0x62,0x0B,0x7F,0x4A,0x6F,0xB8,0x8B,0xDE,0xF3,0x49,0x4F,0x50,0x56,0x2B,0xA1,0x36,0xEA,0xED, - 0x1C,0xD7,0x1A,0x4C,0xEF,0xDD,0xE7,0xFF,0xD8,0x78,0x87,0x78,0x28,0x37,0xD9,0x57,0x9C,0xF8,0x17,0x6E, - 0x4D,0xC1,0x0F,0x1D,0xF0,0x8A,0x8B,0xBF,0x28,0x0A,0xC9,0xFE,0xBC,0x3B,0xB4,0xD9,0x2C,0xB9,0xBF,0x59, - 0xEF,0xB6,0x90,0x3A,0x26,0x93,0x51,0x16,0x38,0x4D,0xF1,0x68,0x4C,0xAE,0x44,0x5D,0xCE,0x9F,0x16,0x9C, - 0x9B,0x9B,0xB4,0xDF,0x9C,0xFF,0x58,0xD2,0x28,0x28,0xC9,0x03,0x7F,0xF3,0x07,0x8B,0x10,0x13,0x63,0x4D, - 0x9C,0xDE,0x0F,0xF8,0x82,0x74,0x45,0xD5,0xEE,0x3B,0x3F,0xDE,0x0C,0x99,0x7C,0xED,0x9D,0xAF,0x6E,0xC5, - 0x83,0x9D,0x97,0x79,0x03,0xBE,0x3A,0xF3,0x6A,0xAF,0x2B,0x22,0xFD,0x42,0x82,0x33,0x7F,0x08,0xC4,0x37, - 0x72,0x23,0x56,0xB8,0x31,0xAE,0x77,0x53,0xD3,0x29,0xC7,0xB0,0x36,0x44,0xCC,0xC7,0x77,0xCE,0xD3,0xF0, - 0xEE,0xC7,0x2A,0x80,0x03,0x3D,0xC8,0x21,0x21,0xFD,0x85,0xCA,0x31,0xCD,0x9F,0x62,0xED,0x6F,0x81,0x11, - 0xEE,0xD0,0xD9,0x18,0x3B,0xCE,0x88,0x46,0xE1,0x0F,0x48,0x7B,0x24,0x91,0x16,0xC0,0x76,0xE4,0xC6,0xE4, - 0x58,0xD2,0x74,0x06,0xE5,0x01,0x72,0xA3,0x2D,0xAA,0xC2,0x32,0xF8,0x94,0x63,0x00,0xC3,0x5A,0x61,0xEE, - 0x8A,0x09,0x15,0xC5,0x96,0x39,0x51,0x03,0xEA,0x3D,0xBD,0x12,0xA4,0xF0,0xE9,0x22,0x08,0xD9,0x1B,0xAA, - 0x7A,0x78,0x93,0xAA,0x34,0x8A,0x67,0xC0,0xA2,0x43,0x3E,0x86,0xF9,0xDA,0x64,0xE8,0x09,0x48,0xB8,0xF2, - 0x73,0x79,0x6C,0x00,0xA1,0x59,0xF4,0xCD,0x5B,0x88,0x75,0xE0,0x09,0x72,0xF4,0x34,0xF0,0x38,0x99,0xBC, - 0x53,0x2D,0x8B,0x3E,0xFE,0xDC,0x0F,0x5A,0x61,0x21,0x7C,0x10,0x61,0xAA,0xBF,0xBA,0xE3,0x40,0x53,0xA4, - 0xFE,0xCA,0x9E,0xE8,0xFF,0xBA,0x67,0x82,0x9A,0xAA,0x09,0xB8,0xCF,0x79,0xC7,0xB9,0xC3,0x72,0x96,0xDB, - 0xAB,0x53,0xD5,0x0B,0xD0,0x27,0x33,0x28,0x04,0x57,0x31,0x9F,0x78,0x6F,0x10,0x5A,0xB8,0x54,0xB4,0x60, - 0xF0,0xDC,0xB6,0x0B,0x29,0xBB,0xBC,0xDD,0xB0,0x4E,0xEF,0x26,0x40,0x25,0xCB,0x4C,0xBE,0xA3,0x71,0x1F, - 0xC4,0xB1,0x6D,0x60,0x57,0xE3,0x2A,0x99,0xB7,0x72,0xF5,0xBC,0xFB,0xF0,0x01,0x7B,0x78,0xE6,0xE1,0xEE, - 0xF9,0xC0,0x04,0x79,0x21,0x52,0x82,0xAC,0xB0,0xFE,0xC4,0x53,0x10,0xFD,0xAC,0x37,0x0C,0x7A,0x72,0xB9, - 0xC0,0xBE,0x5C,0x67,0x09,0x9E,0xB0,0xC3,0x47,0xA7,0xC5,0xA6,0x94,0x1D,0x85,0x0E,0x5D,0x92,0xBF,0x76, - 0x9A,0x9D,0x41,0x1D,0x0B,0x23,0xC5,0x21,0xEA,0x74,0x9C,0x82,0x99,0x02,0x9C,0xE6,0x81,0x5F,0x63,0x8D, - 0x08,0x70,0x59,0x4E,0x7C,0x8E,0x25,0x80,0x62,0xC0,0xFE,0x2F,0xDB,0x1F,0x82,0xF1,0x0E,0x74,0xEA,0xD9, - 0xAC,0xD9,0x6C,0x82,0x25,0x27,0x60,0x4B,0x30,0xBC,0x64,0x37,0xA1,0x49,0x34,0xCD,0xFE,0xC8,0x91,0xDE, - 0xC0,0xA6,0xD7,0x3B,0x4D,0x0B,0x52,0x63,0x54,0x7F,0x46,0x7B,0xF1,0x36,0xDF,0xA3,0x00,0x0C,0xEB,0x70, - 0x37,0x93,0x55,0xDD,0x02,0x58,0xBB,0xC8,0x18,0x54,0x38,0xA0,0xA7,0x9E,0xE0,0x6D,0x3B,0xAA,0xF5,0x5B, - 0x10,0x5B,0xF1,0x5C,0xF8,0x67,0x1F,0x1D,0xC2,0x08,0x22,0x0F,0x0D,0x31,0x09,0x4B,0x1D,0xF4,0xA0,0x81, - 0xDA,0x1C,0x07,0xC9,0xB0,0xB7,0x47,0x04,0x34,0xC5,0xA9,0xB8,0x09,0xF5,0x0C,0x27,0xFB,0xC8,0x09,0xB5, - 0x29,0x14,0x08,0xEE,0x8D,0xBA,0x8A,0x19,0x04,0xFB,0xA1,0x1D,0x5A,0x17,0x64,0xBE,0xD5,0xA3,0x16,0xCB, - 0x51,0x33,0x36,0x46,0x0B,0x51,0xED,0x7F,0x0E,0xD3,0x1C,0x43,0x48,0x19,0x16,0xBE,0xCC,0x58,0x3E,0x56, - 0x46,0x50,0xA1,0x0D,0xD8,0x3D,0x1C,0xC9,0x25,0xB3,0x47,0xA6,0xBC,0xBE,0xAC,0xCE,0x4B,0xA1,0x87,0x05, - 0x3A,0xB3,0x36,0xA8,0x85,0x09,0xF7,0x22,0xD0,0x30,0xC8,0x06,0x69,0x08,0xED,0x02,0x74,0xD2,0x97,0xAA, - 0xF0,0x63,0xFA,0x86,0x12,0x92,0xFF,0x32,0xE7,0x60,0x96,0x87,0x28,0x44,0x6D,0x26,0xA4,0x8A,0x68,0x9F, - 0x4E,0x10,0x02,0xA1,0x31,0x6E,0xE8,0x41,0x49,0x8D,0xE1,0x36,0x85,0xC0,0xEE,0xFC,0xF7,0x52,0x20,0x21, - 0x79,0xAE,0x61,0x87,0x3D,0x13,0xA9,0x32,0x41,0x28,0xD6,0xE7,0x9F,0xE1,0xE9,0x41,0x0F,0x72,0x83,0xA4, - 0xF7,0x4C,0x76,0x20,0xF9,0xD9,0x9D,0x55,0x6E,0xAB,0xA4,0xE8,0x47,0x04,0xA0,0x15,0x7C,0x45,0xFF,0xA1, - 0x83,0x28,0xDA,0x66,0x94,0x0A,0x7C,0x90,0x8F,0xA6,0xA8,0xC7,0x23,0x4A,0xB5,0xBD,0x6F,0x95,0xD3,0xB6, - 0x35,0xE6,0xB1,0xEA,0xA2,0x4D,0x66,0x94,0xAA,0x4B,0xBF,0xEF,0x6C,0xE3,0x49,0x24,0x34,0x24,0x2F,0x60, - 0xA5,0x04,0x6A,0x7E,0x57,0xA1,0xF5,0x0A,0xC4,0xA3,0xE7,0xD7,0x64,0x07,0x4C,0x8B,0xA7,0x39,0xE2,0x5C, - 0x96,0x19,0x3D,0x9E,0x19,0xB6,0x2C,0x20,0x25,0x04,0xCB,0x4A,0xEC,0x16,0x4B,0x5B,0xFC,0x4F,0x2B,0x30, - 0xF8,0x1F,0xB6,0xC8,0x4A,0xA2,0x15,0x8F,0xEE,0xCC,0xCD,0x12,0x51,0xEC,0xEB,0x92,0x0F,0x10,0xBA,0x8F, - 0x76,0xFA,0x8F,0x59,0x32,0x6A,0xEB,0xBD,0x6B,0xA2,0x5A,0xB4,0xA2,0x81,0x87,0x71,0x9A,0x03,0x4C,0x8B, - 0x25,0xC3,0x32,0xF7,0xB1,0xE1,0x54,0xFF,0x6E,0x89,0x0D,0xA3,0xDC,0x18,0x6C,0xD2,0xA4,0xDE,0xC1,0x39, - 0x51,0x32,0x9C,0x8C,0x44,0x0D,0x33,0x50,0xB0,0x75,0xF3,0x59,0x3A,0xC1,0x88,0x48,0x7F,0x51,0x12,0x25, - 0xEE,0x8B,0xFC,0xDB,0xA7,0x3D,0xC0,0xCA,0xA1,0x60,0xC4,0xFA,0x20,0x83,0xE4,0x0B,0xC8,0x65,0x24,0x78, - 0xC9,0xDE,0x0E,0x51,0x58,0x7F,0xD4,0x08,0x1D,0xFD,0xBA,0x6E,0xCC,0xBA,0xE9,0x32,0x7D,0x80,0x2B,0x98, - 0x51,0xC1,0xA6,0xD4,0xBF,0x00,0x74,0xBD,0xCA,0xD0,0x46,0x47,0xFC,0xF0,0x26,0xD0,0x90,0x07,0xD3,0x07, - 0x76,0xA5,0xD0,0x7F,0xA5,0x26,0xAB,0xBF,0x35,0x0D,0x1D,0xA7,0x30,0x96,0xF5,0xA2,0x1C,0x02,0x6C,0xE6, - 0x20,0xA6,0x64,0xAD,0xD6,0x35,0xEC,0x80,0x10,0xB8,0xA0,0x79,0x9F,0xFB,0x52,0xE7,0xA8,0x13,0x94,0x66, - 0xE9,0x1A,0x83,0x70,0xD1,0x5C,0xAC,0x86,0xF7,0xE3,0xF7,0x33,0xAE,0x99,0x8F,0x34,0x32,0x1B,0xB1,0x1D, - 0x1B,0xB4,0xEF,0xE5,0x45,0x5B,0x6D,0x93,0xED,0x6A,0x49,0xB5,0x44,0xD2,0xC6,0x11,0x4B,0x2A,0xF5,0x6F, - 0xF1,0x45,0xB7,0x77,0xEF,0x43,0x98,0xA7,0xB3,0x3E,0x88,0x2F,0xB9,0xBA,0xCE,0x89,0x95,0xFB,0xEE,0x13, - 0xC1,0x62,0xBB,0x1A,0x27,0xA0,0x2D,0x84,0x51,0xCC,0x86,0xAE,0xDE,0x52,0xC0,0x0F,0x9C,0x09,0xA7,0xCF, - 0xF0,0x0F,0x5E,0x41,0x17,0x77,0xCF,0x2D,0x4A,0xD3,0x45,0x67,0x73,0xD9,0xBB,0x70,0x75,0x4A,0xAE,0xB3, - 0x6D,0x1B,0x68,0xBF,0x35,0xD0,0xA2,0x35,0xA1,0x31,0xDE,0x35,0x55,0xB3,0x0E,0x98,0xEC,0x8B,0x08,0x8C, - 0x89,0x99,0x70,0x6B,0xBD,0x95,0x87,0x2D,0xBB,0x10,0xEE,0xD5,0x5D,0x88,0x52,0x7B,0xAA,0x9F,0xB5,0x54, - 0xCD,0x9A,0x67,0xA4,0x5E,0x3F,0xEF,0x09,0x42,0xD1,0xCF,0x07,0xFA,0x22,0xE9,0x2B,0xD2,0x3E,0x97,0x6F, - 0x61,0x10,0xA9,0xC4,0xDD,0x0A,0x96,0x14,0x00,0x91,0x3E,0xA1,0xDE,0xAD,0xCA,0x49,0xE8,0x88,0x27,0xF5, - 0xBC,0xDA,0x86,0x46,0x30,0x89,0xE0,0x29,0x23,0xB0,0x9F,0xDD,0xF8,0x7B,0xC7,0x46,0xFE,0xF4,0x99,0x42, - 0xBA,0x62,0x51,0x9F,0x81,0x42,0x41,0x2D,0x75,0x60,0xD1,0x1D,0x2B,0x59,0xE8,0x53,0x3B,0x93,0x4C,0x6A, - 0x7E,0x18,0x65,0x86,0xC2,0x2B,0x51,0x0E,0x94,0x01,0xC0,0x75,0x51,0x93,0xD5,0x7D,0xCA,0x95,0x3F,0x2F, - 0x9D,0xD2,0xE8,0x00,0x02,0x09,0x2F,0x71,0x54,0x66,0x2E,0x68,0xE8,0x06,0x49,0xA4,0x1B,0x2A,0x4C,0x54, - 0xCE,0xE8,0xA2,0xF6,0xDB,0x3D,0x11,0x06,0x6B,0x05,0xC9,0x51,0x94,0x07,0x13,0x87,0xE6,0x0A,0xD1,0x7A, - 0xF5,0x62,0x77,0x6C,0x49,0x76,0xEC,0x60,0xC3,0x0B,0xC6,0xE2,0xB6,0x2B,0xE7,0x91,0x70,0x61,0x9C,0x6E, - 0x74,0xF7,0xC5,0x7E,0xE7,0x6A,0x85,0x2D,0x7B,0xA3,0xA9,0x1D,0xF9,0xE9,0xF1,0xDF,0x3A,0x30,0x8A,0xDA, - 0x13,0x67,0x3F,0xDA,0xA9,0xF6,0x0D,0x34,0xBC,0xC6,0x42,0x6F,0xEA,0x0A,0x14,0x90,0xF3,0x70,0xA9,0xC2, - 0x21,0xD0,0x8D,0xC7,0x3D,0xC5,0xB3,0x86,0x9B,0x46,0x8F,0xF5,0xF6,0xEB,0x42,0xC4,0x2C,0xD4,0xCB,0xD5, - 0xAF,0x26,0x3C,0x75,0x87,0xA1,0xA3,0x3E,0xE9,0xB1,0x30,0x79,0x4B,0x0C,0xF2,0x3C,0xFB,0xE4,0x9A,0x2B, - 0x21,0xAB,0x0A,0xD8,0x33,0x7D,0x61,0x3F,0x81,0x66,0x87,0xF8,0x3B,0x3E,0x93,0xDA,0xFA,0xA1,0x6F,0xDE, - 0xB1,0x24,0x6F,0xD8,0x2B,0xD1,0xD7,0x8F,0xDC,0x3F,0xDE,0xAA,0xA1,0xDA,0xF3,0x3D,0x83,0x82,0x13,0x9C, - 0x2A,0x70,0x04,0x7C,0xDD,0xCE,0x5C,0x00,0xDC,0x19,0xD0,0xE2,0xDB,0x53,0x2C,0xB3,0x33,0x5F,0x2F,0x37, - 0x4C,0x78,0x87,0xAF,0x08,0x53,0xEC,0x96,0x2E,0x35,0xFB,0xAA,0xC2,0xD4,0xB5,0x4B,0x90,0xD2,0xC5,0xB9, - 0x38,0xE6,0x84,0xE3,0x5B,0xB1,0x27,0x5E,0x6D,0xEF,0x55,0xD6,0xD6,0xF3,0x1E,0x15,0x7D,0x19,0x8E,0x7D, - 0xC5,0x7E,0x3B,0x53,0xEE,0xFC,0xC9,0x4B,0x7E,0xDE,0x7C,0x3E,0x24,0x74,0x54,0xB7,0x43,0xBB,0x45,0xF9, - 0xE2,0x8A,0xB4,0x4F,0x74,0x79,0xB3,0x21,0x52,0xEA,0x16,0xD5,0x17,0x33,0x24,0x18,0xA3,0x98,0xE4,0x33, - 0xAD,0x7D,0x0E,0xE5,0xC9,0xAF,0xDD,0xD5,0x81,0x52,0x95,0xC0,0xF6,0xDB,0x2A,0x67,0x48,0x54,0x13,0xAD, - 0x5C,0xBC,0x45,0x40,0x12,0xC8,0xA2,0x9A,0x6C,0xA1,0x58,0x71,0xC3,0x9C,0x26,0x94,0xD4,0x31,0xF8,0x29, - 0x28,0x75,0x5C,0xDB,0x7F,0xDF,0xC6,0x33,0x91,0x89,0x46,0xA7,0x08,0x5B,0xC5,0xFE,0x82,0xB5,0x1E,0xBA, - 0x3D,0xF4,0x83,0x84,0xCA,0xF4,0xC7,0xB1,0x30,0xEE,0xF9,0x3D,0x3A,0x3E,0x13,0xB8,0x83,0xF2,0x74,0xED, - 0xBC,0xF1,0x1C,0x1D,0x75,0xC3,0xC5,0x80,0xD2,0x34,0xD6,0xC8,0xBA,0x50,0x65,0xFA,0x10,0x78,0xD9,0x37, - 0xCB,0x07,0x6A,0x49,0x18,0x31,0x5E,0xCC,0x6C,0x7D,0x16,0x71,0x5D,0xF1,0xB4,0x23,0xD2,0x71,0xF6,0x0C, - 0xC0,0x32,0x65,0x3F,0xA9,0x5D,0x1E,0xC9,0x89,0x3F,0x15,0x2F,0x99,0x7A,0x81,0x4F,0xB3,0xE3,0xD6,0x19, - 0xE2,0x51,0xB7,0x46,0xF0,0x71,0x29,0x39,0xA8,0x2D,0xAF,0x9C,0x42,0x32,0x57,0x6D,0x16,0x3D,0xDF,0xC9, - 0xDB,0xFF,0xC3,0x42,0x0C,0xC1,0x1A,0x41,0x27,0xBB,0x0F,0x38,0xE7,0x45,0xCE,0x87,0x44,0xAD,0x00,0x70, - 0x84,0x8E,0x76,0xE2,0x15,0xBA,0xF0,0xDA,0x55,0x8C,0x68,0xA5,0x21,0x4E,0xCD,0x27,0x09,0xC3,0x43,0x47, - 0xD8,0xB9,0x17,0xC1,0xCF,0x6D,0xCF,0x83,0x59,0x4F,0x01,0x14,0x04,0xC7,0x72,0x03,0x16,0xAD,0x61,0x23, - 0x3D,0xCA,0x69,0x44,0xFF,0x45,0xF7,0x7D,0x24,0xC6,0xFB,0xF4,0xE9,0xE4,0x47,0x1E,0xBF,0xAA,0xF4,0xE2, - 0x2E,0xEC,0xDF,0xE2,0xF4,0x3A,0xEB,0x54,0xA6,0xC9,0x47,0x61,0x6C,0xCA,0xEC,0x30,0x77,0xE4,0xF0,0x13, - 0x72,0xE5,0xC2,0x3F,0x46,0x1F,0x17,0x1E,0xC5,0x54,0xCB,0x94,0x8D,0xAA,0xA9,0x57,0x0C,0x5A,0xD7,0x2E, - 0x5D,0x3E,0x4B,0x8C,0x36,0x9C,0xF9,0x62,0x3E,0x5D,0x0A,0xC8,0x67,0x86,0xCA,0x08,0x9F,0xCC,0x12,0x2E, - 0xB4,0xE1,0xA5,0xDD,0x76,0x45,0x2E,0x7A,0x09,0xAD,0x7A,0x44,0xE0,0x35,0x1C,0xE2,0xEE,0x4C,0x80,0x8F, - 0x21,0x36,0x63,0x78,0x9B,0x03,0xCB,0xED,0x1F,0xA7,0x6A,0xC3,0x29,0x48,0xE3,0x1F,0x4D,0x15,0x47,0xF3, - 0x9D,0xC6,0x94,0x7F,0xC9,0xB0,0x2C,0xC0,0x74,0x6A,0x17,0x40,0x17,0x7A,0x4A,0x28,0xF3,0x80,0x4E,0xDC, - 0x56,0xA4,0x72,0x57,0xB1,0x91,0x5E,0xFC,0x4A,0xE4,0xBA,0xDE,0x3B,0x05,0x76,0xAE,0x0B,0xE2,0x6B,0x11, - 0xC2,0x6B,0xEA,0x6F,0x17,0xF6,0x5B,0x75,0xA4,0x7B,0xE0,0x89,0xB6,0xB5,0xB3,0x4A,0x84,0x61,0x09,0xCF, - 0xDE,0xEF,0x03,0x39,0x70,0x81,0xB2,0x58,0xF8,0x50,0x6A,0xBB,0xCB,0xFA,0x5B,0x09,0xFC,0xFD,0xE4,0xAA, - 0x86,0xD5,0xB4,0xB4,0xFC,0xBF,0x32,0x53,0x2D,0xB0,0xD2,0x02,0x9D,0x01,0x0C,0x6D,0x16,0x81,0xE6,0x8B, - 0x5E,0xBE,0x38,0xC1,0x72,0x53,0x82,0x12,0x15,0x0E,0xE5,0xF1,0x8A,0x1A,0x30,0x74,0xC4,0x8F,0x15,0xA6, - 0x8F,0x7A,0xD3,0x06,0xF5,0x62,0x95,0x6D,0x64,0xF0,0xBD,0xA5,0x7D,0xBC,0xC2,0x95,0xA1,0xB4,0xC3,0x17, - 0x1C,0xD0,0x3E,0x22,0x5E,0x3B,0xEE,0xC2,0x95,0x4F,0x8B,0x91,0x0A,0xBA,0xF2,0x62,0x2C,0xF0,0x12,0xD5, - 0x86,0x9C,0xCC,0xB5,0xB5,0x9D,0x90,0xCA,0x8C,0x91,0x3C,0xF6,0x33,0xB7,0xC5,0xB1,0xC4,0xA0,0x35,0x43, - 0xCE,0x71,0x92,0xA3,0xBE,0x5D,0xD5,0xE3,0x73,0x76,0x68,0xA0,0xD2,0x10,0xD2,0xB5,0xF4,0x08,0x47,0x43, - 0x55,0x78,0xEB,0xE4,0x77,0x80,0xF2,0x5A,0xAD,0x60,0xB1,0x7D,0x48,0xBE,0xD6,0x97,0xC8,0xE8,0xE4,0x51, - 0x97,0x09,0x16,0xC7,0x6C,0x98,0x6A,0x1B,0x7E,0x99,0x37,0xA9,0x6A,0xE1,0xAD,0xCD,0x01,0x5F,0xD8,0xF8, - 0xFD,0x3B,0x87,0xD6,0x1D,0xD8,0xD7,0x0B,0x24,0xF0,0x1B,0xDC,0xDE,0x5C,0x51,0xD2,0x92,0xBB,0xB0,0xFF, - 0xB7,0x26,0x19,0x7E,0xF8,0x7F,0x2A,0x7F,0xB9,0x5F,0x99,0xCE,0xF6,0x45,0x9E,0x4C,0xBE,0x34,0xD2,0x1A, - 0x66,0xD3,0x96,0x4E,0x72,0x71,0x52,0xA9,0x5A,0x1A,0x46,0xDE,0x54,0xF6,0x40,0xCF,0xE0,0x2B,0x9E,0x5E, - 0x73,0x76,0x40,0xB6,0xF6,0x9A,0xDF,0x9F,0xBA,0xB1,0x2E,0xF9,0x0B,0x21,0x8F,0x4F,0x01,0x41,0x90,0xC3, - 0x9C,0xF6,0x10,0xAC,0x98,0x38,0x77,0xE7,0x12,0xBD,0xFB,0x1D,0xDB,0xFF,0x3A,0xF3,0x34,0xAF,0xCA,0x19, - 0x34,0x4E,0x2E,0x0C,0xCD,0xC6,0x34,0x3A,0x86,0x94,0x1F,0x92,0x04,0x69,0xA0,0xD6,0xC5,0x72,0x0B,0xA2, - 0x51,0x49,0xFB,0x30,0x85,0xA4,0x94,0xF2,0xF0,0xAD,0xC1,0x3A,0x98,0x4E,0x10,0x61,0xDC,0xEF,0x76,0xD6, - 0x0A,0xC9,0x31,0xC1,0x76,0x0C,0x2E,0xB8,0x49,0x67,0x1F,0xC0,0xF1,0x03,0x3E,0x02,0x3A,0xC6,0xA0,0x7F, - 0x26,0xA9,0x90,0x6B,0xB3,0xAC,0x5A,0x61,0xD7,0x79,0x58,0x04,0xB3,0x6B,0xB4,0x7F,0x68,0x03,0x35,0xB6, - 0x91,0x26,0x7B,0x59,0x9B,0x14,0x13,0x64,0xF0,0x00,0x5C,0xA1,0x86,0x2E,0xC3,0xA7,0x33,0xAC,0x4B,0x60, - 0xE3,0x61,0x65,0x87,0x50,0x2E,0xB8,0x9C,0x22,0x0C,0x89,0xA5,0xCF,0x28,0xE0,0x91,0x97,0xE3,0xE1,0x25, - 0xD7,0x68,0x62,0x49,0xBF,0x05,0xA1,0x0B,0xF9,0x87,0x32,0xA5,0xA1,0x19,0xCC,0x1E,0x5C,0x24,0x06,0xF3, - 0xA8,0x81,0xEC,0x14,0xF2,0xAF,0x1C,0x4A,0xA2,0x58,0xBD,0xCD,0xC5,0x09,0x49,0xF2,0x2B,0x0C,0x61,0xFE, - 0x56,0x81,0xBF,0xBB,0xD8,0x42,0xF2,0x23,0x08,0x1E,0x8B,0xFB,0x0B,0x23,0x28,0x83,0x45,0xDD,0x3B,0x24, - 0x20,0xDA,0x73,0xB7,0xFB,0xBD,0xC2,0xA5,0x8A,0x0A,0xA2,0xEC,0xAE,0x21,0xC7,0x5D,0x82,0xDD,0xB2,0x28, - 0x6D,0xE7,0xDF,0x7F,0xAA,0xA2,0xB2,0xDE,0x39,0x8F,0x7C,0x44,0x7F,0x49,0x87,0x9E,0xD9,0x25,0xB2,0x91, - 0x2B,0xA1,0x89,0xAF,0xDB,0xCE,0x42,0x7A,0xB2,0x7F,0xD7,0x8F,0x58,0x26,0x58,0x7E,0x2A,0xA0,0x91,0x5C, - 0x38,0x29,0x0B,0xFB,0x7D,0x35,0x04,0x0F,0x78,0x69,0x91,0x53,0x4C,0x6D,0xFB,0x97,0x06,0xF6,0x6A,0x89, - 0xE0,0x90,0x73,0x55,0xAA,0x30,0x46,0x6B,0x82,0x1C,0xF2,0x07,0x5A,0xB7,0x09,0x4F,0x88,0x40,0x2E,0xAB, - 0x9D,0xDA,0x65,0xC0,0x1B,0x1F,0xA3,0x28,0x7E,0xBF,0x4B,0x89,0x1F,0xF9,0xCB,0x3F,0xF4,0xA6,0x07,0x90, - 0x02,0x15,0x0D,0xAA,0x35,0xE6,0x07,0xB5,0xC0,0xD3,0xAB,0xB1,0x9A,0xF6,0x55,0x42,0x94,0xC7,0x70,0x34, - 0x6E,0x3B,0x67,0xCD,0x9E,0x45,0x43,0x2D,0x74,0x85,0x33,0xC3,0x5B,0x71,0x86,0x36,0x90,0x33,0x5C,0xEE, - 0x0F,0xA1,0xE6,0x16,0xF1,0x7D,0x7D,0x3B,0x0E,0x1B,0xA5,0x65,0xAE,0x3B,0xE6,0xD4,0xE4,0x47,0x59,0x67, - 0xD0,0x37,0x6B,0xED,0x27,0x9A,0x9D,0x54,0xD0,0x85,0x4C,0x73,0x55,0x44,0xD4,0xE5,0x50,0xFA,0x0A,0x73, - 0x89,0x92,0x22,0x92,0xEE,0xCC,0x28,0x80,0x4B,0xB8,0x16,0xEA,0xEA,0x2C,0x0A,0x7A,0x42,0xF8,0xD0,0x06, - 0x3D,0xED,0x14,0xBC,0xCA,0xF4,0x3B,0x28,0xFE,0x6F,0x78,0x6B,0x09,0x92,0x60,0x7C,0x62,0x7A,0x77,0xE8, - 0x53,0x57,0xB4,0xA2,0x20,0xD1,0x8E,0x1D,0xAB,0xB4,0x3D,0x82,0x55,0x90,0x0A,0x4B,0xC8,0xBB,0xCF,0x23, - 0x02,0xD6,0x3B,0xA7,0x42,0x58,0xBE,0x4E,0x3F,0x56,0x68,0xDD,0xC9,0x39,0x29,0x68,0x06,0x8E,0xB5,0x1F, - 0xD2,0xEB,0xF6,0x0C,0xC0,0x32,0xAF,0x44,0x82,0x6C,0x4B,0x7E,0xCD,0x05,0xB8,0xBB,0xC0,0x7A,0xFF,0x1D, - 0x4D,0x31,0x69,0xC1,0x49,0x58,0xED,0x12,0xFE,0x8F,0x74,0x47,0xAA,0x4F,0xAF,0x99,0xFC,0xB2,0x27,0xDE, - 0x02,0x0E,0x1F,0xED,0xF2,0x7F,0xDB,0x60,0x47,0x3F,0xDE,0x9D,0x7F,0x36,0x9C,0xB0,0x54,0xC8,0xCF,0x35, - 0xAA,0x13,0x10,0x42,0x01,0x8E,0x0C,0x08,0xF1,0x55,0x18,0x37,0x2E,0xD0,0xCF,0x8F,0x9D,0x76,0x59,0x81, - 0x8D,0x3D,0x21,0x38,0x10,0x77,0x37,0xD2,0xF4,0xE2,0x97,0x99,0xA2,0x46,0x77,0x26,0x91,0xC1,0x1F,0xE6, - 0x7D,0xE3,0xC6,0x40,0xF9,0xAF,0xEA,0x24,0xE3,0x25,0x77,0x65,0xA7,0x2B,0xB0,0xC3,0x75,0x44,0x2A,0x63, - 0xE5,0x99,0x78,0x9A,0x16,0xEB,0x99,0xFA,0xA6,0x1A,0xB2,0x53,0xB4,0xA3,0x7A,0x49,0x33,0x50,0xB2,0xA9, - 0xF4,0xE3,0xF2,0x31,0x31,0x80,0x99,0xC5,0xB4,0x36,0x61,0x01,0xCC,0xBD,0x91,0x23,0x56,0xEB,0xDD,0x31, - 0x7C,0x23,0x61,0x8A,0x36,0x2F,0x6E,0x4C,0xF3,0x12,0x2F,0xD2,0x76,0x6D,0x62,0xF9,0x2C,0x85,0xFC,0x3C, - 0x18,0xE4,0x50,0x22,0x4D,0xCA,0x94,0x83,0x92,0x65,0x00,0x9F,0x4E,0x69,0x8D,0xEF,0x81,0x8B,0x32,0x2B, - 0x26,0xF8,0x3A,0x01,0xD9,0x3C,0xA3,0x1A,0xB8,0x77,0xC2,0x01,0x4C,0xDE,0x0D,0x12,0x0E,0xDA,0xCD,0xBC, - 0xB7,0x6C,0x3B,0x79,0x89,0x2B,0x43,0x95,0xBF,0x7D,0xBF,0x39,0xD1,0x46,0x1F,0x21,0x0B,0x1F,0x71,0x4C, - 0xC6,0xFD,0xE6,0xAC,0x9C,0xAF,0x67,0xEE,0x7E,0xCC,0x0F,0x8C,0xFF,0x64,0x2B,0x34,0x67,0x80,0x92,0xDC, - 0x3D,0x0D,0xC3,0x5A,0xE6,0xEF,0x7A,0x9C,0x20,0xB2,0xC7,0xA2,0x86,0x8A,0x56,0x2D,0xDF,0xA6,0xD0,0x42, - 0x12,0x9F,0xF7,0x8D,0x7F,0x66,0x92,0x41,0xE3,0x3B,0xD3,0x0F,0x8F,0xA0,0xA6,0x6B,0x37,0x5E,0x3B,0x46, - 0x39,0xAD,0x74,0xE0,0x20,0x30,0x92,0x82,0x5F,0x35,0x54,0xE3,0x9F,0xDD,0x63,0x97,0x8A,0x5F,0x66,0x87, - 0x07,0x9C,0x8F,0x99,0xED,0x1A,0x2D,0x00,0x9A,0xB1,0x4F,0x45,0x03,0x5C,0x36,0xFC,0x65,0xF0,0x25,0xC1, - 0x26,0xE6,0x3F,0xA7,0x47,0x7F,0x62,0xD4,0x82,0x51,0xAD,0x82,0xDD,0x3D,0x08,0x02,0x32,0xA5,0xE2,0x4C, - 0xC1,0x7E,0xEA,0x06,0x0F,0x5C,0xD9,0x3D,0xDF,0x62,0x9C,0x44,0x33,0xEE,0x0C,0x60,0xD0,0x4E,0xF4,0xE6, - 0x76,0xF2,0x4C,0x42,0x9A,0x24,0xB6,0xFB,0x94,0xB3,0x42,0xDA,0xC4,0xB0,0xF0,0xF6,0x77,0xF5,0x1A,0xB9, - 0x64,0x96,0x9D,0x45,0xB3,0x5D,0x4B,0xD6,0x45,0xB3,0x04,0xBA,0xF0,0x76,0x92,0xA1,0xD5,0x48,0xF5,0xEA, - 0x16,0x3D,0x43,0xDA,0x44,0xB2,0xFD,0x75,0x41,0x1F,0xB0,0xE5,0xAE,0xB0,0xF6,0x10,0xC7,0x35,0x23,0x9B, - 0x5C,0x27,0xE1,0xDD,0x0E,0x5B,0x56,0x18,0x24,0x26,0xF0,0x0D,0x2D,0x16,0x29,0x0C,0xEF,0x91,0x69,0x80, - 0x0B,0x4C,0x5A,0xE9,0xEF,0x45,0xD9,0x19,0x57,0x5C,0xA7,0x56,0x8D,0x98,0xC4,0x5C,0x8E,0x0F,0x17,0x4B, - 0x5A,0x94,0xCD,0xA0,0x39,0x6E,0xF9,0xD9,0x12,0x57,0xE8,0x45,0x7E,0xF5,0xCA,0xB5,0xE4,0xD8,0x48,0x9E, - 0x2E,0xB3,0x48,0xC6,0xCD,0x9D,0x36,0xFE,0x77,0xFC,0xEF,0xB5,0x57,0x22,0x8E,0x6B,0x11,0xB0,0x34,0x01, - 0xCC,0xD0,0x65,0xF6,0x96,0xED,0xDC,0x58,0x22,0x94,0xDF,0x1F,0x0D,0xB1,0x17,0xAB,0xE0,0xD3,0xF7,0xEF, - 0xFE,0x5A,0x55,0x63,0x5C,0xC3,0xA5,0x00,0x1C,0xB9,0x35,0x14,0x4C,0xD9,0x13,0x6C,0x82,0xF5,0x16,0x13, - 0x71,0x30,0xCB,0xC4,0x36,0x8D,0x10,0xDF,0x52,0x0D,0xBB,0x39,0x33,0x1F,0x17,0xD0,0x4F,0xAC,0x37,0x04, - 0xA6,0xAA,0x26,0x2C,0x9F,0xEC,0xCA,0x9E,0xBA,0x05,0x3F,0x08,0x0F,0xA4,0x12,0xD5,0x98,0xDD,0x43,0xDE, - 0x37,0x2C,0x82,0xD6,0x54,0xEF,0x08,0x02,0xAA,0x0C,0x4C,0x38,0x97,0xC2,0x1E,0xAF,0xC0,0xC3,0xA6,0xD7, - 0xCD,0x67,0x06,0x71,0x2C,0xAB,0x59,0xCE,0x11,0x25,0x00,0xF8,0x3B,0x06,0xAD,0x1A,0xF1,0x01,0x36,0xF4, - 0x49,0xB4,0xF2,0xC6,0x13,0xFA,0xE2,0x90,0x0A,0x5E,0xA7,0x8C,0x53,0x1E,0x95,0x3F,0xE8,0x45,0x6D,0x37, - 0x4C,0xD9,0x10,0x61,0xF1,0x02,0x6E,0x87,0x3B,0xF7,0x69,0x03,0x6A,0xD6,0x90,0xE0,0x95,0x95,0x8B,0x17, - 0x34,0x57,0x4E,0x84,0xA5,0xC4,0x30,0xF0,0x08,0xA9,0xFB,0x62,0xBB,0x85,0xB1,0x31,0x94,0x98,0x67,0x08, - 0x5E,0xBA,0x1E,0x89,0xF6,0x4B,0x4A,0x29,0xAA,0x74,0x9D,0xC3,0xBA,0x0B,0xE4,0x00,0xB0,0x62,0x06,0xF6, - 0x79,0x48,0xC8,0x20,0xF8,0x58,0x29,0xD4,0x69,0x91,0xC4,0x5E,0xF3,0xE8,0x1F,0x5B,0xC1,0x3B,0xF3,0x22, - 0xED,0xFE,0x0B,0xEE,0x44,0x09,0xD9,0xCE,0xA5,0xC6,0x64,0x75,0xA9,0x89,0xFB,0x8C,0x10,0x37,0xEA,0x97, - 0xBF,0x4F,0x0D,0x56,0x2D,0x59,0x1F,0xA0,0xF3,0xB6,0x32,0x3A,0x96,0xAB,0xBD,0x87,0xAA,0x9B,0x83,0x88, - 0xFE,0xCB,0x65,0xAB,0xB8,0xA1,0x58,0x2B,0xF2,0x5F,0xED,0x7C,0x47,0xC3,0x13,0x58,0xDB,0x02,0xC0,0xDD, - 0xDD,0x87,0xCD,0x1D,0x83,0x34,0xA0,0x3E,0x36,0xE9,0x8B,0x0E,0xA7,0x2D,0x7A,0x98,0xD5,0x93,0x30,0x4B, - 0xC3,0xEB,0x61,0x7A,0xC1,0x3C,0x54,0x80,0xAE,0xDB,0x1C,0xE6,0x12,0x21,0x57,0x05,0xD0,0x4E,0x46,0xB1, - 0xC6,0x52,0xF6,0x45,0x57,0x87,0x01,0x72,0xBC,0x50,0x10,0x25,0xE0,0x72,0x77,0x30,0xE1,0x32,0xC5,0x3A, - 0x9B,0x51,0xCD,0x81,0xA7,0x51,0x30,0xD2,0x7B,0x49,0xDD,0xC4,0x08,0xC9,0xC3,0x10,0x32,0xD7,0x7A,0x69, - 0xBC,0x6B,0x9B,0x06,0x01,0x74,0xD1,0xF1,0x61,0xF4,0x8F,0xE4,0x74,0x45,0x8C,0x51,0x2F,0xE8,0x74,0x27, - 0x3A,0x4E,0x4C,0x18,0x0C,0xDE,0x08,0xEF,0x55,0xE1,0x7B,0x69,0x34,0x49,0x7D,0x36,0xB3,0x26,0x95,0x7D, - 0x84,0x52,0x1D,0xFA,0x90,0xA2,0x5B,0x60,0x48,0xB4,0xA7,0x39,0x6D,0xCC,0xD8,0x17,0x63,0x56,0x89,0xCB, - 0xDC,0x82,0x16,0x4B,0x2E,0x19,0xCE,0x31,0x5B,0xA6,0xFA,0x3A,0x28,0x52,0x01,0x95,0x91,0xC9,0xAD,0x81, - 0xF5,0xC9,0xDC,0x37,0xD2,0x5D,0x61,0xBA,0x79,0xF4,0x8C,0xB8,0x82,0xF4,0xBD,0x0D,0xA4,0x80,0x12,0x7E, - 0x3C,0xB7,0x95,0xDA,0xBB,0xDB,0x8F,0x05,0x11,0x19,0x56,0xC8,0x0C,0x1A,0xB7,0x73,0x34,0xED,0x54,0x89, - 0x12,0xA4,0xC9,0x19,0x0A,0xD0,0xFD,0x79,0x48,0xB3,0xAC,0x30,0xE4,0x7E,0x96,0x74,0x0C,0x47,0x8C,0x68, - 0x2C,0xCF,0x28,0x6D,0xC2,0x9E,0xDC,0x22,0xD0,0xAC,0xA6,0x9E,0xE4,0xDB,0x8C,0xC2,0x55,0x3F,0x15,0x8E, - 0x43,0xBD,0x57,0x52,0x53,0x15,0x89,0x8F,0x82,0x2F,0xED,0x06,0x49,0x8B,0x29,0x6D,0xA8,0xDF,0xF5,0x2E, - 0x87,0x92,0xDE,0xB9,0xE1,0xD2,0x5B,0x25,0xC8,0x54,0x00,0x64,0x4C,0x90,0xB7,0x3D,0x64,0x35,0xB4,0x5C, - 0x45,0x40,0xEC,0xD7,0xF7,0xA0,0xA5,0x96,0x25,0xBC,0x2C,0xE9,0xC9,0x70,0x58,0x9C,0x08,0x83,0xC0,0x9A, - 0xA6,0x4C,0x01,0xD1,0x06,0xD5,0x34,0xEF,0x9C,0xE0,0x6F,0x2F,0x3B,0x83,0x83,0x0A,0x2F,0x4F,0x70,0x1A, - 0x83,0x03,0x0A,0x2E,0x4D,0x32,0x29,0x58,0xF6,0x43,0x2E,0x24,0xFE,0xEC,0xBF,0x90,0x71,0x72,0x46,0xB2, - 0x1A,0xE5,0xED,0x11,0x73,0x4D,0xB7,0x1C,0x55,0x04,0x3A,0x4D,0x6D,0x21,0x78,0x24,0xFC,0x14,0x58,0xF8, - 0x44,0x45,0xC6,0xD6,0xF0,0x48,0xA1,0xC2,0x8A,0x52,0xDB,0xAF,0xE3,0xE9,0x51,0x89,0x33,0x4F,0xCF,0x5A, - 0x71,0xF6,0x3B,0xE7,0x4F,0x24,0x97,0x6B,0xA4,0x0C,0xCA,0x1F,0x3B,0xBE,0xEA,0x46,0xA3,0x48,0xE2,0x88, - 0xBA,0xF0,0x81,0x23,0x00,0xAC,0xF2,0x2F,0xB3,0x3C,0x80,0x3D,0xFF,0xE0,0xEA,0x3A,0xB4,0xCB,0x77,0x26, - 0x9F,0xBE,0x00,0xD2,0x5D,0x86,0x15,0x60,0xE8,0x35,0xE3,0x2B,0x4F,0xEF,0x8A,0x7D,0x27,0x55,0xB2,0x3A, - 0xD8,0x8B,0xCD,0x6E,0x01,0x97,0xAF,0xC3,0x6C,0x7A,0x95,0xEF,0x62,0xA4,0x6B,0x23,0x9D,0xCD,0x66,0xED, - 0xEA,0x1D,0xB4,0xCE,0x58,0x04,0x1A,0x46,0xB9,0x77,0x2B,0x8A,0x48,0x7E,0x61,0x1C,0x34,0x5D,0xAA,0xC6, - 0x33,0x16,0xE2,0xB0,0xE4,0xEF,0x82,0x72,0xB2,0x82,0xDA,0x4D,0x28,0xDB,0x75,0x29,0x71,0xD3,0x86,0xB2, - 0x1C,0xD5,0x4A,0xAB,0xC8,0x13,0x8D,0x56,0x96,0x9F,0x5C,0xA2,0xDA,0xE3,0xFE,0xE4,0xEC,0x99,0x2B,0xEB, - 0xDB,0x8D,0x24,0xFD,0x27,0xE4,0x1C,0x9B,0xC5,0x31,0xEC,0x02,0x81,0x39,0x98,0x27,0x24,0x71,0xBC,0xA6, - 0xBC,0x21,0x28,0x23,0x7D,0x3E,0x87,0x9F,0x56,0x1C,0x1D,0x41,0xE1,0x5C,0xEC,0x89,0x5B,0x24,0xA6,0x70, - 0xF0,0x19,0x21,0x7C,0x65,0x8F,0x0D,0x92,0x45,0x53,0xB9,0x88,0xDE,0xA7,0x2A,0x91,0xCD,0xFF,0xBE,0x64, - 0x31,0x3E,0x6F,0x2B,0x0E,0xB7,0x6D,0x33,0xD1,0x05,0x3E,0x3D,0xCD,0x17,0x71,0x81,0xFC,0xBF,0x8C,0x42, - 0x24,0x44,0x4F,0x00,0x66,0x09,0xDB,0x63,0x03,0x18,0xFA,0xB4,0xC8,0x18,0xFA,0x1A,0xAB,0x1E,0xA3,0x06, - 0x73,0xFA,0x1B,0x72,0x52,0x15,0xAD,0x17,0x5F,0x67,0xB5,0xEE,0xAE,0xDC,0x0D,0xC3,0x74,0xBE,0x13,0xFE, - 0x94,0x13,0xFA,0x53,0xE1,0xC6,0x7F,0xB5,0xD3,0x96,0x9D,0xB3,0x73,0x7A,0x18,0x93,0xEE,0xB8,0xF4,0x24, - 0xBC,0x7A,0xF6,0xBA,0x04,0x2C,0x88,0x92,0x7A,0x2A,0x2A,0x6B,0x79,0x99,0xE6,0x0E,0x88,0x30,0x2D,0xA0, - 0x51,0x54,0xEA,0xC0,0x17,0xFA,0x6F,0x9F,0xC7,0x2A,0x1E,0xC8,0x7E,0xCB,0xA4,0xB5,0x94,0x6E,0x71,0x9E, - 0xD6,0x55,0x76,0xDA,0x08,0x1A,0x2B,0x64,0x6C,0x46,0xC2,0xD4,0x60,0x7D,0xC1,0x1F,0xFB,0x29,0xDC,0x35, - 0xA3,0xFE,0xD8,0xF6,0x81,0xE7,0x26,0x7F,0x04,0xC7,0x8E,0x6C,0x58,0xB4,0x76,0xDF,0x44,0xEC,0xDB,0x5A, - 0x35,0xDD,0xD2,0x89,0x52,0x6B,0x3E,0xEE,0x76,0x5F,0x19,0xF3,0x47,0x55,0xE7,0x36,0x4E,0x25,0x55,0x9D, - 0x11,0x61,0x8F,0xC8,0x5D,0x9B,0x6B,0xFB,0xE1,0xFF,0xD1,0xF2,0xB9,0x0D,0x25,0xF9,0x5C,0x76,0xB1,0x2E, - 0xB4,0xBE,0xDB,0x9F,0x7F,0x8E,0x8A,0x77,0x68,0x6F,0x51,0x46,0xD6,0x48,0xF2,0x26,0x74,0xEB,0xEF,0xED, - 0xC2,0x43,0x03,0x67,0x2D,0x2E,0x20,0xCF,0xED,0x4C,0x38,0x46,0x33,0x97,0xC1,0x39,0x1F,0xD9,0xBF,0x3C, - 0x96,0x10,0x12,0xA3,0x76,0xC8,0xFB,0x14,0xE0,0xCD,0x4F,0x97,0xB2,0x1A,0x3D,0x66,0xE1,0x2C,0xB6,0xD7, - 0xD1,0xBE,0xE7,0x32,0x70,0x22,0x6B,0x33,0x3B,0x0D,0x60,0x36,0x70,0x13,0x6F,0x51,0xE3,0xC5,0xC2,0xA2, - 0x54,0x56,0x28,0x53,0x5E,0x0A,0x64,0x3B,0x85,0x5A,0x0A,0xDE,0xA8,0x21,0xD0,0x60,0x30,0x9C,0x82,0x50, - 0xEE,0x8B,0xBF,0x42,0x33,0x79,0x82,0x92,0x46,0xCB,0x9B,0xE1,0xC8,0xAD,0xFD,0x22,0xBB,0x08,0x09,0x6C, - 0x5C,0x5A,0x67,0x44,0x60,0x22,0x4E,0xF1,0xC9,0xF1,0xB9,0xEE,0x18,0xF5,0xBC,0xED,0x73,0x27,0xEA,0xAC, - 0x60,0xC9,0x3E,0x5F,0x28,0xCE,0x32,0x5F,0xCB,0x0B,0x9C,0x34,0xF2,0x38,0xC0,0x2C,0x6D,0x9D,0xFC,0x05, - 0xAE,0x28,0xFB,0x8B,0x3E,0xC0,0x03,0x3F,0x6C,0x25,0x5B,0x39,0xFB,0xAE,0x00,0xD2,0x31,0x1B,0x43,0xB8, - 0x28,0x8B,0x30,0xAC,0xF5,0x84,0x8D,0x26,0xF9,0xC6,0xE5,0x3B,0x38,0xE8,0x7C,0x60,0xA6,0x03,0xBA,0x55, - 0x79,0x4C,0x6C,0x40,0xE9,0xF1,0xEC,0x8C,0x18,0xB3,0x71,0x07,0xA7,0xF0,0x31,0x5E,0xD2,0x36,0x97,0x9A, - 0xE7,0x90,0x99,0x8D,0xF8,0x2D,0xF7,0x36,0x29,0xF2,0x54,0xB2,0x7B,0xFD,0x0B,0xA3,0x48,0x19,0x6C,0x2A, - 0x0C,0x64,0x33,0x7E,0x62,0x36,0x90,0x2B,0x19,0x18,0x23,0x5E,0x36,0x40,0x64,0x4F,0xBB,0xA1,0xBD,0x3C, - 0xD7,0xAD,0xBC,0x7A,0x9C,0x3D,0x0E,0xA2,0xA2,0x54,0x1F,0xC6,0x50,0x9D,0x77,0x12,0x97,0xFB,0x37,0x25, - 0x1B,0x9E,0x7A,0x9C,0x8A,0x00,0x86,0xC5,0x45,0x78,0x50,0x7A,0x51,0x01,0x93,0x21,0x5B,0x71,0x5D,0x85, - 0x6D,0xDF,0x0A,0xE3,0xAE,0xDF,0x8D,0x81,0xCB,0x15,0xD9,0xB1,0xDA,0x3C,0x27,0x22,0xD9,0xFC,0x9B,0xA6, - 0xC5,0xFA,0xB5,0x68,0x83,0x9B,0x9C,0x2B,0x05,0x34,0x0D,0xF4,0xC7,0xEB,0x94,0x06,0x9B,0x05,0x36,0xB0, - 0x00,0xCE,0xBB,0xA6,0xCC,0xC8,0xA1,0x8B,0xEC,0x23,0xF8,0xA8,0x10,0x55,0x1D,0xC4,0x0E,0x1B,0xFF,0x3E, - 0xB4,0x07,0x2E,0x09,0xAE,0x1B,0xA7,0x1A,0xE2,0x70,0xBC,0x2C,0x91,0x6C,0x61,0x46,0x90,0x3D,0x55,0xF4, - 0x32,0x2A,0xA5,0xF7,0xBB,0xFA,0xF7,0x5D,0x89,0x87,0x06,0xBE,0x58,0xB6,0x03,0x6F,0x81,0x09,0x7E,0x31, - 0x91,0x29,0x36,0x66,0x85,0x14,0xDC,0x03,0xD2,0x5D,0x04,0xBA,0xDA,0xF4,0x86,0xB5,0xFE,0x8B,0xB3,0xEB, - 0x53,0x7F,0xF9,0x8B,0x51,0x35,0x71,0x91,0x01,0x2B,0xCF,0xA1,0x11,0x13,0xF0,0x71,0xE9,0x59,0x1F,0xAC, - 0x89,0x94,0x0A,0xC9,0x69,0x4D,0xD9,0xD8,0x79,0x1B,0xC4,0x31,0xD5,0x5C,0x58,0xB3,0x3C,0x0E,0x7D,0x6A, - 0xD0,0xF4,0xB6,0xEF,0x2F,0x73,0xFD,0xA9,0xE3,0xF4,0xF6,0x27,0x08,0xB9,0x87,0x8E,0xE9,0x6A,0x4B,0x1E, - 0x7D,0xAC,0xD0,0x48,0x56,0xD7,0x4C,0xAF,0x49,0x5B,0x0D,0xEB,0x49,0x45,0xB7,0xEF,0xF7,0xD3,0xD9,0xCA, - 0x9A,0x0E,0x75,0x9A,0xB5,0x40,0x9B,0x1B,0x90,0x7F,0x31,0x7F,0x7B,0x17,0x58,0x25,0xA5,0x9F,0x36,0x17, - 0x6C,0x80,0x4E,0x1B,0xAD,0x71,0xD5,0xD5,0xD8,0x6B,0x10,0xFC,0xA9,0x8C,0xBE,0x23,0xFE,0xE5,0x63,0x41, - 0x6E,0x7E,0xE4,0xD9,0x62,0xE1,0x95,0x61,0x3F,0xE7,0x11,0x23,0xF7,0xA9,0x9D,0xB0,0xE7,0xC8,0xB5,0xC5, - 0xF0,0x4F,0xD4,0x79,0x04,0x8E,0x93,0xA7,0x0F,0x0C,0x62,0x33,0xFA,0xB2,0xE6,0xE5,0xA6,0x15,0x18,0x84, - 0x58,0x29,0xA5,0xA4,0x6D,0x84,0xC4,0x11,0x2A,0xCB,0x30,0xEF,0x15,0xA6,0x08,0x51,0x52,0x86,0x17,0x2C, - 0x9A,0x53,0xE8,0x8A,0xF1,0x7E,0xA2,0x97,0x2B,0x4A,0xF7,0x13,0x06,0x79,0x21,0x7E,0x59,0xAB,0xC5,0x10, - 0xF6,0xC9,0xB4,0x93,0xD7,0x56,0xAE,0x56,0x24,0x83,0xE1,0x47,0xCF,0x10,0x28,0xF7,0xE3,0xB7,0x59,0x05, - 0xB5,0xD1,0x7B,0x62,0xA9,0x57,0x06,0x2A,0xD4,0xBB,0x6C,0x8F,0x74,0x63,0x22,0x8E,0x74,0x48,0x51,0xE1, - 0x8E,0x84,0xF4,0xFC,0x19,0x04,0x89,0x0F,0x4B,0x29,0xBC,0xD6,0xD9,0x24,0x22,0x6D,0x73,0x07,0x03,0x1C, - 0xF2,0xCE,0x61,0x2F,0x30,0xDB,0x89,0xDC,0xE8,0xEE,0x52,0x74,0xF1,0x74,0xBA,0x9B,0xDD,0xE0,0x5E,0x7C, - 0x24,0xFA,0xC5,0x13,0x5F,0xCF,0xE6,0xBA,0x06,0x83,0x60,0xA8,0x18,0x1D,0x29,0xC4,0x35,0x1F,0x8C,0x69, - 0x3D,0xCC,0xFB,0x05,0x2B,0x20,0xD0,0xBC,0x3B,0x76,0xBA,0x5E,0x53,0x8C,0x6A,0x61,0x63,0xEB,0x33,0x57, - 0x82,0xCC,0xC8,0x2D,0x1C,0xB9,0xC4,0x43,0x3A,0x2F,0x8B,0x72,0xF7,0x96,0x76,0xBB,0xC1,0x89,0x8E,0xA2, - 0xBC,0x02,0xA0,0x79,0xB0,0x8B,0xDB,0x2E,0x7E,0x67,0xA0,0x7D,0xA6,0xC7,0x04,0xF4,0x56,0xB5,0x3C,0xB6, - 0xAC,0xE1,0xEA,0xC3,0x78,0x7D,0x98,0xED,0x86,0xEE,0x1F,0x37,0xC9,0xF2,0xD0,0xC1,0x15,0x77,0xA4,0x1F, - 0x94,0x4E,0x6F,0xFD,0x07,0xCD,0xDB,0x80,0x15,0xF3,0xA0,0xB0,0xD0,0x43,0xCB,0x92,0x1D,0xCB,0x4D,0x3D, - 0xEA,0xD1,0xF6,0x97,0xB3,0xF3,0xA0,0xC0,0xD0,0x5A,0x42,0x33,0xAD,0xC0,0x04,0x6C,0x14,0x99,0x08,0xBD, - 0xA8,0x3F,0x4B,0xA5,0xA4,0x34,0xCA,0xCB,0xD5,0x0F,0x54,0x20,0x04,0x26,0xCC,0x5C,0x36,0x8D,0xDF,0xF5, - 0xCB,0xD8,0x69,0xD6,0x71,0x44,0x1F,0x23,0xAA,0xF3,0xC5,0x2D,0x47,0x3F,0x3D,0x52,0x3A,0x92,0xCC,0x1B, - 0xFA,0xB4,0x32,0xD6,0xFD,0x2A,0xB7,0x37,0xCB,0xF5,0x80,0x77,0x9F,0x4B,0xA1,0x0A,0x46,0x2C,0x24,0xCB, - 0x2C,0x98,0x43,0x90,0x16,0x4C,0x16,0x40,0x85,0xA9,0x15,0x86,0xA0,0xC9,0xDF,0x4E,0x8E,0xF7,0x1A,0xFC, - 0xB2,0x3F,0xBB,0xA9,0x51,0x80,0x7E,0xA7,0x47,0x45,0x27,0x8B,0x4D,0x9C,0x77,0xAB,0x1D,0x25,0x2D,0xA9, - 0x7E,0xD2,0xE8,0xAE,0x1D,0x05,0x76,0x6B,0x08,0xED,0xAE,0xE5,0xDC,0xBF,0x19,0x83,0xD0,0xC0,0x00,0xE4, - 0x2C,0x26,0x70,0xA8,0x4E,0x8F,0xA3,0xE2,0x5D,0x9C,0xCB,0x08,0xB2,0x98,0x72,0x6A,0x42,0xFD,0x9F,0x29, - 0xA3,0x40,0xEE,0x9E,0x75,0x16,0x46,0xCB,0xCE,0xA2,0x6B,0xB9,0xBD,0x5D,0x19,0xCD,0x4F,0x1D,0x9F,0xB0, - 0x31,0x38,0xD4,0xEC,0x42,0xBB,0x37,0xD3,0x31,0x53,0x17,0xFC,0x52,0x90,0x97,0xDB,0x42,0x3A,0x25,0x7F, - 0x97,0x70,0xF7,0xFE,0xDB,0x72,0x7E,0x38,0xE9,0x91,0xF8,0x86,0x15,0x24,0x53,0x98,0x12,0x88,0xB6,0xC4, - 0x3C,0xC2,0x62,0x92,0x81,0x69,0x20,0x91,0x35,0x63,0x18,0x30,0x41,0xE1,0x0E,0xC7,0xD5,0xEC,0xAD,0x93, - 0xC2,0x08,0xB9,0x55,0x10,0x2D,0x52,0xF1,0x92,0x8B,0x07,0xD5,0x2F,0xC3,0x31,0xF1,0xC9,0xAE,0x9E,0xDC, - 0x14,0x03,0x19,0x31,0xC1,0xA3,0xCB,0x37,0x3A,0x07,0x12,0xCB,0xE9,0x60,0x53,0x2A,0xB1,0x41,0x0A,0x62, - 0xF1,0x19,0x27,0x1A,0x31,0x6B,0x20,0xB8,0x0F,0x48,0x9D,0x27,0x2B,0x2A,0x99,0x0F,0xCE,0x27,0xD0,0x39, - 0x30,0x25,0xD1,0xBD,0x18,0xFD,0x7C,0xA7,0x94,0x77,0x4B,0x63,0x50,0x4C,0xA9,0x42,0x71,0x60,0x5B,0x55, - 0x78,0x15,0x7D,0x26,0xA7,0x28,0xA6,0xB6,0x7E,0xB1,0xA1,0xF7,0xD2,0x3F,0x97,0xBA,0x04,0x78,0x12,0x88, - 0x34,0x6F,0x12,0x28,0x48,0xEA,0xAA,0x1C,0x58,0x97,0xCA,0x35,0x29,0xA9,0x04,0xE0,0x91,0xD2,0x1A,0x38, - 0x41,0x50,0x25,0x67,0xAA,0x94,0xDC,0x63,0xFF,0x6A,0x5C,0x0C,0x9E,0x5B,0x13,0x29,0xC8,0xDB,0xA9,0x9D, - 0xD0,0xD6,0x18,0x1B,0x24,0x0D,0xA3,0xF1,0x7D,0x50,0x1B,0x39,0x8D,0x6D,0x83,0x6C,0x30,0x40,0xFA,0xF8, - 0x0A,0x93,0xC7,0x45,0x9A,0xA9,0xEB,0x18,0xCA,0x5A,0x90,0x8E,0x21,0x6D,0x32,0x5C,0xEB,0xD8,0xA8,0x4C, - 0xF2,0xB7,0x7A,0x6D,0xC9,0x49,0x01,0x3E,0x5D,0x9F,0xD3,0x3A,0xA1,0xA5,0x53,0x3E,0xC9,0x40,0x5B,0x79, - 0x4D,0xDC,0x88,0x6D,0xA5,0x6E,0x33,0x7D,0x7E,0x40,0x83,0x4C,0xFB,0x90,0x51,0x1B,0x8A,0x47,0xF4,0x02, - 0x8E,0x66,0x00,0x81,0x20,0x10,0x8A,0xE2,0xD2,0x10,0xBC,0xA1,0x81,0xFF,0x81,0x5A,0x76,0xD1,0x0C,0x90, - 0xDE,0x11,0x48,0x6A,0x51,0xEE,0x46,0xB5,0xC2,0x57,0xF6,0xC7,0x5A,0x0E,0x05,0x80,0x5F,0xED,0xC4,0xF6, - 0x93,0x5E,0x5C,0x23,0xE5,0x98,0x19,0x59,0x2E,0x89,0xF2,0x6E,0x5E,0x13,0x72,0xEB,0xF3,0x8C,0x95,0x7D, - 0x42,0x55,0x44,0xB5,0x8A,0x63,0xED,0xBE,0xB7,0x55,0xBB,0xB7,0x61,0x9F,0x72,0x01,0xC1,0xD1,0x32,0x14, - 0xC6,0x7B,0xB5,0xA3,0x19,0x77,0xF3,0x93,0xED,0x98,0xCB,0x0F,0x92,0xF6,0xEA,0x16,0xDF,0x7A,0x7B,0x69, - 0x2F,0x74,0xBD,0xC1,0x52,0xC9,0xAA,0x8A,0x91,0x56,0xB5,0x5A,0x07,0xFD,0xB0,0xF5,0x26,0x95,0xB5,0xA5, - 0x33,0x28,0x25,0x0F,0x1E,0xF6,0x4D,0x32,0xF1,0x82,0x06,0x77,0x28,0xE7,0x46,0x10,0x9E,0x95,0x9E,0xC8, - 0x0B,0xA3,0x56,0x85,0x8D,0xA3,0x0E,0x67,0xD6,0x19,0x8C,0x67,0x3F,0xEB,0x66,0x3A,0x6C,0x33,0xC2,0x53, - 0x4E,0x79,0xF8,0x77,0x57,0x3A,0xDF,0xCA,0xB6,0xC5,0x6F,0x8E,0x8B,0xA5,0x70,0x50,0x3B,0xD7,0x0B,0x66, - 0x5E,0xE4,0x7F,0x65,0x5D,0x80,0x27,0xE9,0xE1,0x54,0xA8,0x94,0x09,0x6A,0xEE,0x5C,0xAF,0x8E,0x9C,0xCE, - 0xA8,0x36,0x6E,0x13,0x9F,0x3F,0xD2,0xAB,0xFB,0x72,0x44,0xBA,0x68,0xEA,0xB0,0xDA,0xDA,0x9E,0x66,0x0B, - 0x53,0x38,0x80,0x6F,0x7F,0xD6,0xAF,0x5C,0x28,0x1A,0x84,0xBE,0xCA,0x8F,0x2C,0x6D,0xDE,0x8F,0x74,0x7B, - 0x26,0x98,0x37,0x79,0xF3,0x35,0x5A,0x2E,0x37,0xB2,0x67,0x0A,0xDF,0xF2,0xBD,0xF9,0x1A,0xD0,0x00,0x47, - 0x67,0x7F,0xB1,0x15,0x3B,0xA8,0x60,0x23,0x3D,0xC3,0x96,0x13,0xF7,0x65,0x10,0xC2,0xF8,0x8E,0x80,0xEE, - 0xD9,0xE3,0x40,0x50,0xA7,0xA1,0xC0,0x93,0xA2,0x1C,0x59,0x81,0x04,0x2A,0x87,0xF7,0x9D,0x19,0x75,0x3E, - 0x46,0x35,0xA7,0x45,0x2B,0x4F,0xC5,0x37,0x8D,0x83,0x39,0x88,0xB7,0x73,0xBD,0xF4,0x45,0xE3,0xAB,0x75, - 0x3E,0xD2,0x61,0x3D,0xA1,0x9F,0x9F,0x44,0x52,0x25,0x08,0x24,0x08,0xA8,0x31,0xE4,0x5F,0x09,0xD7,0xB4, - 0x23,0xE6,0x97,0x2D,0x7F,0xA8,0x70,0x63,0x74,0x61,0x0F,0x08,0x34,0x23,0xFB,0x3D,0x21,0x96,0x9E,0x00, - 0x98,0x26,0x4F,0xEE,0x04,0xE6,0xAB,0x9D,0x75,0xE0,0x92,0x2C,0xE7,0x09,0xFB,0xAF,0x7C,0xE3,0xC3,0x13, - 0xC3,0x89,0x81,0x50,0x74,0x1C,0x26,0x0B,0x0C,0xA8,0x26,0x8A,0x64,0xA0,0x9E,0xEA,0x17,0x84,0x09,0x9E, - 0x90,0x47,0x2E,0x1B,0x05,0x76,0x24,0x9A,0x21,0xAE,0x96,0xD2,0xCD,0x0F,0xD0,0xCF,0x7F,0xE9,0x27,0x0A, - 0x84,0x75,0x7C,0x0B,0x9A,0xDB,0x77,0xC2,0xBB,0x27,0xA2,0xC3,0x02,0x91,0x2F,0x1B,0x8D,0x8B,0x6B,0x23, - 0x15,0xB0,0x33,0x62,0x4A,0xCB,0x9D,0xDE,0xF7,0x1E,0x9D,0x34,0x6C,0x7A,0xD8,0xFE,0x4C,0x03,0xB0,0x4E, - 0x92,0x2D,0x76,0xEA,0x40,0xDB,0xF5,0xBC,0x1F,0xC2,0xB0,0x5F,0x91,0x79,0x47,0x3D,0x85,0xE6,0xF0,0x7F, - 0xFC,0xAF,0x98,0x6F,0x6F,0x95,0x47,0x3D,0x10,0x71,0x54,0x43,0x2F,0xF1,0x93,0x2E,0x52,0xE3,0xFB,0x14, - 0x72,0xF3,0x7E,0xAC,0xEF,0x22,0x33,0xAF,0x26,0x2E,0xEC,0x74,0x5D,0xE5,0x20,0x82,0xDB,0x6F,0xB5,0xD9, - 0xCD,0x4C,0x54,0xE3,0xE8,0xDD,0x74,0x82,0x9D,0x5D,0xD3,0x6D,0x25,0x6E,0xF6,0xB8,0x1A,0xF3,0x34,0x37, - 0xC4,0x59,0x10,0xD0,0xAB,0x2C,0x25,0x82,0xA4,0x6D,0x0E,0xFD,0x61,0xC7,0x3F,0x23,0x47,0xD4,0x23,0x47, - 0x26,0xB3,0xD2,0x93,0x5A,0x93,0x3F,0x84,0xB3,0x63,0xBD,0x51,0x44,0x5B,0xA7,0xB5,0x1E,0xFC,0xA4,0xE2, - 0x55,0xD6,0x00,0x39,0x55,0xB6,0x65,0xF1,0x4D,0xDB,0x17,0x15,0xA8,0x5F,0x2F,0x40,0x2F,0x38,0xBE,0x5D, - 0xDC,0xD1,0x7C,0xCF,0x98,0x88,0x82,0xC0,0x9C,0x10,0xA3,0xEA,0x29,0x3B,0xF2,0x34,0x32,0x3B,0x47,0x1C, - 0x5F,0x8D,0x92,0xEF,0x1D,0x60,0xA8,0x41,0xA7,0x9F,0x52,0x35,0xEF,0xB3,0x2B,0x11,0x10,0x2A,0xA3,0xC4, - 0xE3,0x58,0x26,0x8A,0xD3,0x67,0x2C,0x0A,0x18,0x72,0x34,0x48,0xCD,0x50,0xF7,0xC8,0x1D,0xFC,0x2E,0x65, - 0x2D,0x99,0x6E,0x9B,0x3B,0xC8,0x36,0x58,0xEF,0x91,0xA9,0x8F,0xDC,0x78,0xD8,0x8B,0x53,0x65,0x67,0x03, - 0x82,0xF8,0x27,0x49,0x4D,0x52,0xD1,0x4D,0xD8,0x57,0x6C,0xA7,0xFF,0x18,0x32,0x9B,0xC1,0xD2,0x1B,0xD9, - 0xAC,0xFB,0xDF,0x4C,0x79,0x76,0xB6,0x0C,0x6C,0x87,0x8E,0xEA,0x41,0xFF,0x60,0x88,0x91,0x01,0xC4,0xA8, - 0xEC,0x41,0x37,0x2B,0x8A,0xC2,0xB6,0xDF,0x69,0x40,0x2B,0x98,0xD8,0xB8,0x7C,0xB9,0x51,0x21,0x46,0xBD, - 0x51,0x21,0x3C,0xCF,0x43,0x4C,0xA3,0x15,0xE8,0x8F,0x5C,0x95,0x2B,0xE5,0x6E,0xBD,0x10,0x29,0x64,0x3F, - 0x50,0xB9,0x47,0x14,0xE9,0x8E,0x2B,0xA1,0x6C,0xC0,0x7E,0x1B,0xD4,0x94,0xD6,0xE6,0xE7,0x9D,0x03,0x62, - 0x2B,0xF1,0xC9,0x52,0xDD,0x7B,0x69,0xB0,0xD7,0xBE,0xF3,0x30,0x72,0xAF,0x26,0xD1,0x21,0x9E,0xD3,0xD6, - 0xB1,0xDE,0x5F,0x0E,0x84,0x4C,0xD4,0xFE,0x61,0x31,0xF6,0xD0,0xB4,0xCC,0x4F,0xB3,0x92,0xC6,0x37,0xA2, - 0xC8,0x84,0x9A,0xE6,0x15,0xAE,0x67,0x91,0x20,0xEC,0x2E,0xF9,0x19,0xF9,0x51,0xA2,0x04,0x05,0x9E,0xDF, - 0x02,0x8B,0x3D,0x73,0x5E,0xED,0xD3,0x59,0x25,0x73,0xC8,0x40,0x69,0xD1,0x67,0x2F,0xCE,0xF1,0x5F,0x05, - 0x8B,0x95,0x60,0x04,0x5B,0xE4,0xBF,0xC3,0x34,0xEE,0xA2,0x1B,0x63,0xFA,0x77,0x79,0xA7,0xE2,0x0E,0x8A, - 0xE1,0x76,0x5C,0x4E,0xB7,0x45,0x7B,0x4A,0x7F,0x8C,0x40,0x62,0xD7,0x7E,0x26,0xF3,0xAF,0x27,0x5A,0x1C, - 0x6B,0x94,0xD0,0xA6,0xF3,0x4C,0x85,0x5B,0x34,0x24,0x9B,0x5F,0x49,0x61,0xBB,0xA6,0xB5,0xFE,0xD0,0x34, - 0x65,0x86,0x24,0x00,0x29,0xC9,0xE4,0x3A,0xB8,0xCA,0xFA,0xE6,0x08,0x8A,0x13,0xBC,0x3B,0xF5,0x75,0xC9, - 0xCB,0x59,0x02,0x5E,0x95,0xDB,0xA4,0x76,0x54,0xD7,0x2B,0xED,0x7D,0xF8,0xE4,0x4B,0xA3,0x3A,0x11,0xCE, - 0x55,0x66,0x57,0xD7,0x85,0xAA,0xF4,0x48,0x71,0xA9,0xC2,0x80,0xC6,0x81,0xC6,0x89,0xB3,0x36,0x42,0x54, - 0x0D,0x3C,0xE9,0x53,0xC3,0x86,0xA0,0x3E,0x6B,0x0C,0x5C,0x80,0xE9,0x96,0xD2,0x37,0x40,0x3F,0x43,0x0B, - 0x08,0x7A,0x0B,0x7D,0xF9,0x0A,0x7F,0xFE,0xFB,0x64,0xAF,0x9E,0x76,0x79,0x6E,0x59,0x1C,0x39,0xF3,0x59, - 0xEF,0x21,0xE5,0xF9,0xBB,0xD4,0x11,0xAB,0x53,0x10,0x3F,0x16,0x34,0x38,0xD4,0x3C,0x2A,0xF1,0x33,0x91, - 0x1B,0x61,0x86,0x8E,0x19,0xE5,0x50,0xF2,0xC6,0x21,0x4A,0x9D,0x8A,0x20,0xA4,0x64,0x2D,0x8E,0x5A,0x84, - 0xA6,0x52,0x05,0x42,0x94,0x29,0x06,0x52,0x90,0x8F,0x91,0x27,0x70,0x38,0x9C,0x15,0x99,0x07,0x35,0x6A, - 0x33,0x64,0x1B,0x8C,0x61,0x7F,0x71,0x26,0x9D,0x7B,0x52,0xEC,0xDD,0xB9,0xCA,0x26,0xC5,0x49,0xED,0xBE, - 0xBF,0x29,0xAC,0xD6,0xBA,0x7B,0xB7,0xAF,0x2D,0xEA,0xEC,0xAA,0x90,0x50,0xEA,0x03,0x8B,0xFE,0xDC,0x18, - 0xAD,0x0E,0x50,0x7D,0x2F,0x74,0x4A,0x3A,0x30,0x7E,0xFA,0xFF,0x06,0xA2,0x43,0x16,0xC2,0xED,0x6A,0xD7, - 0x73,0x73,0x72,0x37,0x4A,0x55,0x6F,0xF5,0x66,0x41,0xB7,0xE6,0x9F,0x74,0xF9,0x0C,0x10,0x7F,0xCC,0xEE, - 0xCB,0x5D,0x86,0x2A,0xDE,0xA0,0x90,0xDE,0x93,0x99,0x76,0x97,0xAD,0x4D,0x36,0xDB,0xC4,0xBF,0xEF,0xED, - 0xC8,0x46,0x08,0x23,0x92,0x98,0xBC,0x6B,0x04,0xE7,0xBF,0x76,0xBE,0x8B,0xD7,0xB9,0x82,0x5C,0xB7,0xB9, - 0x75,0xD7,0xAB,0xFB,0x56,0x7E,0x9C,0xE3,0x7B,0x1B,0xAB,0xDB,0x52,0x3E,0xFF,0x13,0xE4,0x39,0xFD,0x2A, - 0x86,0xE1,0x02,0x1C,0x44,0x3A,0x70,0xA8,0xBA,0xF8,0xA8,0x4D,0x05,0x70,0x53,0x30,0xAF,0xD6,0xEE,0xCF, - 0x9A,0xC2,0xDA,0x3E,0xF9,0x5E,0x52,0x00,0xA5,0x86,0x3F,0xED,0x4B,0xB1,0x4F,0xA0,0x19,0x38,0x5B,0xF2, - 0x81,0x2A,0x0C,0xFA,0xFC,0xDF,0x4B,0x31,0x27,0xD2,0x63,0x4F,0xA3,0x37,0xBC,0x02,0x94,0x5F,0xB5,0xD2, - 0xCB,0x2A,0x99,0x5C,0x87,0x8E,0xDE,0x01,0xB5,0xE1,0xCB,0xD3,0x45,0xC0,0xCD,0xD4,0x75,0x92,0xBE,0x0D, - 0x35,0xFD,0xA9,0x70,0xEE,0xA7,0xAB,0x1C,0x3D,0x74,0x2E,0xDC,0xF4,0x3E,0xC1,0x3C,0xA0,0x56,0xF8,0x73, - 0x31,0x3D,0x17,0x83,0xCD,0xB7,0xEB,0xAA,0xA8,0xA0,0x16,0x5C,0x10,0x1E,0x58,0xC7,0x34,0x7C,0x2A,0x09, - 0xF9,0x81,0x84,0x07,0xD5,0x9C,0xDB,0xCC,0x05,0x26,0xB0,0xD8,0xED,0x5F,0x30,0x5D,0x4E,0xA8,0xA0,0x7E, - 0x02,0x49,0x0E,0x7E,0xF2,0x23,0x5F,0x72,0xCE,0x58,0xDF,0xE5,0xA6,0x6A,0xB0,0x63,0x20,0xF2,0xA1,0x6A, - 0x58,0xEA,0xE1,0x85,0x15,0xE0,0x59,0xA1,0x12,0x00,0x38,0x20,0x1C,0xCF,0x7C,0x93,0xE3,0xC5,0xC6,0x2C, - 0xD4,0xC7,0x1F,0x82,0x05,0x87,0x26,0x98,0xD1,0x66,0x8B,0x8E,0x34,0x9C,0x16,0x6C,0xE3,0xC4,0xA2,0xB5, - 0xA5,0xCB,0x88,0x9E,0x7A,0x9C,0x8E,0x9E,0x35,0xBC,0x29,0x9A,0x65,0xE4,0xA9,0xC9,0x39,0x14,0xC2,0xAF, - 0x4C,0x59,0xDC,0x04,0x08,0xDE,0xC4,0x71,0x4E,0xA0,0xF3,0xB7,0x82,0x6B,0x13,0xDC,0x50,0x37,0xEB,0x32, - 0x23,0xC9,0x47,0x60,0x5F,0xB1,0x6D,0x02,0x26,0x7A,0x3C,0x3D,0x5A,0xAA,0x77,0xCD,0x83,0x71,0xBC,0xAC, - 0x1C,0x29,0xD9,0x10,0x9B,0x30,0xAD,0x4A,0x7C,0xFC,0x29,0x41,0x8B,0x19,0xD2,0xB0,0xB3,0xA0,0xDD,0xE5, - 0xA4,0x7B,0xC2,0x85,0x7E,0xDE,0x86,0x35,0x18,0x84,0x1C,0xCD,0x9B,0xAA,0x4C,0x34,0x1A,0x18,0xFB,0xED, - 0x6C,0x63,0xCF,0xDF,0xB7,0x1B,0xA1,0x00,0x20,0xF2,0x25,0xE1,0xCB,0x13,0xC5,0x9E,0x17,0x95,0x1C,0x8D, - 0xA0,0xC4,0xEC,0x9B,0x07,0xF4,0x0C,0x4C,0xC8,0xDD,0xA4,0x68,0xBC,0xC0,0x54,0xB5,0xD8,0x9E,0x2E,0x7E, - 0x57,0xFC,0xB3,0xD0,0x96,0xB4,0xDC,0x18,0x68,0xB3,0x81,0xA4,0x08,0x6E,0x1F,0x15,0xBC,0xB8,0xC8,0x87, - 0x66,0x85,0xCD,0x23,0xD4,0x5D,0x88,0x95,0x31,0xF7,0xDF,0x96,0xB1,0xDD,0x05,0x48,0x49,0xDE,0xBF,0x06, - 0x77,0xA4,0x7E,0xC3,0x05,0x25,0x66,0xB9,0xB9,0x32,0x1C,0x20,0xE0,0x21,0x62,0x1F,0x3A,0xB6,0x48,0xA4, - 0xD8,0xFB,0x64,0xBB,0x96,0x44,0x78,0xB5,0xE6,0xDB,0x23,0x24,0xCB,0xE4,0x75,0xE2,0x92,0x8D,0x9C,0x87, - 0xF2,0xB0,0xE5,0x24,0xE4,0x23,0xE0,0x99,0x81,0x00,0x53,0xBE,0x79,0x1C,0x95,0xF3,0x95,0xF5,0xC2,0xC3, - 0xE3,0x78,0x4C,0xC2,0x8C,0xFB,0x18,0xBF,0x8F,0xFD,0x36,0xC9,0x18,0x6C,0xCD,0x8D,0xCD,0x27,0x39,0x2A, - 0x5C,0xA6,0x3B,0xA5,0x19,0xD8,0x39,0x8F,0x0E,0x52,0xC1,0xC8,0x9E,0x66,0xAE,0x4D,0x7B,0xF8,0x19,0xA3, - 0x0F,0x4F,0x2D,0x90,0xF1,0xBB,0xA7,0xD8,0x80,0x5F,0x91,0xA7,0x5F,0xB8,0x71,0xB6,0x25,0x30,0x15,0x9D, - 0xAD,0xA0,0x82,0x86,0x12,0x86,0xD3,0xCC,0x91,0x5F,0x46,0x20,0x47,0xC5,0xF2,0x32,0x8C,0x47,0x90,0x98, - 0x18,0x73,0xAD,0xF9,0x78,0xBD,0x7E,0x7A,0x0F,0xDC,0xFC,0x21,0xB9,0x4C,0x20,0x68,0x2F,0x50,0xC7,0x5E, - 0x92,0x0D,0x06,0x8B,0xAA,0xD0,0xD9,0x27,0xAE,0xF3,0x95,0x1A,0x24,0x9E,0xC9,0xCB,0x7B,0x50,0x55,0x24, - 0xA9,0xFD,0x2F,0xFE,0x90,0xBC,0x01,0x65,0x04,0x29,0x0F,0x2C,0x1E,0x93,0xE5,0xEF,0xE1,0x56,0x10,0x1B, - 0x7C,0x62,0x04,0x10,0xBF,0xFF,0xF8,0xE6,0xD6,0x95,0x32,0x9A,0xB2,0x9C,0x8C,0x48,0x30,0x51,0xA7,0x09, - 0xAA,0x05,0xD7,0xD4,0x19,0x23,0xF8,0x73,0x1A,0x3D,0x16,0x7C,0x6D,0xAB,0x2B,0x91,0x3F,0xDD,0x01,0x63, - 0xA0,0xCF,0x59,0x66,0xCF,0x44,0xB7,0x20,0xB0,0x4C,0xA2,0x89,0x2A,0x27,0x0A,0xB2,0x51,0x8C,0x48,0xE5, - 0x61,0x24,0x2C,0x60,0x21,0xC0,0x30,0x24,0x67,0x4B,0x67,0x65,0xDF,0x68,0xFF,0x51,0x8E,0x09,0xAA,0x41, - 0x12,0x65,0x5C,0x37,0xC2,0x4B,0x3E,0x06,0xB8,0xC3,0x39,0x65,0x0D,0x04,0x7B,0x25,0xA0,0x48,0xC1,0xA6, - 0xC0,0xB3,0xB9,0x7B,0x14,0x92,0x21,0x4F,0x45,0xF3,0x0B,0x71,0xE4,0x03,0xFA,0xE7,0x1F,0xA1,0x87,0xE7, - 0xD7,0xC8,0x6C,0x8C,0x68,0x99,0x5D,0x08,0x1E,0x5A,0x2A,0xD3,0x66,0xEE,0xAC,0xF5,0x90,0xB2,0xA6,0x97, - 0xB6,0x84,0x8D,0xF5,0x15,0x44,0x65,0x42,0x2B,0x0A,0x8C,0x61,0xB2,0x91,0xC3,0x0C,0xDB,0x87,0xF6,0x0F, - 0x69,0x64,0x2B,0xD3,0x29,0xFB,0xEB,0x1F,0x33,0xD2,0xEA,0xF7,0x68,0x3D,0x9D,0x7F,0x66,0x19,0x3C,0x3F, - 0x22,0x2F,0xA1,0xCE,0x82,0xC6,0xA4,0x3A,0xE1,0xAA,0x1D,0x0E,0x1C,0xBD,0x68,0x9B,0x80,0xE7,0x31,0x9F, - 0x84,0xC7,0xA9,0x43,0xD5,0xA6,0xE2,0xD8,0x51,0x6B,0x24,0xE7,0x20,0xFB,0x71,0x06,0x8E,0x91,0x1D,0xDB, - 0x8E,0x9A,0x2E,0xB1,0x12,0xD5,0x31,0x6D,0x21,0x98,0xB4,0x65,0x31,0xF8,0x2C,0x51,0x60,0x99,0x92,0x35, - 0x9D,0xFD,0x5A,0x8A,0x19,0x93,0xE4,0x22,0x0F,0xAA,0x3C,0x7F,0xD7,0xAB,0xFC,0x43,0x14,0x5E,0xD0,0x1C, - 0xE7,0x32,0x96,0xC6,0x18,0xBB,0x72,0x96,0xC0,0x92,0xA4,0x56,0xE5,0xF7,0x56,0x4E,0xC2,0x57,0x37,0xCB, - 0x33,0x78,0x01,0x71,0x80,0xA3,0xC5,0xBA,0xB8,0x5E,0x75,0xE5,0xEF,0x5F,0xED,0x81,0x25,0xCF,0x2D,0x62, - 0x2D,0x1E,0x2A,0x02,0xDA,0x95,0x95,0xD1,0x00,0x5C,0x98,0xA5,0xD2,0xD0,0x44,0x02,0xA1,0x52,0x28,0x44, - 0xCE,0x14,0x3C,0x66,0x9E,0x15,0xCE,0xE5,0x51,0x17,0xEF,0xD7,0x82,0x6A,0x2E,0xCB,0xFD,0xB8,0x46,0xDE, - 0x42,0x15,0xAE,0xF0,0x2F,0x6E,0xF2,0xE5,0x7E,0x52,0x69,0x87,0x31,0xE2,0x35,0xE3,0x80,0x5B,0xB5,0x5A, - 0xBE,0x7B,0x89,0x54,0xAD,0x9D,0xB3,0x46,0xD8,0xB1,0xF1,0xD5,0x9C,0x47,0x79,0x83,0x92,0x57,0x99,0x68, - 0x04,0xE5,0x06,0x7D,0xFA,0x78,0xA2,0x4A,0xEA,0x10,0xF6,0xEC,0x56,0xF5,0x08,0xF7,0xAB,0x1D,0xD0,0x07, - 0x2D,0xB4,0xD4,0x5A,0xEB,0x11,0x52,0xDE,0x3A,0x87,0x94,0x77,0xF0,0xAD,0xA4,0x13,0x60,0xCC,0xDE,0x4B, - 0x6A,0x12,0xEF,0x89,0x7A,0x32,0x19,0xFB,0xDD,0x10,0xF1,0x07,0x6C,0x66,0x3F,0xDB,0xAA,0xA0,0xE7,0x3F, - 0xFC,0x10,0xC2,0x4A,0x2F,0x66,0x46,0x3F,0xDE,0x93,0x91,0x18,0x58,0xAD,0xCE,0xDD,0x58,0x3C,0x2E,0x78, - 0x79,0x12,0xB0,0xEE,0xBE,0x2B,0x7E,0x0B,0xE7,0x50,0x1B,0x57,0x7D,0xCC,0x3F,0xA6,0xE9,0xFE,0x71,0x3C, - 0x52,0x2E,0x29,0xEF,0x0B,0xDD,0x47,0x10,0x05,0x3C,0x2F,0x9D,0xA0,0x94,0xEC,0xC7,0x63,0x8B,0xA4,0x09, - 0xC9,0xAE,0xA6,0x7F,0x05,0xF0,0x5D,0x70,0x96,0x9F,0x1C,0xA3,0xE3,0x2B,0x0A,0xC0,0xB9,0x61,0x3F,0xE1, - 0x96,0x69,0x63,0xB2,0xCE,0x31,0xF2,0x9D,0x63,0x0E,0xEB,0xC1,0xC9,0xCC,0xAE,0x6B,0xBE,0x19,0x01,0x06, - 0x82,0xE2,0xC9,0x3A,0x7F,0xE6,0xF8,0xD0,0x40,0x4F,0xB9,0x2A,0xB7,0x74,0x13,0x54,0x5B,0x7C,0x0D,0x75, - 0x7E,0xD1,0xC6,0x96,0x0F,0xCE,0xE7,0xC3,0xDD,0xE7,0xCB,0x2C,0xD3,0x78,0x23,0xE6,0x4E,0x86,0x4B,0x3C, - 0x9B,0x79,0x57,0x51,0xBD,0x41,0xCF,0x65,0xEC,0x20,0xFD,0x92,0xEA,0x2C,0xCE,0x83,0xAF,0xA5,0x99,0x78, - 0x87,0x91,0xDC,0x1C,0x52,0x43,0x21,0xDB,0xDE,0xE4,0xDE,0x7D,0x22,0x32,0xAF,0x55,0xD2,0xAA,0x37,0x61, - 0x83,0xCB,0xED,0x0B,0xB6,0x07,0x27,0x41,0xCF,0x8B,0xDE,0x86,0x4B,0xA7,0x18,0x94,0xFB,0x05,0x16,0x6C, - 0xF7,0x3A,0xC9,0x58,0x30,0x37,0x36,0x5C,0xB7,0x23,0x51,0x3E,0x66,0xC0,0x55,0xFC,0x9F,0xAD,0x9A,0xC9, - 0xC1,0x42,0x45,0xBC,0xE7,0xCB,0x44,0xF0,0x6D,0x1C,0xC3,0x0D,0x91,0x21,0x88,0x9B,0xEA,0x3E,0xD3,0x84, - 0xDA,0xE7,0x22,0x99,0x0D,0x8A,0xA5,0x7D,0xDE,0x56,0xBB,0xD9,0xE9,0xCA,0x83,0xF8,0x03,0xE1,0x03,0x59, - 0x70,0x18,0x3D,0x4B,0x18,0xDE,0x13,0x64,0x9E,0xB8,0x1A,0xE4,0x7C,0x3A,0xCF,0x5F,0x88,0x9B,0xD0,0xB6, - 0xD3,0x62,0x92,0xF0,0x6D,0x1B,0x92,0xF8,0xA3,0xAC,0x45,0x0B,0x56,0x25,0x96,0xCB,0xC8,0x76,0x54,0x9A, - 0x52,0x8E,0x8C,0x92,0xDE,0xE0,0x3B,0xC5,0x74,0x74,0xB2,0x23,0x38,0xEE,0x04,0x86,0xCF,0xC1,0x9B,0xC0, - 0xCF,0xE2,0x62,0xFD,0xA9,0x16,0x0F,0xD9,0x89,0x4C,0x4C,0x85,0xC5,0x5A,0xEE,0xA7,0xD7,0xF6,0xC0,0x00, - 0x16,0x9B,0xF2,0xA5,0xB5,0x1A,0xF8,0xD0,0x26,0x26,0xDC,0xF2,0x4C,0xFE,0xF5,0xC3,0xF8,0x6F,0x06,0xB1, - 0x68,0x57,0xCE,0x41,0x66,0xDA,0x3D,0xDF,0x15,0xFD,0x28,0x8C,0x80,0x26,0x9F,0x87,0x30,0xA5,0x45,0xD1, - 0xA6,0x2D,0x09,0x55,0x77,0xBB,0xE0,0x20,0xFE,0xD0,0xBA,0xC9,0x24,0xFA,0x0A,0xE4,0x87,0x57,0xAE,0xF6, - 0xD5,0xB6,0x46,0x57,0x29,0xF7,0xC5,0xB9,0xA6,0x70,0xE7,0x92,0x63,0xB9,0xFD,0x94,0x95,0xD5,0x46,0xC4, - 0x07,0x69,0x84,0x67,0x60,0x09,0x55,0x10,0x6A,0xDB,0x66,0x54,0x74,0x01,0x27,0xD2,0x25,0xDF,0x9F,0xDF, - 0x53,0x10,0xED,0x8C,0xC4,0xDA,0xFB,0x73,0x83,0x91,0xBE,0x77,0x24,0xD8,0x80,0x2E,0xEC,0x1C,0x4E,0xC8, - 0x2F,0xA7,0x7A,0xCC,0x3F,0x27,0xEE,0x17,0x97,0x9D,0x2C,0x58,0xAF,0xBA,0x46,0x38,0x64,0xBD,0xC6,0xE1, - 0x88,0x05,0x31,0xDD,0xD3,0x1A,0xF3,0x94,0xD7,0xCE,0x4F,0xC9,0xAF,0x65,0xCF,0xCD,0xBF,0x45,0x07,0xE8, - 0xBA,0x92,0x4C,0x64,0xC2,0xBB,0x07,0x6B,0x10,0xD4,0x7F,0x9A,0xC9,0xFD,0x2D,0x28,0xD3,0x10,0xD7,0x72, - 0xDA,0x29,0xAD,0xE8,0x11,0xDF,0xD6,0x1C,0x01,0x03,0x16,0xC1,0xAB,0x09,0xEE,0x1C,0xBC,0xFB,0x6B,0x3E, - 0x92,0x05,0x80,0xF8,0x9E,0x7E,0xA3,0x1B,0xA2,0xFB,0xE6,0xF9,0x46,0x45,0x28,0xFB,0x1D,0x9C,0x37,0x62, - 0x44,0xBF,0xCB,0xB9,0xEC,0x7F,0x58,0xFB,0x30,0xBD,0x67,0xFF,0x62,0x9E,0x8A,0x0C,0x73,0xBE,0xBD,0x39, - 0xEB,0x44,0x0D,0xE6,0xB4,0xD1,0x07,0xCA,0x46,0x91,0xE7,0x1E,0xA2,0x6E,0xE4,0x6F,0xCB,0x45,0x5C,0xC4, - 0x90,0x99,0x78,0x70,0x4F,0x4C,0x3D,0x32,0xC5,0x05,0x3B,0xB9,0x6B,0x66,0xBB,0xA0,0x51,0x41,0x98,0xA5, - 0xB4,0x24,0xF9,0xA3,0x2C,0x23,0xB2,0x82,0x0D,0x0B,0x72,0x33,0xB3,0xAE,0x13,0x11,0x62,0x4E,0x2D,0x12, - 0x70,0xBC,0xE3,0x76,0xDE,0xE1,0x99,0x38,0xB5,0x3F,0x70,0x9D,0x0F,0xFF,0x8F,0xD8,0xAE,0x7D,0x7A,0x40, - 0x86,0x13,0x72,0xBC,0x83,0xEA,0xE7,0x90,0x45,0x43,0x4E,0x6A,0x3E,0x91,0x1F,0x72,0x06,0xAD,0x98,0xA3, - 0xA1,0xA2,0xED,0xE5,0xB6,0x07,0x62,0x10,0xD4,0x67,0xE8,0x4B,0x1F,0xB3,0xF7,0xB4,0xF3,0xF8,0x79,0x00, - 0x62,0x4E,0xC0,0x51,0x5A,0xA7,0x87,0x67,0xF3,0xF5,0x56,0x5E,0x36,0xA2,0x18,0x68,0xEB,0x4E,0x26,0x4E, - 0x7C,0xDC,0x0A,0xE6,0x89,0xFB,0x83,0x18,0x6D,0x93,0xAE,0x5A,0x28,0xEC,0x2E,0x5E,0xEE,0x0C,0x64,0xF6, - 0x7D,0x8C,0xBB,0x51,0x63,0x5F,0xE4,0x53,0x69,0x95,0x33,0x37,0x54,0x0F,0xB6,0x24,0x62,0x4F,0x28,0xAD, - 0x45,0x88,0x43,0x3C,0x3C,0xC2,0xA3,0xD2,0xFD,0xDF,0x1C,0x47,0x58,0x42,0x3D,0x3F,0x39,0xD8,0x51,0xEA, - 0xC2,0x1D,0xFE,0x65,0xD3,0x0C,0x95,0x58,0x88,0x03,0x4A,0x2F,0xB8,0x62,0x60,0x9A,0x4F,0xCD,0xDA,0x3F, - 0x53,0x49,0x22,0xE9,0x5C,0xB1,0xBB,0x7F,0x65,0x35,0x6B,0xDB,0xC2,0xEE,0xFF,0x60,0xD2,0x74,0xAB,0x66, - 0xAF,0x14,0xCA,0x22,0x3C,0x6E,0x80,0x84,0xC3,0x0D,0x8A,0x7D,0x53,0xEC,0xA8,0xC2,0xA3,0xE4,0x7F,0x75, - 0x31,0x30,0xB8,0x3E,0x63,0x71,0x90,0xE3,0xF1,0x7E,0xA8,0x06,0xE9,0x55,0xDA,0xBA,0x53,0x84,0xA4,0x4E, - 0x02,0x81,0x7A,0x45,0xBB,0x01,0xA5,0x9F,0x2C,0xB6,0xA3,0x64,0xB9,0x47,0x4F,0xB8,0x9C,0x4D,0xCB,0x33, - 0xF0,0xC6,0xEB,0xEA,0x60,0x99,0x5B,0xAF,0xD7,0x73,0x8A,0x5B,0x44,0x3F,0xA7,0x46,0x33,0xA7,0x97,0x33, - 0xAE,0x55,0x28,0xC6,0x3A,0x58,0xA5,0x35,0x64,0xD4,0xC5,0x18,0x96,0x36,0xF7,0x9E,0xC2,0x2A,0x8E,0xB4, - 0x63,0xB7,0x5C,0x82,0xE1,0x02,0x09,0x54,0x25,0x15,0xE8,0xBE,0x3F,0x4A,0x8D,0xAE,0x96,0xCB,0x59,0xE1, - 0xE2,0x56,0x94,0x6A,0xF4,0x04,0x34,0xF5,0x21,0x33,0xD5,0x54,0xD3,0x77,0x97,0x13,0xC7,0x15,0x1D,0xFD, - 0xF3,0x37,0x7E,0xD8,0x2C,0xB7,0x16,0x13,0xB7,0x3A,0xF5,0x56,0xCC,0xB5,0x24,0xB3,0x94,0xD3,0xAD,0xAE, - 0xF5,0xFC,0xE6,0x82,0xFF,0xCD,0x89,0x4B,0xED,0xD4,0x9A,0xFA,0xEB,0x2D,0x61,0x78,0x6A,0x5A,0x30,0x8C, - 0x35,0x36,0xD3,0x52,0x8B,0x50,0xA1,0xA8,0x93,0xFF,0x51,0xAA,0xAD,0xB0,0x69,0x6C,0x73,0x7B,0x4D,0x32, - 0x02,0x3F,0xBC,0xB2,0x21,0xD0,0x4E,0x38,0x10,0x13,0x9E,0x58,0x3C,0x6D,0xC5,0xF1,0x59,0x6F,0x43,0x0A, - 0x9B,0xE3,0xFA,0xC8,0x88,0x90,0x88,0xC0,0x3D,0xAC,0x21,0xBF,0x96,0xEB,0x48,0x17,0xC8,0x3F,0xF3,0x39, - 0x80,0x11,0xBE,0xCF,0xB0,0x3F,0xEF,0x13,0xFA,0x13,0xA8,0x00,0xF8,0x25,0xFB,0x3B,0x07,0x94,0x9B,0xDF, - 0xA3,0x3C,0xA0,0x87,0x39,0x80,0x5F,0x3E,0xC4,0xCE,0x1A,0xBE,0xEF,0xE4,0x9E,0xE7,0xCC,0xAF,0x06,0x42, - 0x14,0x3B,0x10,0x3C,0xD8,0xED,0x16,0x15,0xD7,0x8B,0x96,0xF4,0x3B,0x7E,0x58,0x73,0xC9,0xCC,0x28,0x54, - 0xA6,0x84,0x8D,0x70,0x00,0x34,0x93,0x36,0x35,0x5D,0xB5,0xA7,0xDA,0xF5,0x4A,0x00,0x75,0x1D,0x28,0x7C, - 0xF9,0x7C,0x16,0x27,0xA5,0x0C,0x33,0x32,0x66,0x82,0x81,0x0A,0x2A,0x7E,0x35,0x3C,0xA1,0x94,0xCF,0x39, - 0xCF,0x38,0xB5,0xC9,0xC6,0xBA,0xF0,0x22,0xE0,0x6D,0x67,0x30,0x44,0xE5,0xEF,0x19,0xEA,0xD9,0xB8,0xE3, - 0xC1,0xDE,0x60,0x76,0x57,0xCD,0xDE,0xA5,0x04,0x82,0x5A,0x1D,0x90,0x77,0xAA,0x60,0xB9,0xCA,0xF1,0x67, - 0xD3,0xB1,0x96,0x77,0xE4,0x96,0x40,0x29,0x02,0xE5,0x60,0x0D,0x60,0xD7,0x08,0x16,0xD7,0xE7,0x18,0xB6, - 0xFB,0x8C,0x74,0x70,0x7E,0x6D,0x6B,0x36,0xE9,0xA4,0x61,0xD0,0x78,0x95,0x85,0x61,0xD0,0xC8,0x3D,0xED, - 0x99,0x22,0x42,0xC7,0x45,0xD2,0x80,0x92,0xB6,0x8D,0xA1,0x55,0x7D,0x56,0xDD,0xBB,0xFF,0xA6,0xF7,0xA9, - 0x56,0xC0,0xA1,0x3F,0x37,0xAE,0xC7,0x9B,0x71,0xAB,0x8F,0xA3,0x61,0xEF,0xE4,0x4D,0x3A,0x36,0x2B,0xF8, - 0xDF,0x1E,0x75,0xB9,0x8A,0x07,0x71,0x57,0x93,0x51,0xCD,0x8C,0x7D,0xA7,0xAC,0x02,0xDE,0x47,0xFA,0xAA, - 0x3F,0x7C,0x11,0x19,0xE2,0x1B,0x8B,0xAA,0xBA,0xC2,0xA0,0x83,0xF8,0xFD,0xD1,0xF3,0x65,0xEA,0x06,0xB0, - 0x6B,0xF8,0xB3,0xF7,0x98,0xC8,0x6E,0x6F,0xED,0x2D,0x15,0x5D,0xEC,0x4A,0x50,0xC5,0x9E,0xCF,0xCF,0x04, - 0x6C,0xC9,0xA1,0x80,0x78,0x14,0x16,0x86,0xA1,0x86,0xFA,0x14,0x30,0x3D,0x0B,0x40,0x38,0xD4,0x11,0x2E, - 0xF3,0xE6,0x72,0x9D,0x37,0xDF,0xF2,0xA5,0x21,0x1E,0x44,0x42,0x6D,0xDE,0xBC,0x74,0xF6,0xB7,0x84,0x99, - 0x38,0x26,0xDB,0xB1,0x5F,0x57,0xDF,0x87,0x66,0x25,0xE5,0x39,0x0F,0x09,0x4C,0x33,0x73,0x2C,0x9F,0xD1, - 0x27,0x27,0x5D,0x0C,0x06,0x58,0x0A,0x93,0x7A,0xF1,0x70,0x20,0x8A,0x1F,0xA2,0xD2,0x30,0x76,0xD8,0x9D, - 0xA4,0x9A,0x2D,0x49,0x4D,0xE4,0x37,0xD0,0x5C,0xB5,0x33,0xD6,0x13,0x18,0xC6,0x76,0x53,0x14,0x06,0x74, - 0x55,0x37,0x25,0x21,0x95,0x96,0x78,0x43,0xDA,0xF6,0xCE,0x71,0xE6,0xDE,0xAC,0xE7,0xF0,0x97,0xB0,0x2C, - 0x90,0x26,0xF0,0xB7,0xE1,0x2C,0x65,0xF6,0x19,0xB7,0xC7,0x15,0x5B,0x0A,0xF9,0x8A,0xAF,0x96,0x85,0x95, - 0xE4,0x13,0x5D,0x48,0xEE,0x2F,0x01,0xAF,0xF1,0xF4,0xD9,0xE0,0x4E,0x96,0xFE,0x00,0xC6,0x4C,0x5E,0x05, - 0x8A,0x74,0xC6,0xEE,0x6D,0x56,0xC7,0xB4,0x88,0x9C,0x02,0x07,0x3B,0xAC,0x4E,0xD8,0xF5,0xD5,0xDF,0xD4, - 0x3D,0x70,0x57,0xBC,0x0E,0xD9,0x58,0xA1,0x4B,0x0E,0xB6,0x59,0x41,0x76,0xD9,0x4E,0x27,0xEB,0x3B,0xFF, - 0x59,0x9C,0x17,0x37,0x0C,0x49,0xF2,0xEE,0x1A,0x32,0x8E,0xCA,0x09,0x39,0x7E,0x58,0xAF,0x95,0xFE,0xEB, - 0xEB,0x14,0xD6,0x6B,0x69,0x0F,0xA0,0x42,0x47,0x48,0xB8,0xEB,0xAA,0xDE,0x7D,0xF1,0xD7,0xFC,0xB7,0xD2, - 0xC5,0x9F,0x28,0xC7,0xC1,0x1F,0x35,0x24,0x0C,0x44,0x48,0xAB,0xCC,0xE8,0xAD,0x13,0x23,0x10,0xA5,0xC5, - 0xD0,0xBD,0x96,0x40,0xC8,0xE1,0xF8,0x66,0x53,0xD0,0x5F,0xE7,0x82,0xC9,0xE8,0xA6,0x59,0xBD,0x51,0xA4, - 0xE8,0x30,0x33,0xF6,0xBD,0xDC,0x10,0xD8,0x2E,0x8C,0x08,0xF3,0x53,0x94,0x98,0x12,0xB0,0x7B,0xF9,0x87, - 0x91,0x35,0x19,0xC3,0xC4,0xF3,0xA9,0x75,0xD4,0x6D,0xF1,0x19,0x68,0x52,0xF1,0x31,0x13,0x0B,0xE2,0x42, - 0x92,0x97,0x9D,0x72,0x50,0x6D,0x38,0xC2,0x03,0x66,0x40,0x78,0x49,0x22,0xC0,0xE4,0x36,0xF4,0x40,0x64, - 0x52,0x64,0x70,0x80,0xFD,0x0A,0xB0,0xD6,0xED,0x3A,0xDC,0x74,0x3B,0x6E,0xD8,0x74,0x53,0x65,0x79,0x91, - 0x5D,0x09,0x36,0xB7,0xF1,0x06,0x91,0x4D,0x9C,0x4D,0xD1,0x65,0xD2,0x66,0xD9,0x96,0x81,0xF2,0xF3,0xB7, - 0x97,0xF6,0xAE,0x70,0xCF,0x05,0xD9,0x75,0xD3,0x67,0xFA,0x2C,0x85,0x33,0x3E,0x6E,0x59,0x08,0x6A,0xAC, - 0x3C,0xAB,0xF2,0x6C,0x45,0xE3,0xE8,0x88,0xC1,0x93,0x9D,0xAA,0x9B,0x21,0x8A,0x47,0xC4,0x9F,0x13,0x4E, - 0xFA,0x67,0x5A,0x7E,0xBB,0xE1,0xFB,0xF0,0xF9,0x68,0x1B,0x2C,0x34,0xD0,0x17,0xCF,0x5A,0x62,0x73,0x9D, - 0xFD,0xE8,0x45,0x7F,0x66,0x2D,0x13,0x29,0x34,0x9D,0xF3,0xBB,0x25,0x2A,0x46,0x0F,0x88,0x04,0x8D,0x53, - 0x9E,0xF8,0xC1,0xBF,0x6E,0x22,0xD2,0x6C,0x5A,0x6C,0x6C,0x87,0x7F,0x4B,0x0F,0x27,0xB8,0x48,0x72,0xBA, - 0x4B,0xE6,0xDA,0x7C,0x5B,0x6D,0xF1,0x2B,0x61,0xBF,0x67,0x22,0xBB,0xEE,0x13,0x56,0xC2,0x22,0xD3,0x6D, - 0xDA,0x6E,0xFC,0x67,0xF3,0xFA,0xEB,0xAA,0xBF,0x93,0xFD,0x78,0xCB,0x41,0xDB,0x7D,0xDB,0x6F,0x03,0x68, - 0x60,0x9B,0x44,0xB4,0xCE,0xBD,0x74,0xE0,0x8E,0xDD,0x77,0xE3,0xAE,0x78,0x87,0x14,0x15,0x94,0xD5,0x61, - 0xD6,0x7D,0x24,0x60,0x96,0x5E,0x30,0x74,0xD2,0x30,0xB4,0x67,0xA6,0xC0,0xFB,0x49,0x35,0x02,0x6D,0x23, - 0xE1,0x95,0x11,0x62,0x70,0x52,0xE5,0x00,0x85,0x15,0x0F,0xD3,0xBB,0x28,0x25,0x61,0xBD,0xDB,0xC7,0xE4, - 0x89,0xDC,0xE8,0x5B,0xD3,0x9D,0xD1,0x00,0x16,0x32,0xAB,0x82,0x42,0x59,0xD4,0xE4,0x72,0x74,0x2D,0xF4, - 0xA1,0xE2,0xB4,0xF3,0x50,0xCA,0x54,0x92,0x80,0x5C,0xDC,0xF4,0x73,0x75,0x65,0x2B,0xC1,0x12,0x13,0xF1, - 0xD1,0xD6,0x28,0xC5,0x60,0x52,0xD5,0xE5,0xF2,0x76,0x37,0x21,0xAF,0x18,0xB5,0xF1,0xC4,0x33,0x58,0x75, - 0x93,0xAF,0xDD,0xF5,0xF3,0x77,0x26,0xC8,0x89,0x9A,0x5D,0x7A,0xBD,0x48,0x1E,0x4A,0xEA,0x50,0x36,0xDE, - 0x1A,0x4F,0x8F,0x08,0x08,0x49,0x1E,0xEF,0x2E,0x55,0xA1,0x5A,0x4D,0x1B,0x5A,0x85,0x92,0x3D,0x1F,0x90, - 0xEA,0x13,0x2F,0x8D,0x3F,0x1A,0x65,0xD7,0x4B,0x3F,0xE9,0xAA,0xDC,0xF1,0x1D,0x9C,0x8A,0x6B,0xE9,0x45, - 0xBA,0xEB,0xDC,0x00,0x82,0xEA,0xA5,0x0D,0x43,0xD4,0x26,0x77,0xCD,0x97,0x19,0x6C,0x05,0x2C,0x36,0xEA, - 0x6B,0xD7,0xD6,0xEC,0x7A,0x7C,0x00,0x3A,0x2F,0xCC,0x8A,0x5E,0x55,0xBC,0x52,0x86,0xCA,0xD7,0xDE,0xFC, - 0x7B,0x7D,0xF6,0x2B,0x06,0x95,0x98,0x1C,0xBE,0xCF,0xA8,0x0B,0xCE,0x58,0xD7,0xED,0xFA,0x7E,0x39,0x5B, - 0x55,0x60,0xF5,0x3F,0x17,0xB4,0x20,0x1B,0x69,0x77,0xDF,0xFD,0xFB,0x7F,0x28,0x07,0xF8,0x1A,0xAC,0x61, - 0xB5,0x2A,0xCF,0x06,0x3B,0xC0,0xD0,0x86,0x46,0xE3,0x20,0x02,0xF8,0x57,0xE2,0xBF,0x37,0xA2,0x40,0x70, - 0xC9,0xCD,0xC0,0x11,0x36,0xE7,0xB1,0x7C,0x09,0x54,0x5A,0xE5,0xB0,0x4A,0xA1,0x61,0x65,0xCE,0x33,0x2F, - 0xB7,0xF4,0xD6,0x37,0xFA,0x83,0x66,0x43,0xC4,0x8B,0x99,0x71,0x46,0x68,0xC1,0x13,0xB6,0xF5,0xF3,0x66, - 0xE7,0x1B,0x5F,0x1D,0x29,0x35,0x18,0xE4,0xBA,0x85,0xF0,0x66,0x56,0xE4,0xC8,0x20,0x71,0x2A,0x68,0x6B, - 0x1D,0x19,0xB1,0x9A,0x28,0x0A,0xF8,0x76,0x57,0xE5,0x26,0x3C,0xFE,0x29,0x3E,0x47,0xE1,0xE5,0x99,0x7E, - 0x27,0x69,0xF1,0x67,0xD6,0xE6,0xCD,0x31,0xF7,0x18,0x56,0x0C,0xA8,0xA5,0x19,0x33,0x79,0xC8,0xF9,0x77, - 0xD7,0xE7,0xB2,0xE2,0x3F,0xC5,0x6E,0x46,0x4D,0x00,0x5A,0xAA,0x4A,0x5A,0xCA,0x09,0x3F,0xEA,0x90,0xF2, - 0x3E,0xC4,0xFE,0xBA,0x42,0x8A,0x9A,0xF8,0xC1,0xC7,0x0C,0x5C,0xAA,0xEF,0x21,0xED,0x8A,0x5B,0x6F,0xCA, - 0xC3,0x99,0x03,0xE9,0x4F,0xC4,0xCB,0x0B,0x5E,0xE2,0xC7,0x89,0x9D,0x83,0xFB,0xBB,0xBF,0xAB,0x43,0xF9, - 0x6C,0x88,0xB3,0x08,0x7C,0x87,0x5D,0xAA,0xA5,0x70,0x3D,0x76,0x69,0xEF,0x70,0x88,0xC9,0x99,0xF2,0x6E, - 0x5E,0xEC,0x91,0x6B,0x5C,0x32,0xCA,0xA3,0x0E,0x16,0x20,0x7B,0xEC,0xCE,0xFA,0x7E,0x5F,0xED,0x58,0x14, - 0xAA,0x0B,0x63,0x72,0x94,0x75,0xE3,0xE9,0xCF,0xB3,0xF3,0x6F,0xDE,0xEE,0x51,0xFE,0x7C,0x72,0xBE,0xA7, - 0x9F,0xED,0x84,0x80,0x4D,0xC7,0xFB,0x7F,0xDF,0xEF,0xCC,0x9E,0x00,0xDC,0x64,0xBF,0x94,0xF2,0x10,0x53, - 0x10,0xDC,0x10,0x82,0xFB,0x0D,0xEC,0xAF,0x46,0xD0,0x37,0x12,0x69,0xBE,0x1A,0x57,0x64,0x75,0x3A,0xC9, - 0xAF,0x0E,0xA6,0xA7,0x45,0x6D,0x63,0xF1,0xB2,0xD3,0x6A,0x8B,0x97,0x17,0xD2,0xD9,0x26,0xFA,0x4D,0x90, - 0xF0,0x9E,0x5D,0x83,0xFD,0xE9,0x67,0xF2,0x19,0x02,0x06,0x2D,0x02,0xB2,0xDB,0x20,0xA4,0x63,0x1B,0x24, - 0x12,0xF6,0x4B,0x80,0x27,0xF4,0xF4,0xE6,0x76,0xF4,0x9B,0x39,0x9A,0x9A,0x68,0x52,0x47,0x2C,0x23,0xB0, - 0xDB,0x5E,0xFC,0xF6,0x77,0xF5,0x9C,0xB8,0x05,0x90,0xA0,0x64,0x96,0x66,0x0D,0xC7,0x95,0xF2,0xF5,0xE7, - 0xF6,0xF6,0xED,0xEF,0x4D,0xD5,0x7D,0x53,0xE1,0x17,0xCC,0x16,0x98,0xDB,0xFD,0xF7,0xF7,0xF7,0x2C,0x88, - 0x8F,0xDA,0x36,0x0C,0x35,0x05,0x85,0x93,0x68,0x99,0x1A,0xD5,0xA2,0x07,0xA5,0xF8,0xA2,0x1F,0x1A,0xFC, - 0x7E,0x66,0x04,0x58,0xEF,0xD1,0xDE,0xFE,0x93,0x74,0xB6,0xD4,0x2E,0xBE,0x9F,0x5F,0x4B,0xB5,0xD0,0x29, - 0xED,0xAD,0x8C,0x31,0x0B,0xBB,0x2F,0xDB,0xE1,0x36,0xD7,0xB8,0xDE,0x4B,0xCE,0xD9,0xAE,0x04,0xC7,0x3D, - 0xFC,0x8C,0xF5,0xD3,0x28,0xCD,0x26,0xE7,0x39,0xFD,0xAD,0xFD,0x6A,0x3D,0xF6,0xEE,0x7E,0xFC,0xEA,0xDF, - 0x2B,0x2C,0x48,0x28,0x1B,0xBB,0x44,0x18,0xED,0x2A,0xFE,0xFE,0x7F,0xFD,0xA0,0xAB,0xA2,0x69,0x58,0xFF, - 0xF2,0xA5,0xAC,0x69,0x10,0x51,0xF7,0xEF,0xFE,0xFE,0x33,0x5F,0xDB,0x71,0xE7,0xB8,0x42,0xB0,0x06,0x88, - 0xF6,0xD0,0xFF,0xFF,0x3F,0x0D -}; -#endif - -#endif diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_update.c b/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_update.c deleted file mode 100644 index 7b4ef42e9c3..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/gt9xx_update.c +++ /dev/null @@ -1,3672 +0,0 @@ -/* drivers/input/touchscreen/gt9xx_update.c - * - * 2010 - 2012 Goodix Technology. - * - * 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 a reference - * to you, when you are integrating the GOODiX's CTP IC into your system, - * 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. - * - * Version: 2.2 - * Revision Record: - * V1.0: first release. by Andrew, 2012/08/27. - * V1.2: modify gt9110p pid map, by Andrew, 2012/10/15 - * V1.4: - * 1. modify gup_enter_update_mode, - * 2. rewrite i2c read/write func - * 3. check update file checksum - * by Andrew, 2012/12/12 - * v1.6: - * 1. delete GTP_FW_DOWNLOAD related things. - * 2. add GTP_HEADER_FW_UPDATE switch to update fw by gtp_default_fw in *.h directly - * by Meta, 2013/04/18 - * V2.0: - * 1. GT9XXF main clock calibration - * 2. header fw update no fs related - * 3. update file searching optimization - * 4. config update as module, switchable - * by Meta, 2013/08/28 - * V2.2: - * 1. multi-system supported - * 2. flashless update no pid vid compare - * By Meta, 2014/01/14 - * V2.2.6: - * Special edition for GT910 flashless - * 1. firmware check - */ -#include "tpd.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cust_gpio_usage.h" -#include - -#include "tpd_custom_gt9xx.h" - -#if ( (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) || GTP_COMPATIBLE_MODE ) - #include "gt9xx_firmware.h" -#endif - -#define GUP_REG_HW_INFO 0x4220 -#define GUP_REG_FW_MSG 0x41E4 -#define GUP_REG_PID_VID 0x8140 - -#define GUP_SEARCH_FILE_TIMES 50 -#define UPDATE_FILE_PATH_1 "/data/_goodix_update_.bin" -#define UPDATE_FILE_PATH_2 "/sdcard/_goodix_update_.bin" - -#define CONFIG_FILE_PATH_1 "/data/_goodix_config_.cfg" -#define CONFIG_FILE_PATH_2 "/sdcard/_goodix_config_.cfg" - -#define FW_HEAD_LENGTH 14 -#define FW_DOWNLOAD_LENGTH 0x4000 -#define FW_SECTION_LENGTH 0x2000 -#define FW_DSP_ISP_LENGTH 0x1000 -#define FW_DSP_LENGTH 0x1000 -#define FW_BOOT_LENGTH 0x800 -#define FW_SS51_LENGTH (4 * FW_SECTION_LENGTH) -#define FW_BOOT_ISP_LENGTH 0x800 // 2k -#define FW_GLINK_LENGTH 0x3000 // 12k -#define FW_GWAKE_LENGTH (4 * FW_SECTION_LENGTH) // 32k - -#define PACK_SIZE 256 -#define MAX_FRAME_CHECK_TIME 5 - - -#define _bRW_MISCTL__SRAM_BANK 0x4048 -#define _bRW_MISCTL__MEM_CD_EN 0x4049 -#define _bRW_MISCTL__CACHE_EN 0x404B -#define _bRW_MISCTL__TMR0_EN 0x40B0 -#define _rRW_MISCTL__SWRST_B0_ 0x4180 -#define _bWO_MISCTL__CPU_SWRST_PULSE 0x4184 -#define _rRW_MISCTL__BOOTCTL_B0_ 0x4190 -#define _rRW_MISCTL__BOOT_OPT_B0_ 0x4218 -#define _rRW_MISCTL__BOOT_CTL_ 0x5094 - -#define AUTO_SEARCH_BIN 0x01 -#define AUTO_SEARCH_CFG 0x02 -#define BIN_FILE_READY 0x80 -#define CFG_FILE_READY 0x08 -#define HEADER_FW_READY 0x01 - -#pragma pack(1) -typedef struct -{ - u8 hw_info[4]; //hardware info// - u8 pid[8]; //product id // - u16 vid; //version id // -} st_fw_head; -#pragma pack() - -typedef struct -{ - u8 force_update; - u8 fw_flag; - struct file *file; - struct file *cfg_file; - st_fw_head ic_fw_msg; - mm_segment_t old_fs; - u32 fw_total_len; - u32 fw_burned_len; -} st_update_msg; - -st_update_msg update_msg; -extern struct i2c_client *i2c_client_point; -u16 show_len; -u16 total_len; -extern u8 fw_updating; -extern u8 cfg_len; -u8 searching_file = 0; -u8 got_file_flag = 0; - -#if GTP_ESD_PROTECT -extern void gtp_esd_switch(struct i2c_client *client, s32 on); -#endif - -#if GTP_COMPATIBLE_MODE -extern CHIP_TYPE_T gtp_chip_type; -extern u8 rqst_processing; -extern u8 is_950; -extern u8 after_912_1020; -extern u8 gtp_fw_startup(struct i2c_client *client); -static u8 gup_check_and_repair(struct i2c_client *, s32 , u8 *, u32 ); -s32 gup_fw_download_proc(void *dir, u8 dwn_mode); - -#if GTP_FL_LITTLE_SYSTEM -extern u8 power_is_down; -#endif - -#endif - -#define _CLOSE_FILE(p_file) if (p_file && !IS_ERR(p_file)) \ - { \ - filp_close(p_file, NULL); \ - } - - -static u8 gup_burn_fw_gwake_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ); - -static s32 gup_i2c_read(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_read_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 2; - } - else - { - return ret; - } -} - -static s32 gup_i2c_write(struct i2c_client *client, u8 *buf, s32 len) -{ - s32 ret = -1; - u16 addr = (buf[0] << 8) + buf[1]; - - ret = i2c_write_bytes(client, addr, &buf[2], len - 2); - - if (!ret) - { - return 1; - } - else - { - return ret; - } -} - -static u8 gup_get_ic_msg(struct i2c_client *client, u16 addr, u8 *msg, s32 len) -{ - s32 i = 0; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_read(client, msg, GTP_ADDR_LENGTH + len) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Read data from 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_set_ic_msg(struct i2c_client *client, u16 addr, u8 val) -{ - s32 i = 0; - u8 msg[3]; - - msg[0] = (addr >> 8) & 0xff; - msg[1] = addr & 0xff; - msg[2] = val; - - for (i = 0; i < 5; i++) - { - if (gup_i2c_write(client, msg, GTP_ADDR_LENGTH + 1) > 0) - { - break; - } - } - - if (i >= 5) - { - GTP_ERROR("Set data to 0x%02x%02x failed!", msg[0], msg[1]); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_get_ic_fw_msg(struct i2c_client *client) -{ - s32 ret = -1; - u8 retry = 0; - u8 buf[16]; - u8 i; - - //step1:get hardware info - ret = gtp_i2c_read_dbl_check(client, GUP_REG_HW_INFO, &buf[GTP_ADDR_LENGTH], 4); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get hw_info failed,exit"); - return FAIL; - } - - // buf[2~5]: 00 06 90 00 - // hw_info: 00 90 06 00 - for (i = 0; i < 4; i++) - { - update_msg.ic_fw_msg.hw_info[i] = buf[GTP_ADDR_LENGTH + 3 - i]; - } - - GTP_INFO("IC Hardware info:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - - //step2:get firmware message - for (retry = 0; retry < 2; retry++) - { - ret = gup_get_ic_msg(client, GUP_REG_FW_MSG, buf, 1); - - if (FAIL == ret) - { - GTP_ERROR("Read firmware message fail."); - return ret; - } - - update_msg.force_update = buf[GTP_ADDR_LENGTH]; - - if ((0xBE != update_msg.force_update) && (!retry)) - { - GTP_ERROR("The check sum in ic is error."); - GTP_INFO("The IC will be updated by force."); - continue; - } - break; - } - - GTP_INFO("IC force update flag:0x%x", update_msg.force_update); - - //step3:get pid & vid - ret = gtp_i2c_read_dbl_check(client, GUP_REG_PID_VID, &buf[GTP_ADDR_LENGTH], 6); - if (FAIL == ret) - { - GTP_ERROR("[get_ic_fw_msg]get pid & vid failed,exit"); - return FAIL; - } - - memset(update_msg.ic_fw_msg.pid, 0, sizeof(update_msg.ic_fw_msg.pid)); - memcpy(update_msg.ic_fw_msg.pid, &buf[GTP_ADDR_LENGTH], 4); - - - //GT9XX PID MAPPING - /*|-----FLASH-----RAM-----| - |------918------918-----| - |------968------968-----| - |------913------913-----| - |------913P-----913P----| - |------927------927-----| - |------927P-----927P----| - |------9110-----9110----| - |------9110P----9111----|*/ - if(update_msg.ic_fw_msg.pid[0] != 0) - { - if (!memcmp(update_msg.ic_fw_msg.pid, "9111", 4)) - { - GTP_INFO("IC Mapping Product id:%s", update_msg.ic_fw_msg.pid); - memcpy(update_msg.ic_fw_msg.pid, "9110P", 5); - } - } - - update_msg.ic_fw_msg.vid = buf[GTP_ADDR_LENGTH + 4] + (buf[GTP_ADDR_LENGTH + 5] << 8); - return SUCCESS; -} - -s32 gup_enter_update_mode(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - //20121211 modify start - msleep(5); - while(retry++ < 200) - { - //step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - //step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if(0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - - //step6:DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - - //20121211 modify end - return ret; -} - -void gup_leave_update_mode(void) -{ - GTP_GPIO_AS_INT(GTP_INT_PORT); - - GTP_DEBUG("[leave_update_mode]reset chip."); - gtp_reset_guitar(i2c_client_point, 20); -} - -static u8 gup_enter_update_judge(st_fw_head *fw_head) -{ - u16 u16_tmp; - s32 i = 0; - u32 fw_len = 0; - s32 pid_cmp_len = 0; - //Get the correct nvram data - //The correct conditions: - //1. the hardware info is the same - //2. the product id is the same - //3. the firmware version in update file is greater than the firmware version in ic - //or the check sum in ic is wrong - - u16_tmp = fw_head->vid; - fw_head->vid = (u16)(u16_tmp >> 8) + (u16)(u16_tmp << 8); - - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - GTP_INFO("FILE VID:%04x", fw_head->vid); - GTP_INFO("IC HARDWARE INFO:%02x%02x%02x%02x", update_msg.ic_fw_msg.hw_info[0], update_msg.ic_fw_msg.hw_info[1], - update_msg.ic_fw_msg.hw_info[2], update_msg.ic_fw_msg.hw_info[3]); - GTP_INFO("IC PID:%s", update_msg.ic_fw_msg.pid); - GTP_INFO("IC VID:%04x", update_msg.ic_fw_msg.vid); - - if (!memcmp(fw_head->pid, "9158", 4) && !memcmp(update_msg.ic_fw_msg.pid, "915S", 4)) - { - GTP_INFO("Update GT915S to GT9158 directly!"); - return SUCCESS; - } - - if (!memcmp(fw_head->hw_info, update_msg.ic_fw_msg.hw_info, sizeof(update_msg.ic_fw_msg.hw_info))) - { - fw_len = 42 * 1024; - } - else - { - fw_len = fw_head->hw_info[3]; - fw_len += (((u32)fw_head->hw_info[2]) << 8); - fw_len += (((u32)fw_head->hw_info[1]) << 16); - fw_len += (((u32)fw_head->hw_info[0]) << 24); - } - if (update_msg.fw_total_len != fw_len) - { - GTP_ERROR("Inconsistent firmware size, Update aborted! Default size: %d(%dK), actual size: %d(%dK)", fw_len, fw_len/1024, update_msg.fw_total_len, update_msg.fw_total_len/1024); - return FAIL; - } - GTP_INFO("Firmware length:%d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - if (update_msg.force_update != 0xBE) - { - GTP_INFO("FW chksum error,need enter update."); - return SUCCESS; - } - // 20130523 start - if (strlen(update_msg.ic_fw_msg.pid) < 3) - { - GTP_INFO("Illegal IC pid, need enter update"); - return SUCCESS; - } - else - { - for (i = 0; i < 3; i++) - { - if ((update_msg.ic_fw_msg.pid[i] < 0x30) || (update_msg.ic_fw_msg.pid[i] > 0x39)) - { - GTP_INFO("Illegal IC pid, out of bound, need enter update"); - return SUCCESS; - } - } - } - // 20130523 end - - pid_cmp_len = strlen(fw_head->pid); - if (pid_cmp_len < strlen(update_msg.ic_fw_msg.pid)) - { - pid_cmp_len = strlen(update_msg.ic_fw_msg.pid); - } - - if ((!memcmp(fw_head->pid, update_msg.ic_fw_msg.pid, pid_cmp_len)) || - (!memcmp(update_msg.ic_fw_msg.pid, "91XX", 4))|| - (!memcmp(fw_head->pid, "91XX", 4))) - { - if(!memcmp(fw_head->pid, "91XX", 4)) - { - GTP_DEBUG("Force none same pid update mode."); - } - else - { - GTP_DEBUG("Get the same pid."); - } - - //The third condition - if (fw_head->vid > update_msg.ic_fw_msg.vid) - { - - GTP_INFO("Need enter update."); - return SUCCESS; - } - - GTP_INFO("Don't meet the third condition."); - GTP_ERROR("File VID <= IC VID, update aborted!"); - } - else - { - GTP_ERROR("File PID != IC PID, update aborted!"); - } - - return FAIL; -} - -#if GTP_AUTO_UPDATE_CFG -static u8 ascii2hex(u8 a) -{ - s8 value = 0; - - if(a >= '0' && a <= '9') - { - value = a - '0'; - } - else if(a >= 'A' && a <= 'F') - { - value = a - 'A' + 0x0A; - } - else if(a >= 'a' && a <= 'f') - { - value = a - 'a' + 0x0A; - } - else - { - value = 0xff; - } - - return value; -} - -static s8 gup_update_config(struct i2c_client *client) -{ - s32 file_len = 0; - s32 ret = 0; - s32 i = 0; - s32 file_cfg_len = 0; - s32 chip_cfg_len = 0; - s32 count = 0; - u8 *buf; - u8 *pre_buf; - u8 *file_config; - //u8 checksum = 0; - - if(NULL == update_msg.cfg_file) - { - GTP_ERROR("[update_cfg]No need to upgrade config!"); - return FAIL; - } - file_len = update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_END); - - chip_cfg_len = cfg_len; - - GTP_DEBUG("[update_cfg]config file len:%d", file_len); - GTP_DEBUG("[update_cfg]need config len:%d",chip_cfg_len); - if((file_len+5) < chip_cfg_len*5) - { - GTP_ERROR("Config length error"); - return -1; - } - - buf = (u8*)kzalloc(file_len, GFP_KERNEL); - pre_buf = (u8*)kzalloc(file_len, GFP_KERNEL); - file_config = (u8*)kzalloc(chip_cfg_len + GTP_ADDR_LENGTH, GFP_KERNEL); - update_msg.cfg_file->f_op->llseek(update_msg.cfg_file, 0, SEEK_SET); - - GTP_DEBUG("[update_cfg]Read config from file."); - ret = update_msg.cfg_file->f_op->read(update_msg.cfg_file, (char*)pre_buf, file_len, &update_msg.cfg_file->f_pos); - if(ret<0) - { - GTP_ERROR("[update_cfg]Read config file failed."); - goto update_cfg_file_failed; - } - - GTP_DEBUG("[update_cfg]Delete illgal charactor."); - for(i=0,count=0; i> 8; - file_config[1] = GTP_REG_CONFIG_DATA & 0xff; - for(i=0,file_cfg_len=GTP_ADDR_LENGTH; i 0) - { - GTP_INFO("[update_cfg]Send config SUCCESS."); - break; - } - GTP_ERROR("[update_cfg]Send config i2c error."); - } - -update_cfg_file_failed: - kfree(pre_buf); - kfree(buf); - kfree(file_config); - return ret; -} - -#endif - -#if (GTP_AUTO_UPDATE && (!GTP_HEADER_FW_UPDATE || GTP_AUTO_UPDATE_CFG)) -static void gup_search_file(s32 search_type) -{ - s32 i = 0; - struct file *pfile = NULL; - - got_file_flag = 0x00; - - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force exiting file searching"); - got_file_flag = 0x00; - return; - } - - if (search_type & AUTO_SEARCH_BIN) - { - GTP_DEBUG("Search for %s, %s for fw update.(%d/%d)", UPDATE_FILE_PATH_1, UPDATE_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(UPDATE_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(UPDATE_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_2); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - } - else - { - GTP_INFO("Bin file: %s for fw update.", UPDATE_FILE_PATH_1); - got_file_flag |= BIN_FILE_READY; - update_msg.file = pfile; - } - if (got_file_flag & BIN_FILE_READY) - { - #if GTP_AUTO_UPDATE_CFG - if (search_type & AUTO_SEARCH_CFG) - { - i = GUP_SEARCH_FILE_TIMES; // Bin & Cfg File required to be in the same directory - } - else - #endif - { - searching_file = 0; - return; - } - } - } - - #if GTP_AUTO_UPDATE_CFG - if ( (search_type & AUTO_SEARCH_CFG) && !(got_file_flag & CFG_FILE_READY) ) - { - GTP_DEBUG("Search for %s, %s for config update.(%d/%d)", CONFIG_FILE_PATH_1, CONFIG_FILE_PATH_2, i+1, GUP_SEARCH_FILE_TIMES); - pfile = filp_open(CONFIG_FILE_PATH_1, O_RDONLY, 0); - if (IS_ERR(pfile)) - { - pfile = filp_open(CONFIG_FILE_PATH_2, O_RDONLY, 0); - if (!IS_ERR(pfile)) - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_2); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - } - else - { - GTP_INFO("Cfg file: %s for config update.", CONFIG_FILE_PATH_1); - got_file_flag |= CFG_FILE_READY; - update_msg.cfg_file = pfile; - } - if (got_file_flag & CFG_FILE_READY) - { - searching_file = 0; - return; - } - } - #endif - msleep(3000); - } - searching_file = 0; -} -#endif - -static u8 gup_check_update_file(struct i2c_client *client, st_fw_head *fw_head, u8 *path) -{ - s32 ret = 0; - s32 i = 0; - s32 fw_checksum = 0; - u8 buf[FW_HEAD_LENGTH]; - - got_file_flag = 0x00; - if (path) - { - GTP_DEBUG("Update File path:%s, %d", path, strlen(path)); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - got_file_flag = BIN_FILE_READY; - } - else - { -#if GTP_AUTO_UPDATE - #if GTP_HEADER_FW_UPDATE - GTP_INFO("Update by default firmware array"); - update_msg.fw_total_len = sizeof(gtp_default_FW) - FW_HEAD_LENGTH; - if (sizeof(gtp_default_FW) < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_ERROR("INVALID gtp_default_FW, check your gt9xx_firmware.h file!"); - return FAIL; - } - GTP_DEBUG("Firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - memcpy(fw_head, >p_default_FW[0], FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for (i = 0; i < update_msg.fw_total_len; i += 2) - { - fw_checksum += (gtp_default_FW[FW_HEAD_LENGTH + i] << 8) + gtp_default_FW[FW_HEAD_LENGTH + i + 1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - got_file_flag = HEADER_FW_READY; - return SUCCESS; - - #else - #if GTP_AUTO_UPDATE_CFG - gup_search_file(AUTO_SEARCH_BIN | AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(client); - if(ret <= 0) - { - GTP_ERROR("Update config failed!"); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - #else - gup_search_file(AUTO_SEARCH_BIN); - #endif - - if (!(got_file_flag & BIN_FILE_READY)) - { - GTP_ERROR("No bin file for fw Update"); - return FAIL; - } - #endif -#else - { - GTP_ERROR("NULL file for fw update!"); - return FAIL; - } -#endif - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - - if (update_msg.fw_total_len < (FW_HEAD_LENGTH + FW_SECTION_LENGTH*4+FW_DSP_ISP_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH)) - { - GTP_ERROR("INVALID bin file(size: %d), update aborted.", update_msg.fw_total_len); - return FAIL; - } - - update_msg.fw_total_len -= FW_HEAD_LENGTH; - - GTP_DEBUG("Bin firmware actual size: %d(%dK)", update_msg.fw_total_len, update_msg.fw_total_len/1024); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, FW_HEAD_LENGTH, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware head in update file error."); - return FAIL; - } - - memcpy(fw_head, buf, FW_HEAD_LENGTH); - - //check firmware legality - fw_checksum = 0; - for(i=0; i < update_msg.fw_total_len; i+=2) - { - u16 temp; - ret = update_msg.file->f_op->read(update_msg.file, (char*)buf, 2, &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Read firmware file error."); - return FAIL; - } - //GTP_DEBUG("BUF[0]:%x", buf[0]); - temp = (buf[0]<<8) + buf[1]; - fw_checksum += temp; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr, u16 total_length) -{ - s32 ret = 0; - u16 burn_addr = start_addr; - u16 frame_length = 0; - u16 burn_length = 0; - u8 wr_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - u8 retry = 0; - - GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length / 1024), start_addr); - - while (burn_length < total_length) - { - GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length); - frame_length = ((total_length - burn_length) > PACK_SIZE) ? PACK_SIZE : (total_length - burn_length); - wr_buf[0] = (u8)(burn_addr >> 8); - rd_buf[0] = wr_buf[0]; - wr_buf[1] = (u8)burn_addr; - rd_buf[1] = wr_buf[1]; - memcpy(&wr_buf[GTP_ADDR_LENGTH], &burn_buf[burn_length], frame_length); - - for (retry = 0; retry < MAX_FRAME_CHECK_TIME; retry++) - { - ret = gup_i2c_write(client, wr_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Write frame data i2c error."); - continue; - } - - ret = gup_i2c_read(client, rd_buf, GTP_ADDR_LENGTH + frame_length); - - if (ret <= 0) - { - GTP_ERROR("Read back frame data i2c error."); - continue; - } - - if (memcmp(&wr_buf[GTP_ADDR_LENGTH], &rd_buf[GTP_ADDR_LENGTH], frame_length)) - { - GTP_ERROR("Check frame data fail,not equal."); - GTP_DEBUG("write array:"); - GTP_DEBUG_ARRAY(&wr_buf[GTP_ADDR_LENGTH], frame_length); - GTP_DEBUG("read array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - continue; - } - else - { - //GTP_DEBUG("Check frame data success."); - break; - } - } - if(retry >= MAX_FRAME_CHECK_TIME) - { - GTP_ERROR("Burn frame data time out,exit."); - return FAIL; - } - burn_length += frame_length; - burn_addr += frame_length; - } - return SUCCESS; -} - -static u8 gup_load_section_file(u8 *buf, u32 offset, u16 length, u8 set_or_end) -{ -#if (GTP_AUTO_UPDATE && GTP_HEADER_FW_UPDATE) - if (HEADER_FW_READY == got_file_flag) - { - if(SEEK_SET == set_or_end) - { - memcpy(buf, >p_default_FW[FW_HEAD_LENGTH + offset], length); - } - else //seek end - { - memcpy(buf, >p_default_FW[update_msg.fw_total_len + FW_HEAD_LENGTH - offset], length); - } - return SUCCESS; - } -#endif - { - s32 ret = 0; - - if ( (update_msg.file == NULL) || IS_ERR(update_msg.file)) - { - GTP_ERROR("cannot find update file,load section file fail."); - return FAIL; - } - - if(SEEK_SET == set_or_end) - { - update_msg.file->f_pos = FW_HEAD_LENGTH + offset; - } - else //seek end - { - update_msg.file->f_pos = update_msg.fw_total_len + FW_HEAD_LENGTH - offset; - } - - ret = update_msg.file->f_op->read(update_msg.file, (char *)buf, length, &update_msg.file->f_pos); - - if (ret < 0) - { - GTP_ERROR("Read update file fail."); - return FAIL; - } - - return SUCCESS; - } -} - -static u8 gup_recall_check(struct i2c_client *client, u8 *chk_src, u16 start_rd_addr, u16 chk_length) -{ - u8 rd_buf[PACK_SIZE + GTP_ADDR_LENGTH]; - s32 ret = 0; - u16 recall_addr = start_rd_addr; - u16 recall_length = 0; - u16 frame_length = 0; - - while (recall_length < chk_length) - { - frame_length = ((chk_length - recall_length) > PACK_SIZE) ? PACK_SIZE : (chk_length - recall_length); - ret = gup_get_ic_msg(client, recall_addr, rd_buf, frame_length); - - if (ret <= 0) - { - GTP_ERROR("recall i2c error,exit"); - return FAIL; - } - - if (memcmp(&rd_buf[GTP_ADDR_LENGTH], &chk_src[recall_length], frame_length)) - { - GTP_ERROR("Recall frame data fail,not equal."); - GTP_DEBUG("chk_src array:"); - GTP_DEBUG_ARRAY(&chk_src[recall_length], frame_length); - GTP_DEBUG("recall array:"); - GTP_DEBUG_ARRAY(&rd_buf[GTP_ADDR_LENGTH], frame_length); - return FAIL; - } - - recall_length += frame_length; - recall_addr += frame_length; - } - - GTP_DEBUG("Recall check %dk firmware success.", (chk_length / 1024)); - - return SUCCESS; -} - -static u8 gup_burn_fw_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u8 bank_cmd) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]set scramble fail."); - return FAIL; - } - - //step3:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step4:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step5:burn 8k fw section - ret = gup_burn_proc(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]burn fw_section fail."); - return FAIL; - } - - //step6:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]hold ss51 & release dsp fail."); - return FAIL; - } - - //must delay - msleep(1); - - //step7:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd & 0x0f); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]send burn cmd fail."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]Get burn state fail"); - return FAIL; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step8:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4) & 0x0F); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4) & 0x0F); - return FAIL; - } - - //step9:enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]enable accessing code fail."); - return FAIL; - } - - //step10:recall 8k fw section - ret = gup_recall_check(client, fw_section, start_addr, FW_SECTION_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_section]recall check %dk firmware fail.", FW_SECTION_LENGTH/1024); - return FAIL; - } - - //step11:disable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_section]disable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_dsp_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp_isp = NULL; - u8 retry = 0; - //u32 offset; - - GTP_INFO("[burn_dsp_isp]Begin burn dsp isp---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_dsp_isp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp_isp = (u8 *)kzalloc(FW_DSP_ISP_LENGTH, GFP_KERNEL); - - if (fw_dsp_isp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_dsp_isp]Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_dsp_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load dsp isp file data - GTP_DEBUG("[burn_dsp_isp]step2:load dsp isp file data"); - ret = gup_load_section_file(fw_dsp_isp, FW_DSP_ISP_LENGTH, FW_DSP_ISP_LENGTH, SEEK_END); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]load firmware dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step3:disable wdt,clear cache enable - GTP_DEBUG("[burn_dsp_isp]step3:disable wdt,clear cache enable"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]disable wdt fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]clear cache enable fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_dsp_isp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step5:set boot from sram - GTP_DEBUG("[burn_dsp_isp]step5:set boot from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set boot from sram fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step6:software reboot - GTP_DEBUG("[burn_dsp_isp]step6:software reboot"); - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]software reboot fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step7:select bank2 - GTP_DEBUG("[burn_dsp_isp]step7:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]select bank2 fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step8:enable accessing code - GTP_DEBUG("[burn_dsp_isp]step8:enable accessing code"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]enable accessing code fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - //step9:burn 4k dsp_isp - GTP_DEBUG("[burn_dsp_isp]step9:burn 4k dsp_isp"); - ret = gup_burn_proc(client, fw_dsp_isp, 0xC000, FW_DSP_ISP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_dsp_isp]burn dsp_isp fail."); - goto exit_burn_dsp_isp; - } - - //step10:set scramble - GTP_DEBUG("[burn_dsp_isp]step10:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_dsp_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_dsp_isp; - } - - update_msg.fw_burned_len += FW_DSP_ISP_LENGTH; - GTP_DEBUG("[burn_dsp_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_dsp_isp: - kfree(fw_dsp_isp); - return ret; -} - -static u8 gup_burn_fw_ss51(struct i2c_client *client) -{ - u8 *fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_ss51]Begin burn ss51 firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_ss51]step1:alloc memory"); - - while (retry++ < 5) - { - fw_ss51 = (u8 *)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - - if (fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_ss51]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_ss51]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load ss51 firmware section 1 file data - //GTP_DEBUG("[burn_fw_ss51]step2:load ss51 firmware section 1 file data"); - //ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); -// -// if (FAIL == ret) -// { -// GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 1 fail."); -// goto exit_burn_fw_ss51; -// } - GTP_INFO("[burn_fw_ss51]Reset first 8K of ss51 to 0xFF."); - GTP_DEBUG("[burn_fw_ss51]step2: reset bank0 0xC000~0xD000"); - memset(fw_ss51, 0xFF, FW_SECTION_LENGTH); - - //step3:clear control flag - GTP_DEBUG("[burn_fw_ss51]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_ss51]clear control flag fail."); - ret = FAIL; - goto exit_burn_fw_ss51; - } - - //step4:burn ss51 firmware section 1 - GTP_DEBUG("[burn_fw_ss51]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_ss51; - } - - //step5:load ss51 firmware section 2 file data - GTP_DEBUG("[burn_fw_ss51]step5:load ss51 firmware section 2 file data"); - ret = gup_load_section_file(fw_ss51, FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step6:burn ss51 firmware section 2 - GTP_DEBUG("[burn_fw_ss51]step6:burn ss51 firmware section 2"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x02); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 2 fail."); - goto exit_burn_fw_ss51; - } - - //step7:load ss51 firmware section 3 file data - GTP_DEBUG("[burn_fw_ss51]step7:load ss51 firmware section 3 file data"); - ret = gup_load_section_file(fw_ss51, 2 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step8:burn ss51 firmware section 3 - GTP_DEBUG("[burn_fw_ss51]step8:burn ss51 firmware section 3"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x13); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 3 fail."); - goto exit_burn_fw_ss51; - } - - //step9:load ss51 firmware section 4 file data - GTP_DEBUG("[burn_fw_ss51]step9:load ss51 firmware section 4 file data"); - ret = gup_load_section_file(fw_ss51, 3 * FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]load ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - //step10:burn ss51 firmware section 4 - GTP_DEBUG("[burn_fw_ss51]step10:burn ss51 firmware section 4"); - ret = gup_burn_fw_section(client, fw_ss51, 0xE000, 0x14); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_ss51]burn ss51 firmware section 4 fail."); - goto exit_burn_fw_ss51; - } - - update_msg.fw_burned_len += (FW_SECTION_LENGTH*4); - GTP_DEBUG("[burn_fw_ss51]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_ss51: - kfree(fw_ss51); - return ret; -} - -static u8 gup_burn_fw_dsp(struct i2c_client *client) -{ - s32 ret = 0; - u8 *fw_dsp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_dsp]Begin burn dsp firmware---->>"); - //step1:alloc memory - GTP_DEBUG("[burn_fw_dsp]step1:alloc memory"); - - while (retry++ < 5) - { - fw_dsp = (u8 *)kzalloc(FW_DSP_LENGTH, GFP_KERNEL); - - if (fw_dsp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_dsp]Alloc %dk byte memory success.", (FW_SECTION_LENGTH / 1024)); - break; - } - } - - if (retry >= 5) - { - GTP_ERROR("[burn_fw_dsp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware dsp - GTP_DEBUG("[burn_fw_dsp]step2:load firmware dsp"); - ret = gup_load_section_file(fw_dsp, 4 * FW_SECTION_LENGTH, FW_DSP_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]load firmware dsp fail."); - goto exit_burn_fw_dsp; - } - - //step3:select bank3 - GTP_DEBUG("[burn_fw_dsp]step3:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step4:hold ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step4:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step5:set scramble - GTP_DEBUG("[burn_fw_dsp]step5:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //step6:release ss51 & dsp - GTP_DEBUG("[burn_fw_dsp]step6:release ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121212 - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_dsp; - } - - //must delay - msleep(1); - - //step7:burn 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step7:burn 4k dsp firmware"); - ret = gup_burn_proc(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]burn fw_section fail."); - goto exit_burn_fw_dsp; - } - - //step8:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_dsp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x05); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]send burn cmd fail."); - goto exit_burn_fw_dsp; - } - - GTP_DEBUG("[burn_fw_dsp]Wait for the burn is complete......"); - - do - { - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - - if (ret <= 0) - { - GTP_ERROR("[burn_fw_dsp]Get burn state fail"); - goto exit_burn_fw_dsp; - } - - msleep(10); - //GTP_DEBUG("[burn_fw_dsp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - } - while (rd_buf[GTP_ADDR_LENGTH]); - - //step9:recall check 4k dsp firmware - GTP_DEBUG("[burn_fw_dsp]step9:recall check 4k dsp firmware"); - ret = gup_recall_check(client, fw_dsp, 0x9000, FW_DSP_LENGTH); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_dsp]recall check 4k dsp firmware fail."); - goto exit_burn_fw_dsp; - } - - update_msg.fw_burned_len += FW_DSP_LENGTH; - GTP_DEBUG("[burn_fw_dsp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_dsp: - kfree(fw_dsp); - return ret; -} - -static u8 gup_burn_fw_boot(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - GTP_INFO("[burn_fw_boot]Begin burn bootloader firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot]step1:Alloc memory"); - - while(retry++ < 5) - { - fw_boot = (u8*)kzalloc(FW_BOOT_LENGTH, GFP_KERNEL); - - if(fw_boot == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_boot]Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); - break; - } - } - - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot]step2:load firmware bootloader"); - ret = gup_load_section_file(fw_boot, (4 * FW_SECTION_LENGTH + FW_DSP_LENGTH), FW_BOOT_LENGTH, SEEK_SET); - - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]load firmware bootcode fail."); - goto exit_burn_fw_boot; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot; - } - - //step7:burn 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]burn fw_boot fail."); - goto exit_burn_fw_boot; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot]step7:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x06); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]send burn cmd fail."); - goto exit_burn_fw_boot; - } - GTP_DEBUG("[burn_fw_boot]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot]Get burn state fail"); - goto exit_burn_fw_boot; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootloader firmware - GTP_DEBUG("[burn_fw_boot]step8:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot, 0x9000, FW_BOOT_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot]recall check 2k bootcode firmware fail."); - goto exit_burn_fw_boot; - } - - update_msg.fw_burned_len += FW_BOOT_LENGTH; - GTP_DEBUG("[burn_fw_boot]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot: - kfree(fw_boot); - return ret; -} - - -static u8 gup_burn_fw_boot_isp(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_boot_isp = NULL; - u8 retry = 0; - u8 rd_buf[5]; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the boot_isp code!"); - return SUCCESS; - } - GTP_INFO("[burn_fw_boot_isp]Begin burn boot_isp firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_boot_isp]step1:Alloc memory"); - while(retry++ < 5) - { - fw_boot_isp = (u8*)kzalloc(FW_BOOT_ISP_LENGTH, GFP_KERNEL); - if(fw_boot_isp == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_boot_isp]Alloc %dk byte memory success.", (FW_BOOT_ISP_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_boot_isp]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware bootloader - GTP_DEBUG("[burn_fw_boot_isp]step2:load firmware bootloader isp"); - //ret = gup_load_section_file(fw_boot_isp, (4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH+FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - ret = gup_load_section_file(fw_boot_isp, (update_msg.fw_burned_len - FW_DSP_ISP_LENGTH), FW_BOOT_ISP_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]load firmware boot_isp fail."); - goto exit_burn_fw_boot_isp; - } - - //step3:hold ss51 & dsp - GTP_DEBUG("[burn_fw_boot_isp]step3:hold ss51 & dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]hold ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step4:set scramble - GTP_DEBUG("[burn_fw_boot_isp]step4:set scramble"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]set scramble fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - - //step5:hold ss51 & release dsp - GTP_DEBUG("[burn_fw_boot_isp]step5:hold ss51 & release dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); //20121211 - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]release ss51 & dsp fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - //must delay - msleep(1); - - //step6:select bank3 - GTP_DEBUG("[burn_fw_boot_isp]step6:select bank3"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x03); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]select bank3 fail."); - ret = FAIL; - goto exit_burn_fw_boot_isp; - } - - //step7:burn 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step7:burn 2k bootloader firmware"); - ret = gup_burn_proc(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]burn fw_section fail."); - goto exit_burn_fw_boot_isp; - } - - //step7:send burn cmd to move data to flash from sram - GTP_DEBUG("[burn_fw_boot_isp]step8:send burn cmd to move data to flash from sram"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x07); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]send burn cmd fail."); - goto exit_burn_fw_boot_isp; - } - GTP_DEBUG("[burn_fw_boot_isp]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_boot_isp]Get burn state fail"); - goto exit_burn_fw_boot_isp; - } - msleep(10); - //GTP_DEBUG("[burn_fw_boot_isp]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step8:recall check 2k bootload_isp firmware - GTP_DEBUG("[burn_fw_boot_isp]step9:recall check 2k bootloader firmware"); - ret = gup_recall_check(client, fw_boot_isp, 0x9000, FW_BOOT_ISP_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_boot_isp]recall check 2k bootcode_isp firmware fail."); - goto exit_burn_fw_boot_isp; - } - - update_msg.fw_burned_len += FW_BOOT_ISP_LENGTH; - GTP_DEBUG("[burn_fw_boot_isp]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_boot_isp: - kfree(fw_boot_isp); - return ret; -} - -static u8 gup_burn_fw_link(struct i2c_client *client) -{ - s32 ret = 0; - u8* fw_link = NULL; - u8 retry = 0; - u32 offset; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the link code!"); - return SUCCESS; - } - GTP_INFO("[burn_fw_link]Begin burn link firmware---->>"); - - //step1:Alloc memory - GTP_DEBUG("[burn_fw_link]step1:Alloc memory"); - while(retry++ < 5) - { - fw_link = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_link == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_link]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_link]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load firmware link section 1 - GTP_DEBUG("[burn_fw_link]step2:load firmware link section 1"); - offset = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load firmware link section 1 fail."); - goto exit_burn_fw_link; - } - - //step3:burn link firmware section 1 - GTP_DEBUG("[burn_fw_link]step3:burn link firmware section 1"); - ret = gup_burn_fw_gwake_section(client, fw_link, 0x9000, FW_SECTION_LENGTH, 0x38); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 1 fail."); - goto exit_burn_fw_link; - } - - //step4:load link firmware section 2 file data - GTP_DEBUG("[burn_fw_link]step4:load link firmware section 2 file data"); - offset += FW_SECTION_LENGTH; - ret = gup_load_section_file(fw_link, offset, FW_GLINK_LENGTH - FW_SECTION_LENGTH, SEEK_SET); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]load link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - //step5:burn link firmware section 2 - GTP_DEBUG("[burn_fw_link]step4:burn link firmware section 2"); - ret = gup_burn_fw_gwake_section(client, fw_link, 0x9000, FW_GLINK_LENGTH - FW_SECTION_LENGTH, 0x39); - - if (FAIL == ret) - { - GTP_ERROR("[burn_fw_link]burn link firmware section 2 fail."); - goto exit_burn_fw_link; - } - - update_msg.fw_burned_len += FW_GLINK_LENGTH; - GTP_DEBUG("[burn_fw_link]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_link: - kfree(fw_link); - return ret; -} - -static u8 gup_burn_fw_gwake_section(struct i2c_client *client, u8 *fw_section, u16 start_addr, u32 len, u8 bank_cmd ) -{ - s32 ret = 0; - u8 rd_buf[5]; - - //step1:hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & dsp fail."); - return FAIL; - } - - //step2:set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]set scramble fail."); - return FAIL; - } - - //step3:hold ss51 & release dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x04); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]hold ss51 & release dsp fail."); - return FAIL; - } - //must delay - msleep(1); - - //step4:select bank - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, (bank_cmd >> 4)&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_section]select bank %d fail.", (bank_cmd >> 4)&0x0F); - return FAIL; - } - - //step5:burn fw section - ret = gup_burn_proc(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]burn fw_section fail."); - return FAIL; - } - - //step6:send burn cmd to move data to flash from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, bank_cmd&0x0F); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]send burn cmd fail."); - return FAIL; - } - GTP_DEBUG("[burn_fw_section]Wait for the burn is complete......"); - do{ - ret = gup_get_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, rd_buf, 1); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_app_section]Get burn state fail"); - return FAIL; - } - msleep(10); - //GTP_DEBUG("[burn_fw_app_section]Get burn state:%d.", rd_buf[GTP_ADDR_LENGTH]); - }while(rd_buf[GTP_ADDR_LENGTH]); - - //step7:recall fw section - ret = gup_recall_check(client, fw_section, start_addr, len); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_app_section]recall check %dk firmware fail.", len/1024); - return FAIL; - } - - return SUCCESS; -} - -static u8 gup_burn_fw_gwake(struct i2c_client *client) -{ - u8* fw_gwake = NULL; - u8 retry = 0; - s32 ret = 0; - //u16 start_index = 4*FW_SECTION_LENGTH+FW_DSP_LENGTH+FW_BOOT_LENGTH + FW_DSP_ISP_LENGTH + FW_BOOT_ISP_LENGTH; // 32 + 4 + 2 + 4 = 42K - u16 start_index; - - if(update_msg.fw_burned_len >= update_msg.fw_total_len) - { - GTP_DEBUG("No need to upgrade the gwake code!"); - return SUCCESS; - } - start_index = update_msg.fw_burned_len - FW_DSP_ISP_LENGTH; - GTP_INFO("[burn_fw_gwake]Begin burn gwake firmware---->>"); - - //step1:alloc memory - GTP_DEBUG("[burn_fw_gwake]step1:alloc memory"); - while(retry++ < 5) - { - fw_gwake = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_gwake == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_gwake]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_gwake]Alloc memory fail,exit."); - return FAIL; - } - - //step2:load app_code firmware section 1 file data - GTP_DEBUG("[burn_fw_gwake]step2:load app_code firmware section 1 file data"); - ret = gup_load_section_file(fw_gwake, start_index, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 1 fail."); - goto exit_burn_fw_gwake; - } - - //step3:burn app_code firmware section 1 - GTP_DEBUG("[burn_fw_gwake]step3:burn app_code firmware section 1"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3A); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 1 fail."); - goto exit_burn_fw_gwake; - } - - //step5:load app_code firmware section 2 file data - GTP_DEBUG("[burn_fw_gwake]step5:load app_code firmware section 2 file data"); - ret = gup_load_section_file(fw_gwake, start_index+FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 2 fail."); - goto exit_burn_fw_gwake; - } - - //step6:burn app_code firmware section 2 - GTP_DEBUG("[burn_fw_gwake]step6:burn app_code firmware section 2"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3B); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 2 fail."); - goto exit_burn_fw_gwake; - } - - //step7:load app_code firmware section 3 file data - GTP_DEBUG("[burn_fw_gwake]step7:load app_code firmware section 3 file data"); - ret = gup_load_section_file(fw_gwake, start_index+2*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 3 fail."); - goto exit_burn_fw_gwake; - } - - //step8:burn app_code firmware section 3 - GTP_DEBUG("[burn_fw_gwake]step8:burn app_code firmware section 3"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3C); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 3 fail."); - goto exit_burn_fw_gwake; - } - - //step9:load app_code firmware section 4 file data - GTP_DEBUG("[burn_fw_gwake]step9:load app_code firmware section 4 file data"); - ret = gup_load_section_file(fw_gwake, start_index + 3*FW_SECTION_LENGTH, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]load app_code firmware section 4 fail."); - goto exit_burn_fw_gwake; - } - - //step10:burn app_code firmware section 4 - GTP_DEBUG("[burn_fw_gwake]step10:burn app_code firmware section 4"); - ret = gup_burn_fw_gwake_section(client, fw_gwake, 0x9000, FW_SECTION_LENGTH, 0x3D); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_gwake]burn app_code firmware section 4 fail."); - goto exit_burn_fw_gwake; - } - - update_msg.fw_burned_len += FW_GWAKE_LENGTH; - GTP_DEBUG("[burn_fw_gwake]Burned length:%d", update_msg.fw_burned_len); - ret = SUCCESS; - -exit_burn_fw_gwake: - kfree(fw_gwake); - return ret; -} - -static u8 gup_burn_fw_finish(struct i2c_client *client) -{ - u8* fw_ss51 = NULL; - u8 retry = 0; - s32 ret = 0; - - GTP_INFO("[burn_fw_finish]burn first 8K of ss51 and finish update."); - //step1:alloc memory - GTP_DEBUG("[burn_fw_finish]step1:alloc memory"); - while(retry++ < 5) - { - fw_ss51 = (u8*)kzalloc(FW_SECTION_LENGTH, GFP_KERNEL); - if(fw_ss51 == NULL) - { - continue; - } - else - { - GTP_DEBUG("[burn_fw_finish]Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); - break; - } - } - if(retry >= 5) - { - GTP_ERROR("[burn_fw_finish]Alloc memory fail,exit."); - return FAIL; - } - - GTP_DEBUG("[burn_fw_finish]step2: burn ss51 first 8K."); - ret = gup_load_section_file(fw_ss51, 0, FW_SECTION_LENGTH, SEEK_SET); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]load ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step3:clear control flag"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]clear control flag fail."); - goto exit_burn_fw_finish; - } - - GTP_DEBUG("[burn_fw_finish]step4:burn ss51 firmware section 1"); - ret = gup_burn_fw_section(client, fw_ss51, 0xC000, 0x01); - if(FAIL == ret) - { - GTP_ERROR("[burn_fw_finish]burn ss51 firmware section 1 fail."); - goto exit_burn_fw_finish; - } - - //step11:enable download DSP code - GTP_DEBUG("[burn_fw_finish]step5:enable download DSP code "); - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x99); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]enable download DSP code fail."); - goto exit_burn_fw_finish; - } - - //step12:release ss51 & hold dsp - GTP_DEBUG("[burn_fw_finish]step6:release ss51 & hold dsp"); - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x08); - if(ret <= 0) - { - GTP_ERROR("[burn_fw_finish]release ss51 & hold dsp fail."); - goto exit_burn_fw_finish; - } - - if (fw_ss51) - { - kfree(fw_ss51); - } - return SUCCESS; - -exit_burn_fw_finish: - if (fw_ss51) - { - kfree(fw_ss51); - } - return FAIL; -} - -s32 gup_update_proc(void *dir) -{ - s32 ret = 0; - u8 retry = 0; - s32 update_ret = FAIL; - st_fw_head fw_head; - - GTP_INFO("[update_proc]Begin update ......"); - -#if GTP_AUTO_UPDATE - if (1 == searching_file) - { - u8 timeout = 0; - searching_file = 0; // exit .bin update file searching - GTP_INFO("Exiting searching file for auto update."); - while ((show_len != 200) && (show_len != 100) && (timeout++ < 150)) // wait for auto update quitted completely - { - msleep(100); - } - } -#endif - - show_len = 1; - total_len = 100; - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - return gup_fw_download_proc(dir, GTP_FL_FW_BURN); - } -#endif - - update_msg.file = NULL; - ret = gup_check_update_file(i2c_client_point, &fw_head, (u8*)dir); //20121211 - if (FAIL == ret) - { - GTP_ERROR("[update_proc]check update file fail."); - goto file_fail; - } - - //gtp_reset_guitar(i2c_client_point, 20); - ret = gup_get_ic_fw_msg(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]get ic message fail."); - goto file_fail; - } - - ret = gup_enter_update_judge(&fw_head); //20121212 - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]Check *.bin file fail."); - goto file_fail; - } - - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - ret = gup_enter_update_mode(i2c_client_point); - - if (FAIL == ret) - { - GTP_ERROR("[update_proc]enter update mode fail."); - goto update_fail; - } - - while (retry++ < 5) - { - show_len = 10; - total_len = 100; - update_msg.fw_burned_len = 0; - ret = gup_burn_dsp_isp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp isp fail."); - continue; - } - - show_len = 20; - ret = gup_burn_fw_ss51(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn ss51 firmware fail."); - continue; - } - - show_len = 30; - ret = gup_burn_fw_dsp(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn dsp firmware fail."); - continue; - } - - show_len = 40; - ret = gup_burn_fw_boot(i2c_client_point); - if(FAIL == ret) - { - GTP_ERROR("[update_proc]burn bootloader firmware fail."); - continue; - } - show_len = 50; - - ret = gup_burn_fw_boot_isp(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn boot_isp firmware fail."); - continue; - } - - show_len = 60; - ret = gup_burn_fw_link(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn link firmware fail."); - continue; - } - - show_len = 70; - ret = gup_burn_fw_gwake(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn app_code firmware fail."); - continue; - } - show_len = 80; - - ret = gup_burn_fw_finish(i2c_client_point); - if (FAIL == ret) - { - GTP_ERROR("[update_proc]burn finish fail."); - continue; - } - show_len = 90; - GTP_INFO("[update_proc]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) - { - GTP_ERROR("[update_proc]retry timeout,UPDATE FAIL."); - update_ret = FAIL; - } - else - { - update_ret = SUCCESS; - } - -update_fail: - GTP_DEBUG("[update_proc]leave update mode."); - gup_leave_update_mode(); - - msleep(100); - - if (SUCCESS == update_ret) - { - GTP_DEBUG("[update_proc]send config."); - ret = gtp_send_cfg(i2c_client_point); - if (ret < 0) - { - GTP_ERROR("[update_proc]send config fail."); - } - } - - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - -file_fail: - - if (update_msg.file && !IS_ERR(update_msg.file)) - { - if (update_msg.old_fs) - { - set_fs(update_msg.old_fs); - } - filp_close(update_msg.file, NULL); - } -#if (GTP_AUTO_UPDATE && GTP_AUTO_UPDATE_CFG && GTP_HEADER_FW_UPDATE) - if (NULL == dir) - { - gup_search_file(AUTO_SEARCH_CFG); - if (got_file_flag & CFG_FILE_READY) - { - ret = gup_update_config(i2c_client_point); - if(ret <= 0) - { - GTP_ERROR("Update config failed."); - } - _CLOSE_FILE(update_msg.cfg_file); - msleep(500); //waiting config to be stored in FLASH. - } - } -#endif - - total_len = 100; - if (SUCCESS == update_ret) - { - show_len = 100; - return SUCCESS; - } - else - { - show_len = 200; - return FAIL; - } -} - -#if GTP_AUTO_UPDATE -u8 gup_init_update_proc(struct i2c_client *client) -{ - struct task_struct *thread = NULL; - - GTP_INFO("Ready to run auto update thread"); - -#if GTP_COMPATIBLE_MODE - if (CHIP_TYPE_GT9F == gtp_chip_type) - { - thread = kthread_run(gup_update_proc, "update", "fl_auto_update"); - } - else -#endif - { - thread = kthread_run(gup_update_proc, (void *)NULL, "guitar_update"); - } - if (IS_ERR(thread)) - { - GTP_ERROR("Failed to create update thread.\n"); - return -1; - } - - return 0; -} -#endif - - -//******************* For GT9XXF Start ********************// - -#define FL_UPDATE_PATH "/data/_fl_update_.bin" -#define FL_UPDATE_PATH_SD "/sdcard/_fl_update_.bin" - -#define FW_LITTLE_SS51_LENGTH (12 * 0x400) // 12K - -#define GUP_FW_CHK_SIZE 256 -#define MAX_CHECK_TIMES 128 // max: 2 * (16 * 1024) / 256 = 128 - -//for clk cal -#define PULSE_LENGTH (200) -#define INIT_CLK_DAC (50) -#define MAX_CLK_DAC (120) -#define CLK_AVG_TIME (1) -#define MILLION 1000000 - -#define _wRW_MISCTL__RG_DMY 0x4282 -#define _bRW_MISCTL__RG_OSC_CALIB 0x4268 -#define _fRW_MISCTL__GIO0 0x41e9 -#define _fRW_MISCTL__GIO1 0x41ed -#define _fRW_MISCTL__GIO2 0x41f1 -#define _fRW_MISCTL__GIO3 0x41f5 -#define _fRW_MISCTL__GIO4 0x41f9 -#define _fRW_MISCTL__GIO5 0x41fd -#define _fRW_MISCTL__GIO6 0x4201 -#define _fRW_MISCTL__GIO7 0x4205 -#define _fRW_MISCTL__GIO8 0x4209 -#define _fRW_MISCTL__GIO9 0x420d -#define _fRW_MISCTL__MEA 0x41a0 -#define _bRW_MISCTL__MEA_MODE 0x41a1 -#define _wRW_MISCTL__MEA_MAX_NUM 0x41a4 -#define _dRO_MISCTL__MEA_VAL 0x41b0 -#define _bRW_MISCTL__MEA_SRCSEL 0x41a3 -#define _bRO_MISCTL__MEA_RDY 0x41a8 -#define _rRW_MISCTL__ANA_RXADC_B0_ 0x4250 -#define _bRW_MISCTL__RG_LDO_A18_PWD 0x426f -#define _bRW_MISCTL__RG_BG_PWD 0x426a -#define _bRW_MISCTL__RG_CLKGEN_PWD 0x4269 -#define _fRW_MISCTL__RG_RXADC_PWD 0x426a -#define _bRW_MISCTL__OSC_CK_SEL 0x4030 -#define _rRW_MISCTL_RG_DMY83 0x4283 -#define _rRW_MISCTL__GIO1CTL_B2_ 0x41ee -#define _rRW_MISCTL__GIO1CTL_B1_ 0x41ed - -#if GTP_COMPATIBLE_MODE - -u8 gup_check_fs_mounted(char *path_name) -{ - struct path root_path; - struct path path; - int err; - err = kern_path("/", LOOKUP_FOLLOW, &root_path); - - if (err) - return FAIL; - - err = kern_path(path_name, LOOKUP_FOLLOW, &path); - - if (err) - return FAIL; - - if (path.mnt->mnt_sb == root_path.mnt->mnt_sb) - { - //-- not mounted - path_put(&path); - path_put(&root_path); - return FAIL; - } - else - { - path_put(&path); - path_put(&root_path); - return SUCCESS; - } -} - -s32 gup_hold_ss51_dsp(struct i2c_client *client) -{ - s32 ret = -1; - s32 retry = 0; - u8 rd_buf[3]; - - while(retry++ < 200) - { - #if GTP_FL_LITTLE_SYSTEM - if (power_is_down) - { - GTP_DEBUG("System power is down, exit hold ss51 & dsp."); - return FAIL; - } - #endif - // step4:Hold ss51 & dsp - ret = gup_set_ic_msg(client, _rRW_MISCTL__SWRST_B0_, 0x0C); - if(ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - - // step5:Confirm hold - ret = gup_get_ic_msg(client, _rRW_MISCTL__SWRST_B0_, rd_buf, 1); - if (ret <= 0) - { - GTP_DEBUG("Hold ss51 & dsp I2C error,retry:%d", retry); - continue; - } - if (0x0C == rd_buf[GTP_ADDR_LENGTH]) - { - GTP_DEBUG("[enter_update_mode]Hold ss51 & dsp confirm SUCCESS"); - break; - } - GTP_DEBUG("Hold ss51 & dsp confirm 0x4180 failed,value:%d", rd_buf[GTP_ADDR_LENGTH]); - } - if(retry >= 200) - { - GTP_ERROR("Enter update Hold ss51 failed."); - return FAIL; - } - //DSP_CK and DSP_ALU_CK PowerOn - ret = gup_set_ic_msg(client, 0x4010, 0x00); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]DSP_CK and DSP_ALU_CK PowerOn fail."); - return FAIL; - } - - //disable wdt - ret = gup_set_ic_msg(client, _bRW_MISCTL__TMR0_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]disable wdt fail."); - return FAIL; - } - - //clear cache enable - ret = gup_set_ic_msg(client, _bRW_MISCTL__CACHE_EN, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear cache enable fail."); - return FAIL; - } - - //set boot from sram - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOTCTL_B0_, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set boot from sram fail."); - return FAIL; - } - - //software reboot - ret = gup_set_ic_msg(client, _bWO_MISCTL__CPU_SWRST_PULSE, 0x01); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]software reboot fail."); - return FAIL; - } - - return SUCCESS; -} - -s32 gup_enter_update_mode_fl(struct i2c_client *client) -{ - s32 ret = -1; - //s32 retry = 0; - //u8 rd_buf[3]; - - //step1:RST output low last at least 2ms - GTP_GPIO_OUTPUT(GTP_RST_PORT, 0); - msleep(2); - - //step2:select I2C slave addr,INT:0--0xBA;1--0x28. - GTP_GPIO_OUTPUT(GTP_INT_PORT, (client->addr == 0x14)); - msleep(2); - - //step3:RST output high reset guitar - GTP_GPIO_OUTPUT(GTP_RST_PORT, 1); - - msleep(5); - - //select addr & hold ss51_dsp - ret = gup_hold_ss51_dsp(client); - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]hold ss51 & dsp failed."); - return FAIL; - } - - //clear control flag - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_CTL_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]clear control flag fail."); - return FAIL; - } - - //set scramble - ret = gup_set_ic_msg(client, _rRW_MISCTL__BOOT_OPT_B0_, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]set scramble fail."); - return FAIL; - } - - //enable accessing code - ret = gup_set_ic_msg(client, _bRW_MISCTL__MEM_CD_EN, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[enter_update_mode]enable accessing code fail."); - return FAIL; - } - - return SUCCESS; -} - - -static s32 gup_prepare_fl_fw(char *path, st_fw_head *fw_head) -{ - s32 i = 0; - s32 ret = 0; - s32 timeout = 0; - - if (!memcmp(path, "update", 6)) - { - GTP_INFO("Search for Flashless firmware file to update"); - searching_file = 1; - for (i = 0; i < GUP_SEARCH_FILE_TIMES; ++i) - { - if (0 == searching_file) - { - GTP_INFO("Force terminate searching file auto update."); - return FAIL; - } - update_msg.file = filp_open(FL_UPDATE_PATH, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - update_msg.file = filp_open(FL_UPDATE_PATH_SD, O_RDONLY, 0); - if (IS_ERR(update_msg.file)) - { - msleep(2000); - continue; - } - else - { - path = FL_UPDATE_PATH_SD; - break; - } - } - else - { - path = FL_UPDATE_PATH; - break; - } - } - searching_file = 0; - if (i >= 50) - { - GTP_ERROR("Search timeout, update aborted"); - return FAIL; - } - else - { - _CLOSE_FILE(update_msg.file); - } - while (rqst_processing && (timeout++ < 15)) - { - GTP_INFO("wait for request process completed!"); - msleep(1000); - } - } - - GTP_INFO("Firmware update file path: %s", path); - update_msg.file = filp_open(path, O_RDONLY, 0); - - if (IS_ERR(update_msg.file)) - { - GTP_ERROR("Open update file(%s) error!", path); - return FAIL; - } - - update_msg.old_fs = get_fs(); - set_fs(KERNEL_DS); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.fw_total_len = update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_END); - if (sizeof(gtp_default_FW_fl) != update_msg.fw_total_len) - { - GTP_ERROR("Inconsistent firmware size. File size: %d, default fw size: %d", update_msg.fw_total_len, sizeof(gtp_default_FW_fl)); - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return FAIL; - } - - GTP_DEBUG("Firmware size: %d", update_msg.fw_total_len); - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - update_msg.file->f_op->read(update_msg.file, (char*)fw_head, FW_HEAD_LENGTH, &update_msg.file->f_pos); - - update_msg.file->f_op->llseek(update_msg.file, 0, SEEK_SET); - //copy fw file to gtp_default_FW_fl array - ret = update_msg.file->f_op->read(update_msg.file, - (char*)gtp_default_FW_fl, - update_msg.fw_total_len, - &update_msg.file->f_pos); - if (ret < 0) - { - GTP_ERROR("Failed to read firmware data from %s, err-code: %d", path, ret); - ret = FAIL; - } - else - { - ret = SUCCESS; - } - set_fs(update_msg.old_fs); - _CLOSE_FILE(update_msg.file); - return ret; -} - -static u8 gup_check_update_file_fl(struct i2c_client *client, st_fw_head *fw_head, char *path) -{ - s32 i = 0; - s32 fw_checksum = 0; - s32 ret = 0; - - if (NULL != path) - { - ret = gup_prepare_fl_fw(path, fw_head); - if (ret == FAIL) - { - return FAIL; - } - } - - memcpy(fw_head, gtp_default_FW_fl, FW_HEAD_LENGTH); - GTP_INFO("FILE HARDWARE INFO:%02x%02x%02x%02x", fw_head->hw_info[0], fw_head->hw_info[1], fw_head->hw_info[2], fw_head->hw_info[3]); - GTP_INFO("FILE PID:%s", fw_head->pid); - fw_head->vid = ((fw_head->vid & 0xFF00) >> 8) + ((fw_head->vid & 0x00FF) << 8); - GTP_INFO("FILE VID:%04x", fw_head->vid); - - after_912_1020 = 0; - if (!memcmp(fw_head->pid, "912", 3)) - { - if (fw_head->vid > 0x1020) - { - after_912_1020 = 1; - GTP_DEBUG("After 912_1020, config length set to 228"); - } - } - - //check firmware legality - fw_checksum = 0; - for (i = FW_HEAD_LENGTH; i < (FW_HEAD_LENGTH + update_msg.fw_total_len); i += 2) - { - fw_checksum = (gtp_default_FW_fl[i]<<8) + gtp_default_FW_fl[i+1]; - } - - GTP_DEBUG("firmware checksum:%x", fw_checksum&0xFFFF); - if(fw_checksum&0xFFFF) - { - GTP_ERROR("Illegal firmware file."); - return FAIL; - } - - return SUCCESS; -} - -#if GTP_FL_LITTLE_SYSTEM -// blocksize: 256Bytes -u8 gup_burn_ss51_block(struct i2c_client *client, s32 block_section, s32 fw_block, u16 *fw_chksum) -{ - s32 ret = 0; - s32 index = 0; - s32 i = 0; - - GTP_DEBUG("Burn big ss51 block%d section%d (size: 256Bytes)", fw_block, block_section); - - switch (fw_block) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - index = FW_HEAD_LENGTH + (8 + fw_block-1)* 1024 * 2 + (block_section-1) * 256; - break; - - case 9: - case 10: - case 11: - index = FW_HEAD_LENGTH + (16 - fw_block) * 1024 * 2 + (block_section-1) * 256; - break; - default: - GTP_ERROR("Invalid firmware block: %d", fw_block); - return FAIL; - } - - ret = i2c_write_bytes(client, GTP_REG_BUFFER + (block_section - 1) * 256, - >p_default_FW_fl[index], 256); - - if (ret < 0) - { - GTP_ERROR("Failed to burn ss51 block%d section%d (size: 256Bytes)!", fw_block, block_section); - return FAIL; - } - - if (block_section == 1) - { - u16 chksum = 0; - - for (i = 0; i < (2 * 1024); i += 2) - { - chksum += ((gtp_default_FW_fl[index + i]) << 8) + (gtp_default_FW_fl[index + i + 1]); - } - *fw_chksum = chksum; - } - return SUCCESS; -} - -u8 gup_burn_ss51_seg_b(struct i2c_client *client, s32 size, u16 *fw_chksum) -{ - s32 ret = 0; - s32 i = 0; - u16 chksum = 0; - - GTP_DEBUG("Burn big ss51 Seg B(size: %dK)", size); - - ret = i2c_write_bytes(client, GTP_REG_SS51_SEG_B, - >p_default_FW_fl[FW_HEAD_LENGTH], size * 1024); - - if (ret < 0) - { - GTP_ERROR("Failed to Burn ss51 Seg B(size: %dK)", size); - return FAIL; - } - - for (i = 0; i < (size * 1024); i += 2) - { - chksum += ((gtp_default_FW_fl[FW_HEAD_LENGTH + i]) << 8) + gtp_default_FW_fl[FW_HEAD_LENGTH + i + 1]; - } - *fw_chksum = chksum; - return SUCCESS; -} - -static u8 gup_download_fw_little_ss51(struct i2c_client *client) -{ - s32 ret = 0; - GTP_INFO("Download little ss51"); - - GTP_DEBUG("Select Bank0."); - - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("Select bank0 fail."); - return FAIL; - } - - // Just write - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH + FW_SS51_LENGTH + FW_DSP_LENGTH], FW_LITTLE_SS51_LENGTH); - - - if (ret < 0) - { - GTP_ERROR("Failed to write little ss51."); - return FAIL; - } - - return SUCCESS; -} - -#endif - -static u8 gup_download_fw_ss51(struct i2c_client *client, u8 dwn_mode) -{ - s32 ret = 0; - -#if GTP_FL_LITTLE_SYSTEM - if (GTP_FL_PWR_RESUME_BURN == dwn_mode) - { - return gup_download_fw_little_ss51(client); - } -#endif - - if (GTP_FL_FW_BURN == dwn_mode) - { - GTP_DEBUG("[download_fw_ss51]Begin download ss51 firmware---->>"); - } - else - { - GTP_DEBUG("[download_fw_ss51]Begin check ss51 firmware----->>"); - } - //step1:download FW section 1 - GTP_DEBUG("[download_fw_ss51]step1:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x00); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank0 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - ret = i2c_write_bytes(client, 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], FW_DOWNLOAD_LENGTH); // write the first bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH], - FW_DOWNLOAD_LENGTH); - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 1 fail."); - goto exit_download_fw_ss51; - } - } - - //step2:download FW section 2 - GTP_DEBUG("[download_fw_ss51]step2:download FW section 1"); - ret = gup_set_ic_msg(i2c_client_point, _bRW_MISCTL__SRAM_BANK, 0x01); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_ss51]select bank1 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - ret = i2c_write_bytes(client, 0xC000, >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH],FW_DOWNLOAD_LENGTH); // write the second bank - - if (ret == -1) - { - GTP_ERROR("[download_fw_ss51]download FW section 2 fail."); - ret = FAIL; - goto exit_download_fw_ss51; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(i2c_client_point, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+FW_DOWNLOAD_LENGTH], - FW_DOWNLOAD_LENGTH); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_ss51]Checked FW section 2 fail."); - goto exit_download_fw_ss51; - } - } - ret = SUCCESS; - -exit_download_fw_ss51: - - return ret; -} -#if (!GTP_SUPPORT_I2C_DMA) -static s32 i2c_auto_read(struct i2c_client *client,u8 *rxbuf, int len) -{ - u8 retry; - u16 left = len; - u16 offset = 0; - - struct i2c_msg msg = - { - //.addr = ((client->addr &I2C_MASK_FLAG) | (I2C_ENEXT_FLAG)), - .addr = ((client->addr &I2C_MASK_FLAG) | (I2C_PUSHPULL_FLAG)), - .flags = I2C_M_RD, - .timing = I2C_MASTER_CLOCK - }; - - if(NULL == rxbuf) - { - return -1; - } - - while (left > 0) - { - msg.buf = &rxbuf[offset]; - - if (left > MAX_TRANSACTION_LENGTH) - { - msg.len = MAX_TRANSACTION_LENGTH; - left -= MAX_TRANSACTION_LENGTH; - offset += MAX_TRANSACTION_LENGTH; - } - else - { - msg.len = left; - left = 0; - } - - retry = 0; - - while (i2c_transfer(client->adapter, &msg, 1) != 1) - { - retry++; - - if (retry == 20) - { - GTP_ERROR("I2C read 0x%X length=%d failed\n", offset, len); - return -1; - } - } - } - - return 0; -} -#endif - -static u8 gup_check_and_repair(struct i2c_client *client, s32 chk_start_addr, u8 *target_fw, u32 chk_total_length) -{ - s32 ret = 0; - u32 chked_len = 0; - u8 chked_times = 0; - u32 chk_addr = 0; - u8 chk_buf[GUP_FW_CHK_SIZE]; - u32 rd_size = 0; - u8 flag_err = 0; - s32 i = 0; - - chk_addr = chk_start_addr; - while((chked_times < MAX_CHECK_TIMES) && (chked_len < chk_total_length)) - { - rd_size = chk_total_length - chked_len; - if(rd_size >= GUP_FW_CHK_SIZE) - { - rd_size = GUP_FW_CHK_SIZE; - } - #if GTP_SUPPORT_I2C_DMA - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - #else - if (!i) - { - ret = i2c_read_bytes(client, chk_addr, chk_buf, rd_size); - } - else - { - ret = i2c_auto_read(client, chk_buf, rd_size); - } - #endif - - if(-1 == ret) - { - GTP_ERROR("Read chk ram fw i2c error"); - chked_times++; - continue; - } - - for(i=0; i= MAX_CHECK_TIMES) - { - GTP_ERROR("Ram data check failed."); - return FAIL; - } - return SUCCESS; -} - -static u8 __gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode, int len) -{ - s32 ret = 0; - - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_DEBUG("[download_fw_dsp]Begin download dsp fw---->>"); - } - else - { - GTP_DEBUG("[download_fw_dsp]Begin check dsp fw---->>"); - } - - //step1:select bank2 - GTP_DEBUG("[download_fw_dsp]step1:select bank2"); - ret = gup_set_ic_msg(client, _bRW_MISCTL__SRAM_BANK, 0x02); - - if (ret <= 0) - { - GTP_ERROR("[download_fw_dsp]select bank2 fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - ret = i2c_write_bytes(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - len); // write the second bank - if (ret == -1) - { - GTP_ERROR("[download_fw_dsp]download FW dsp fail."); - ret = FAIL; - goto exit_download_fw_dsp; - } - - if (GTP_FL_FW_BURN == dwn_mode) - { - ret = gup_check_and_repair(client, - 0xC000, - >p_default_FW_fl[FW_HEAD_LENGTH+2*FW_DOWNLOAD_LENGTH], - len); - - if(FAIL == ret) - { - GTP_ERROR("[download_fw_dsp]Checked FW dsp fail."); - goto exit_download_fw_dsp; - } - - } - ret = SUCCESS; - -exit_download_fw_dsp: - - return ret; -} - -static u8 gup_download_fw_dsp(struct i2c_client *client, u8 dwn_mode) -{ - return __gup_download_fw_dsp(client, dwn_mode, FW_DSP_LENGTH); -} - -s32 gup_fw_download_proc(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - st_fw_head fw_head; - -#if GTP_FL_LITTLE_SYSTEM - if (GTP_FL_PWR_RESUME_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin poweron resume little system download....."); - } -#endif - if(GTP_FL_FW_BURN == dwn_mode) - { - GTP_INFO("[fw_download_proc]Begin fw download ......"); - } - else - { - GTP_INFO("[fw_download_proc]Begin fw check ......"); - } - - show_len = 0; - total_len = 100; - - ret = gup_check_update_file_fl(i2c_client_point, &fw_head, (char *)dir); - - show_len = 10; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]check update file fail."); - goto file_fail; - } - - if (!memcmp(fw_head.pid, "950", 3)) - { - is_950 = 1; - GTP_DEBUG("GT9XXF IC Type: gt950"); - } - else - { - is_950 = 0; - } - - if (NULL != dir) - { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); - #endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - show_len = 20; - - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) - { - ret = gup_download_fw_ss51(i2c_client_point, dwn_mode); - show_len = 60; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn ss51 firmware fail."); - continue; - } - - ret = gup_download_fw_dsp(i2c_client_point, dwn_mode); - show_len = 80; - if (FAIL == ret) - { - GTP_ERROR("[fw_download_proc]burn dsp firmware fail."); - continue; - } - GTP_INFO("[fw_download_proc]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) - { - GTP_ERROR("[fw_download_proc]retry timeout,UPDATE FAIL."); - goto download_fail; - } - - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - show_len = 100; - return SUCCESS; - -download_fail: - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); - #if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); - #endif - } - -file_fail: - show_len = 200; - return FAIL; -} - - -static void gup_bit_write(s32 addr, s32 bit, s32 val) -{ - u8 buf; - i2c_read_bytes(i2c_client_point, addr, &buf, 1); - - buf = (buf & (~((u8)1 << bit))) | ((u8)val << bit); - - i2c_write_bytes(i2c_client_point, addr, &buf, 1); -} - -static void gup_clk_count_init(s32 bCh, s32 bCNT) -{ - u8 buf; - - //_fRW_MISCTL__MEA_EN = 0; //Frequency measure enable - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - //_fRW_MISCTL__MEA_CLR = 1; //Frequency measure clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 1); - //_bRW_MISCTL__MEA_MODE = 0; //Pulse mode - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_MODE, &buf, 1); - //_bRW_MISCTL__MEA_SRCSEL = 8 + bCh; //From GIO1 - buf = 8 + bCh; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__MEA_SRCSEL, &buf, 1); - //_wRW_MISCTL__MEA_MAX_NUM = bCNT; //Set the Measure Counts = 1 - buf = bCNT; - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__MEA_MAX_NUM, &buf, 1); - //_fRW_MISCTL__MEA_CLR = 0; //Frequency measure not clear - gup_bit_write(_fRW_MISCTL__MEA, 1, 0); - //_fRW_MISCTL__MEA_EN = 1; - gup_bit_write(_fRW_MISCTL__MEA, 0, 1); -} - -static u32 gup_clk_count_get(void) -{ - s32 ready = 0; - s32 temp; - s8 buf[4]; - - while ((ready == 0)) //Wait for measurement complete - { - i2c_read_bytes(i2c_client_point, _bRO_MISCTL__MEA_RDY, buf, 1); - ready = buf[0]; - } - - udelay(50); - - //_fRW_MISCTL__MEA_EN = 0; - gup_bit_write(_fRW_MISCTL__MEA, 0, 0); - i2c_read_bytes(i2c_client_point, _dRO_MISCTL__MEA_VAL, buf, 4); - GTP_INFO("Clk_count 0: %2X", buf[0]); - GTP_INFO("Clk_count 1: %2X", buf[1]); - GTP_INFO("Clk_count 2: %2X", buf[2]); - GTP_INFO("Clk_count 3: %2X", buf[3]); - - temp = (s32)buf[0] + ((s32)buf[1] << 8) + ((s32)buf[2] << 16) + ((s32)buf[3] << 24); - GTP_INFO("Clk_count : %d", temp); - return temp; -} -u8 gup_clk_dac_setting(int dac) -{ - s8 buf1, buf2; - - i2c_read_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_read_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - buf1 = (buf1 & 0xFFCF) | ((dac & 0x03) << 4); - buf2 = (dac >> 2) & 0x3f; - - i2c_write_bytes(i2c_client_point, _wRW_MISCTL__RG_DMY, &buf1, 1); - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_OSC_CALIB, &buf2, 1); - - return 0; -} - -static u8 gup_clk_calibration_pin_select(s32 bCh) -{ - s32 i2c_addr; - - switch (bCh) - { - case 0: - i2c_addr = _fRW_MISCTL__GIO0; - break; - - case 1: - i2c_addr = _fRW_MISCTL__GIO1; - break; - - case 2: - i2c_addr = _fRW_MISCTL__GIO2; - break; - - case 3: - i2c_addr = _fRW_MISCTL__GIO3; - break; - - case 4: - i2c_addr = _fRW_MISCTL__GIO4; - break; - - case 5: - i2c_addr = _fRW_MISCTL__GIO5; - break; - - case 6: - i2c_addr = _fRW_MISCTL__GIO6; - break; - - case 7: - i2c_addr = _fRW_MISCTL__GIO7; - break; - - case 8: - i2c_addr = _fRW_MISCTL__GIO8; - break; - - case 9: - i2c_addr = _fRW_MISCTL__GIO9; - break; - } - - gup_bit_write(i2c_addr, 1, 0); - - return 0; -} - -void gup_output_pulse(int t) -{ - unsigned long flags; - //s32 i; - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - udelay(10); - - local_irq_save(flags); - - mt_set_gpio_out(GTP_INT_PORT, 1); - udelay(50); - mt_set_gpio_out(GTP_INT_PORT, 0); - udelay(t - 50); - mt_set_gpio_out(GTP_INT_PORT, 1); - - local_irq_restore(flags); - - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); -} - -static void gup_sys_clk_init(void) -{ - u8 buf; - - //_fRW_MISCTL__RG_RXADC_CKMUX = 0; - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 5, 0); - //_bRW_MISCTL__RG_LDO_A18_PWD = 0; //DrvMISCTL_A18_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_LDO_A18_PWD, &buf, 1); - //_bRW_MISCTL__RG_BG_PWD = 0; //DrvMISCTL_BG_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_BG_PWD, &buf, 1); - //_bRW_MISCTL__RG_CLKGEN_PWD = 0; //DrvMISCTL_CLKGEN_PowerON - buf = 0; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__RG_CLKGEN_PWD, &buf, 1); - //_fRW_MISCTL__RG_RXADC_PWD = 0; //DrvMISCTL_RX_ADC_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 0, 0); - //_fRW_MISCTL__RG_RXADC_REF_PWD = 0; //DrvMISCTL_RX_ADCREF_PowerON - gup_bit_write(_rRW_MISCTL__ANA_RXADC_B0_, 1, 0); - //gup_clk_dac_setting(60); - //_bRW_MISCTL__OSC_CK_SEL = 1;; - buf = 1; - i2c_write_bytes(i2c_client_point, _bRW_MISCTL__OSC_CK_SEL, &buf, 1); -} - -u8 gup_clk_calibration(void) -{ - //u8 buf; - //u8 trigger; - s32 i; - struct timeval start, end; - s32 count; - s32 count_ref; - s32 sec; - s32 usec; - s32 ret = 0; - //unsigned long flags; - - //buf = 0x0C; // hold ss51 and dsp - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - ret = gup_hold_ss51_dsp(i2c_client_point); - if (ret <= 0) - { - GTP_ERROR("[gup_clk_calibration]hold ss51 & dsp failed."); - return FAIL; - } - - //_fRW_MISCTL__CLK_BIAS = 0; //disable clock bias - gup_bit_write(_rRW_MISCTL_RG_DMY83, 7, 0); - - //_fRW_MISCTL__GIO1_PU = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B2_, 0, 0); - - //_fRW_MISCTL__GIO1_OE = 0; //set TOUCH INT PIN MODE as input - gup_bit_write(_rRW_MISCTL__GIO1CTL_B1_, 1, 0); - - //buf = 0x00; - //i2c_write_bytes(i2c_client_point, _rRW_MISCTL__SWRST_B0_, &buf, 1); - //msleep(1000); - - GTP_INFO("CLK calibration GO"); - gup_sys_clk_init(); - gup_clk_calibration_pin_select(1);//use GIO1 to do the calibration - - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - for (i = INIT_CLK_DAC; i < MAX_CLK_DAC; i++) - { - if (tpd_halt) - { - i = 72; //80; // if sleeping while calibrating main clock, set it default 80 - break; - } - GTP_INFO("CLK calibration DAC %d", i); - - gup_clk_dac_setting(i); - gup_clk_count_init(1, CLK_AVG_TIME); - - #if 0 - gup_output_pulse(PULSE_LENGTH); - count = gup_clk_count_get(); - - if (count > PULSE_LENGTH * 60)//60= 60Mhz * 1us - { - break; - } - - #else - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - //local_irq_save(flags); - do_gettimeofday(&start); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - msleep(1); - mt_set_gpio_out(GTP_INT_PORT, 0); - msleep(1); - - //local_irq_save(flags); - do_gettimeofday(&end); - mt_set_gpio_out(GTP_INT_PORT, 1); - //local_irq_restore(flags); - - count = gup_clk_count_get(); - udelay(20); - GTP_GPIO_OUTPUT(GTP_INT_PORT, 0); - - usec = end.tv_usec - start.tv_usec; - sec = end.tv_sec - start.tv_sec; - count_ref = 60 * (usec+ sec * MILLION);//60= 60Mhz * 1us - - GTP_DEBUG("== time %d, %d, %d", sec, usec, count_ref); - - if (count > count_ref) - { - GTP_DEBUG("== count_diff %d", count - count_ref); - break; - } - - #endif - } - - //clk_dac = i; - - //gtp_reset_guitar(i2c_client_point, 20); - -#if 0//for debug - //-- ouput clk to GPIO 4 - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x41FA, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4104, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4105, &buf, 1); - buf = 0x00; - i2c_write_bytes(i2c_client_point, 0x4106, &buf, 1); - buf = 0x01; - i2c_write_bytes(i2c_client_point, 0x4107, &buf, 1); - buf = 0x06; - i2c_write_bytes(i2c_client_point, 0x41F8, &buf, 1); - buf = 0x02; - i2c_write_bytes(i2c_client_point, 0x41F9, &buf, 1); -#endif - - GTP_GPIO_AS_INT(GTP_INT_PORT); - return i; -} - -int gup_reload_fw_dsp(void *dir, u8 dwn_mode) -{ - s32 ret = 0; - u8 retry = 0; - u8 value = 0; - - if (NULL != dir) { - mt_eint_mask(CUST_EINT_TOUCH_PANEL_NUM); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_OFF); -#endif - } - - ret = gup_enter_update_mode_fl(i2c_client_point); - if (FAIL == ret) { - GTP_ERROR("[reload_fw_dsp]enter update mode fail."); - goto download_fail; - } - - while (retry++ < 5) { - ret = __gup_download_fw_dsp(i2c_client_point, dwn_mode, FW_DSP_LENGTH / 2); //reload 2k dsp code - if (FAIL == ret){ - GTP_ERROR("[reload_fw_dsp]burn dsp firmware fail."); - continue; - } - GTP_DEBUG("[reload_fw_dsp]UPDATE SUCCESS."); - retry = 0; - break; - } - - if (retry >= 5) { - GTP_ERROR("[reload_fw_dsp]retry timeout,RELOAD FW DSP FAIL."); - goto download_fail; - } - - if (NULL != dir) { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - } - ret = i2c_write_bytes(i2c_client_point, 0x801F, &value, 1); // clear gesture mode reg - if (ret == -1) - return FAIL; - else - return SUCCESS; - -download_fail: - if (NULL != dir) - { - mt_eint_unmask(CUST_EINT_TOUCH_PANEL_NUM); - gtp_fw_startup(i2c_client_point); -#if GTP_ESD_PROTECT - gtp_esd_switch(i2c_client_point, SWITCH_ON); -#endif - } - return FAIL; -} -#endif -//*************** For GT9XXF End ***********************// diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/mtk_tpd.c b/arch/arm/mach-mt8127/ttab/touchpanel/mtk_tpd.c deleted file mode 100644 index 7651b772f69..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/mtk_tpd.c +++ /dev/null @@ -1,562 +0,0 @@ -/****************************************************************************** - * mtk_tpd.c - MTK Android Linux Touch Panel Device Driver * - * * - * Copyright 2008-2009 MediaTek Co.,Ltd. * - * * - * DESCRIPTION: * - * this file provide basic touch panel event to input sub system * - * * - * AUTHOR: * - * Kirby.Wu (mtk02247) * - * * - * NOTE: * - * 1. Sensitivity for touch screen should be set to edge-sensitive. * - * But in this driver it is assumed to be done by interrupt core, * - * though not done yet. Interrupt core may provide interface to * - * let drivers set the sensitivity in the future. In this case, * - * this driver should set the sensitivity of the corresponding IRQ * - * line itself. * - ******************************************************************************/ - -#include "tpd.h" - -//#ifdef VELOCITY_CUSTOM -#include -#include -#include -#include -#include -#include - -// for magnify velocity******************************************** -#define TOUCH_IOC_MAGIC 'A' - -#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC,0) -#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC,1) -int gesture_value; -char tpd_firmware_version_val[5]; -int tpd_config_version; -int tpd_x_line; -int tpd_y_line; -u8 tpd_sensor_id; -EXPORT_SYMBOL(gesture_value); -EXPORT_SYMBOL(tpd_firmware_version_val); -EXPORT_SYMBOL(tpd_config_version); -EXPORT_SYMBOL(tpd_x_line); -EXPORT_SYMBOL(tpd_y_line); -EXPORT_SYMBOL(tpd_sensor_id); - - - - - -extern int tpd_v_magnify_x; -extern int tpd_v_magnify_y; -extern UINT32 DISP_GetScreenHeight(void); -extern UINT32 DISP_GetScreenWidth(void); - -static int tpd_misc_open(struct inode *inode, struct file *file) -{ - return nonseekable_open(inode, file); -} - -static int tpd_misc_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static long tpd_unlocked_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - //char strbuf[256]; - void __user *data; - - long err = 0; - - if (_IOC_DIR(cmd) & _IOC_READ) - { - err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); - } - else if (_IOC_DIR(cmd) & _IOC_WRITE) - { - err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); - } - - if (err) - { - printk("tpd: access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); - return -EFAULT; - } - - switch (cmd) - { - case TPD_GET_VELOCITY_CUSTOM_X: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) - { - err = -EFAULT; - break; - } - - break; - - case TPD_GET_VELOCITY_CUSTOM_Y: - data = (void __user *) arg; - - if (data == NULL) - { - err = -EINVAL; - break; - } - - if (copy_to_user(data, &tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) - { - err = -EFAULT; - break; - } - - break; - - default: - printk("tpd: unknown IOCTL: 0x%08x\n", cmd); - err = -ENOIOCTLCMD; - break; - - } - - return err; -} - - -static struct file_operations tpd_fops = -{ -// .owner = THIS_MODULE, - .open = tpd_misc_open, - .release = tpd_misc_release, - .unlocked_ioctl = tpd_unlocked_ioctl, -}; -/*----------------------------------------------------------------------------*/ -static struct miscdevice tpd_misc_device = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = "touch", - .fops = &tpd_fops, -}; - -//********************************************** -//#endif - - -/* function definitions */ -static int __init tpd_device_init(void); -static void __exit tpd_device_exit(void); -static int tpd_probe(struct platform_device *pdev); -static int tpd_remove(struct platform_device *pdev); - -extern void tpd_suspend(struct early_suspend *h); -extern void tpd_resume(struct early_suspend *h); -extern void tpd_button_init(void); - -//int tpd_load_status = 0; //0: failed, 1: sucess -int tpd_register_flag=0; -/* global variable definitions */ -struct tpd_device *tpd = 0; -static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT] ;//= {0}; - -static struct platform_driver tpd_driver = { - .remove = tpd_remove, - .shutdown = NULL, - .probe = tpd_probe, - #ifndef CONFIG_HAS_EARLYSUSPEND - .suspend = NULL, - .resume = NULL, - #endif - .driver = { - .name = TPD_DEVICE, - }, -}; - -/*20091105, Kelvin, re-locate touch screen driver to earlysuspend*/ -#ifdef CONFIG_HAS_EARLYSUSPEND -static struct early_suspend MTK_TS_early_suspend_handler = -{ - .level = EARLY_SUSPEND_LEVEL_STOP_DRAWING-1, - .suspend = NULL, - .resume = NULL, -}; -#endif - -static struct tpd_driver_t *g_tpd_drv = NULL; -/* Add driver: if find TPD_TYPE_CAPACITIVE driver sucessfully, loading it */ -int tpd_driver_add(struct tpd_driver_t *tpd_drv) -{ - int i; - - if(g_tpd_drv != NULL) - { - TPD_DMESG("touch driver exist \n"); - return -1; - } - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - /* R-touch */ - if(strcmp(tpd_drv->tpd_device_name, "generic") == 0) - { - tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[0].suspend = tpd_drv->suspend; - tpd_driver_list[0].resume = tpd_drv->resume; - tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button; - return 0; - } - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name == NULL) - { - tpd_driver_list[i].tpd_device_name = tpd_drv->tpd_device_name; - tpd_driver_list[i].tpd_local_init = tpd_drv->tpd_local_init; - tpd_driver_list[i].suspend = tpd_drv->suspend; - tpd_driver_list[i].resume = tpd_drv->resume; - tpd_driver_list[i].tpd_have_button = tpd_drv->tpd_have_button; - tpd_driver_list[i].attrs = tpd_drv->attrs; - #if 0 - if(tpd_drv->tpd_local_init()==0) - { - TPD_DMESG("load %s sucessfully\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - } - #endif - break; - } - if(strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - return 1; // driver exist - } - } - - return 0; -} - -int tpd_driver_remove(struct tpd_driver_t *tpd_drv) -{ - int i = 0; - /* check parameter */ - if(tpd_drv == NULL) - { - return -1; - } - for(i = 0; i < TP_DRV_MAX_COUNT; i++) - { - /* find it */ - if (strcmp(tpd_driver_list[i].tpd_device_name, tpd_drv->tpd_device_name) == 0) - { - memset(&tpd_driver_list[i], 0, sizeof(struct tpd_driver_t)); - break; - } - } - return 0; -} - -static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs) -{ - int num = attrs->num; - - for (; num>0;) - device_create_file(dev, attrs->attr[--num]); -} - - -static ssize_t hello_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - return snprintf(buf, PAGE_SIZE, "%d\n", gesture_value); -} - - -static ssize_t hello_val_store(struct device* dev, struct device_attribute* attr, const char* buf, size_t count) { - int val = 0; - val = simple_strtol(buf, NULL, 10); - gesture_value = val; - return count; -} - -static ssize_t firmware_version_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%s\n", tpd_firmware_version_val); - -} -static ssize_t firmware_version_val_store(struct device* dev, struct device_attribute* attr, const char* buf, size_t count) { - - return count; - -} -static ssize_t config_version_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%x\n", tpd_config_version); - -} -static ssize_t config_version_val_store(struct device* dev, struct device_attribute* attr, const char* buf,size_t count) { - - return count; - -} -static ssize_t tpd_x_line_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%d\n", tpd_x_line); - -} -static ssize_t tpd_x_line_val_store(struct device* dev, struct device_attribute* attr, const char* buf,size_t count) { - - return count; - -} -static ssize_t tpd_y_line_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - printk(KERN_ERR"caoyang test read!\n"); - return snprintf(buf, PAGE_SIZE, "%d\n", tpd_y_line); - -} -static ssize_t tpd_y_line_val_store(struct device* dev, struct device_attribute* attr, const char* buf,size_t count) { - - return count; - -} - -static ssize_t sensor_id_val_show(struct device* dev, struct device_attribute* attr, char* buf) { - return snprintf(buf, PAGE_SIZE, "%x\n", tpd_sensor_id); - -} -static ssize_t sensor_id_val_store(struct device* dev, struct device_attribute* attr, const char* buf,size_t count) { - return count; -} - - -static DEVICE_ATTR(gesture_val, S_IRUGO | S_IWUSR, hello_val_show, hello_val_store); -static DEVICE_ATTR(firmware_version, S_IRUGO | S_IWUSR, firmware_version_val_show, firmware_version_val_store); -static DEVICE_ATTR(cfg_version, S_IRUGO | S_IWUSR, config_version_val_show, config_version_val_store); -static DEVICE_ATTR(tpd_xline, S_IRUGO | S_IWUSR, tpd_x_line_val_show, tpd_x_line_val_store); -static DEVICE_ATTR(tpd_yline, S_IRUGO | S_IWUSR, tpd_y_line_val_show, tpd_y_line_val_store); -static DEVICE_ATTR(sensor_id, S_IRUGO | S_IWUSR, sensor_id_val_show, sensor_id_val_store); - - - - - - -/* touch panel probe */ -static int tpd_probe(struct platform_device *pdev) { - int touch_type = 1; // 0:R-touch, 1: Cap-touch - int i=0; - TPD_DMESG("enter %s, %d\n", __FUNCTION__, __LINE__); - /* Select R-Touch */ - // if(g_tpd_drv == NULL||tpd_load_status == 0) -#if 0 - if(g_tpd_drv == NULL) - { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - TPD_DMESG("Generic touch panel driver\n"); - } - - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif - #endif - - if (misc_register(&tpd_misc_device)) - { - printk("mtk_tpd: tpd_misc_device register failed\n"); - } - - if((tpd=(struct tpd_device*)kmalloc(sizeof(struct tpd_device), GFP_KERNEL))==NULL) return -ENOMEM; - memset(tpd, 0, sizeof(struct tpd_device)); - - /* allocate input device */ - if((tpd->dev=input_allocate_device())==NULL) { kfree(tpd); return -ENOMEM; } - - //TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); - //TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); - TPD_RES_X = DISP_GetScreenWidth(); - TPD_RES_Y = DISP_GetScreenHeight(); - - - printk("mtk_tpd: TPD_RES_X = %d, TPD_RES_Y = %d\n", TPD_RES_X, TPD_RES_Y); - - tpd_mode = TPD_MODE_NORMAL; - tpd_mode_axis = 0; - tpd_mode_min = TPD_RES_Y/2; - tpd_mode_max = TPD_RES_Y; - tpd_mode_keypad_tolerance = TPD_RES_X*TPD_RES_X/1600; - /* struct input_dev dev initialization and registration */ - tpd->dev->name = TPD_DEVICE; - set_bit(EV_ABS, tpd->dev->evbit); - set_bit(EV_KEY, tpd->dev->evbit); - set_bit(ABS_X, tpd->dev->absbit); - set_bit(ABS_Y, tpd->dev->absbit); - set_bit(ABS_PRESSURE, tpd->dev->absbit); - set_bit(BTN_TOUCH, tpd->dev->keybit); - set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit); -#if 1 - for(i = 1; i < TP_DRV_MAX_COUNT; i++) - { - /* add tpd driver into list */ - if(tpd_driver_list[i].tpd_device_name != NULL) - { - tpd_driver_list[i].tpd_local_init(); - //msleep(1); - if(tpd_load_status ==1) { - TPD_DMESG("[mtk-tpd]tpd_probe, tpd_driver_name=%s\n", tpd_driver_list[i].tpd_device_name); - g_tpd_drv = &tpd_driver_list[i]; - break; - } - } - } - if(g_tpd_drv == NULL) { - if(tpd_driver_list[0].tpd_device_name != NULL) { - g_tpd_drv = &tpd_driver_list[0]; - /* touch_type:0: r-touch, 1: C-touch */ - touch_type = 0; - g_tpd_drv->tpd_local_init(); - TPD_DMESG("[mtk-tpd]Generic touch panel driver\n"); - } else { - TPD_DMESG("[mtk-tpd]cap touch and Generic touch both are not loaded!!\n"); - return 0; - } - } - #ifdef CONFIG_HAS_EARLYSUSPEND - MTK_TS_early_suspend_handler.suspend = g_tpd_drv->suspend; - MTK_TS_early_suspend_handler.resume = g_tpd_drv->resume; - register_early_suspend(&MTK_TS_early_suspend_handler); - #endif -#endif -//#ifdef TPD_TYPE_CAPACITIVE - /* TPD_TYPE_CAPACITIVE handle */ - if(touch_type == 1){ - - set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit); - set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_X, tpd->dev->absbit); - set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit); - #if 0 // linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_MT_POSITION_X] = TPD_RES_X; - tpd->dev->absmin[ABS_MT_POSITION_X] = 0; - tpd->dev->absmax[ABS_MT_POSITION_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_MT_POSITION_Y] = 0; - tpd->dev->absmax[ABS_MT_TOUCH_MAJOR] = 100; - tpd->dev->absmin[ABS_MT_TOUCH_MINOR] = 0; -#else - input_set_abs_params(tpd->dev, ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0); - input_set_abs_params(tpd->dev, ABS_MT_TOUCH_MINOR, 0, 100, 0, 0); -#endif - TPD_DMESG("Cap touch panel driver\n"); - } -//#endif - #if 0 //linux kernel update from 2.6.35 --> 3.0 - tpd->dev->absmax[ABS_X] = TPD_RES_X; - tpd->dev->absmin[ABS_X] = 0; - tpd->dev->absmax[ABS_Y] = TPD_RES_Y; - tpd->dev->absmin[ABS_Y] = 0; - - tpd->dev->absmax[ABS_PRESSURE] = 255; - tpd->dev->absmin[ABS_PRESSURE] = 0; - #else - input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0); - input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0); - input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X); - input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y); - input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0); - - #endif - if(input_register_device(tpd->dev)) - TPD_DMESG("input_register_device failed.(tpd)\n"); - else - tpd_register_flag = 1; - -//add by caoyang - if(device_create_file(&pdev->dev, &dev_attr_gesture_val) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_firmware_version) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_cfg_version) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_tpd_xline) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_tpd_yline) < 0) { - printk(KERN_ALERT"caoyang creat attribute val."); - } - if(device_create_file(&pdev->dev, &dev_attr_sensor_id) < 0) { - printk(KERN_ERR"create sensor_id sys file failed!\n"); - } - - /* init R-Touch */ - #if 0 - if(touch_type == 0) - { - g_tpd_drv->tpd_local_init(); - } - #endif - if(g_tpd_drv->tpd_have_button) - { - tpd_button_init(); - } - - if (g_tpd_drv->attrs.num) - tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs); - - return 0; -} - -static int tpd_remove(struct platform_device *pdev) -{ - input_unregister_device(tpd->dev); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif - return 0; -} - -/* called when loaded into kernel */ -static int __init tpd_device_init(void) { - printk("MediaTek touch panel driver init\n"); - if(platform_driver_register(&tpd_driver)!=0) { - TPD_DMESG("unable to register touch panel driver.\n"); - return -1; - } - return 0; -} - -/* should never be called */ -static void __exit tpd_device_exit(void) { - TPD_DMESG("MediaTek touch panel driver exit\n"); - //input_unregister_device(tpd->dev); - platform_driver_unregister(&tpd_driver); - #ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&MTK_TS_early_suspend_handler); - #endif -} - -module_init(tpd_device_init); -module_exit(tpd_device_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("MediaTek touch panel driver"); -MODULE_AUTHOR("Kirby Wu"); - diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd.h b/arch/arm/mach-mt8127/ttab/touchpanel/tpd.h deleted file mode 100644 index 0c3d5ba9ed2..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd.h +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -//#include "tpd_custom.h" - -/* debug macros */ -////#define TPD_DEBUG -#define TPD_DEBUG_CODE -//#define TPD_DEBUG_TRACK -#define TPD_DMESG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#if defined(TPD_DEBUG) -#undef TPD_DEBUG -#define TPD_DEBUG(a,arg...) printk(TPD_DEVICE ": " a,##arg) -#else -#define TPD_DEBUG(arg...) -#endif - -/* register, address, configurations */ -#define TPD_DEVICE "mtk-tpd" -#define TPD_X 0 -#define TPD_Y 1 -#define TPD_Z1 2 -#define TPD_Z2 3 -#define TP_DELAY (2*HZ/100) -#define TP_DRV_MAX_COUNT (20) -#define TPD_WARP_CNT (4) -#define TPD_VIRTUAL_KEY_MAX (10) - -/* various mode */ -#define TPD_MODE_NORMAL 0 -#define TPD_MODE_KEYPAD 1 -#define TPD_MODE_SW 2 -#define TPD_MODE_FAV_SW 3 -#define TPD_MODE_FAV_HW 4 -#define TPD_MODE_RAW_DATA 5 -#undef TPD_RES_X -#undef TPD_RES_Y -extern int TPD_RES_X; -extern int TPD_RES_Y; -extern int tpd_load_status ; //0: failed, 1: sucess -extern int tpd_mode; -extern int tpd_mode_axis; -extern int tpd_mode_min; -extern int tpd_mode_max; -extern int tpd_mode_keypad_tolerance; -extern int tpd_em_debounce_time; -extern int tpd_em_debounce_time0; -extern int tpd_em_debounce_time1; -extern int tpd_em_asamp; -extern int tpd_em_auto_time_interval; -extern int tpd_em_sample_cnt; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int tpd_calmat[]; -extern int tpd_def_calmat[]; -extern int TPD_DO_WARP; -extern int tpd_wb_start[]; -extern int tpd_wb_end[]; - -struct tpd_device -{ - struct input_dev *dev; - struct input_dev *kpd; - struct timer_list timer; - struct tasklet_struct tasklet; - int btn_state; -}; - -struct tpd_attrs -{ - struct device_attribute **attr; - int num; -}; -struct tpd_driver_t -{ - char *tpd_device_name; - int (*tpd_local_init)(void); - void (*suspend)(struct early_suspend *h); - void (*resume)(struct early_suspend *h); - int tpd_have_button; - struct tpd_attrs attrs; -}; - -#if 1 //#ifdef TPD_HAVE_BUTTON -void tpd_button(unsigned int x, unsigned int y, unsigned int down); -void tpd_button_init(void); -ssize_t tpd_virtual_key(char *buf); -//#ifndef TPD_BUTTON_HEIGHT -//#define TPD_BUTTON_HEIGHT TPD_RES_Y -//#endif -#endif - -#if 0 -void tpd_adc_init(void); -void tpd_set_debounce_time(int debounce_time); -void tpd_set_spl_number(int spl_num); -u16 tpd_read(int position); -u16 tpd_read_adc(u16 pos); -u16 tpd_read_status(void); -#endif - -extern int tpd_driver_add(struct tpd_driver_t *tpd_drv); -extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv); -void tpd_button_setting(int keycnt, void *keys, void *keys_dim); -extern int tpd_em_spl_num; -extern int tpd_em_pressure_threshold; - -#ifdef TPD_DEBUG_CODE -#include "tpd_debug.h" -#endif - -#ifdef TPD_HAVE_CALIBRATION -#include "tpd_calibrate.h" -#endif - -#include "tpd_default.h" - -/* switch touch panel into different mode */ -void _tpd_switch_single_mode(void); -void _tpd_switch_multiple_mode(void); -void _tpd_switch_sleep_mode(void); -void _tpd_switch_normal_mode(void); diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_button.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_button.c deleted file mode 100644 index cc8ad4c73aa..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_button.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "tpd.h" - -extern struct tpd_device *tpd; - -//#ifdef TPD_HAVE_BUTTON -//static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; -//static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; -static unsigned int tpd_keycnt = 0; -static int tpd_keys[TPD_VIRTUAL_KEY_MAX]={0}; -static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4];// = {0}; -static ssize_t mtk_virtual_keys_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) { - int i, j; - for(i=0, j=0;ikpd=input_allocate_device())==NULL) return -ENOMEM; - tpd->kpd=input_allocate_device(); - /* struct input_dev kpd initialization and registration */ - tpd->kpd->name = TPD_DEVICE "-kpd"; - set_bit(EV_KEY, tpd->kpd->evbit); - //set_bit(EV_REL, tpd->kpd->evbit); - //set_bit(EV_ABS, tpd->kpd->evbit); - for(i=0;ikpd->keybit); - tpd->kpd->id.bustype = BUS_HOST; - tpd->kpd->id.vendor = 0x0001; - tpd->kpd->id.product = 0x0001; - tpd->kpd->id.version = 0x0100; - if(input_register_device(tpd->kpd)) - TPD_DMESG("input_register_device failed.(kpd)\n"); - set_bit(EV_KEY, tpd->dev->evbit); - for(i=0;idev->keybit); - properties_kobj = kobject_create_and_add("board_properties", NULL); - if(properties_kobj) - ret = sysfs_create_group(properties_kobj,&mtk_properties_attr_group); - if(!properties_kobj || ret) - printk("failed to create board_properties\n"); -} - -void tpd_button(unsigned int x, unsigned int y, unsigned int down) { - int i; - if(down) { - for(i=0;i=tpd_keys_dim[i][0]-(tpd_keys_dim[i][2]/2) && - x<=tpd_keys_dim[i][0]+(tpd_keys_dim[i][2]/2) && - y>=tpd_keys_dim[i][1]-(tpd_keys_dim[i][3]/2) && - y<=tpd_keys_dim[i][1]+(tpd_keys_dim[i][3]/2) && - !(tpd->btn_state&(1<kpd, tpd_keys[i], 1); - input_sync(tpd->kpd); - tpd->btn_state|=(1<btn_state&(1<kpd, tpd_keys[i], 0); - input_sync(tpd->kpd); - TPD_DEBUG("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - printk("[mtk-tpd] release key %d (%d)\n",i, tpd_keys[i]); - } - } - tpd->btn_state=0; - } -} -void tpd_button_setting(int keycnt, void *keys, void *keys_dim) -{ - tpd_keycnt = keycnt; - memcpy(tpd_keys, keys, keycnt*4); - memcpy(tpd_keys_dim, keys_dim, keycnt*4*4); -} -//#endif diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.c deleted file mode 100644 index d537c00b895..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "tpd.h" -//#ifdef TPD_HAVE_CALIBRATION - -//#ifndef TPD_CUSTOM_CALIBRATION - -//#if (defined(TPD_WARP_START) && defined(TPD_WARP_END)) -//#define TPD_DO_WARP -int TPD_DO_WARP = 0; -int tpd_wb_start[TPD_WARP_CNT] = {0}; -int tpd_wb_end[TPD_WARP_CNT] = {0}; - -void tpd_warp_calibrate(int *x, int *y) { - int wx = *x, wy = *y; - if(wx0) { - wx = tpd_wb_start[0]-((tpd_wb_start[0]-wx)*(tpd_wb_start[0]-tpd_wb_end[0])/(tpd_wb_start[0])); - //wx = wx*(tpd_wb_start[0]-tpd_wb_end[0])/tpd_wb_start[0]+tpd_wb_end[0]; - } - else if(wx>tpd_wb_start[2]) - wx = (wx-tpd_wb_start[2])*(tpd_wb_end[2]-tpd_wb_start[2])/(TPD_RES_X-tpd_wb_start[2])+tpd_wb_start[2]; - - if(wy0) - wy = tpd_wb_start[1]-((tpd_wb_start[1]-wy)*(tpd_wb_start[1]-tpd_wb_end[1])/(tpd_wb_start[1])); - //wy = wy*(tpd_wb_start[1]-tpd_wb_end[1])/tpd_wb_start[1]+tpd_wb_end[1]; - else if(wy>tpd_wb_start[3] && wy<=TPD_RES_Y) - wy = (wy-tpd_wb_start[3])*(tpd_wb_end[3]-tpd_wb_start[3])/(TPD_RES_Y-tpd_wb_start[3])+tpd_wb_start[3]; - if(wy<0) wy=0; - if(wx<0) wx=0; - *x = wx, *y = wy; -} -//#else -//#define tpd_warp_calibrate(x,y) -//#endif - -void tpd_calibrate(int *x, int *y) { - int tx, i; - if(tpd_calmat[0]==0) for(i=0;i<6;i++) tpd_calmat[i]=tpd_def_calmat[i]; - /* ================ calibrating ================*/ - tx = ((tpd_calmat[0]*(*x))+(tpd_calmat[1]*(*y))+(tpd_calmat[2]))>>12; - *y = ((tpd_calmat[3]*(*x))+(tpd_calmat[4]*(*y))+(tpd_calmat[5]))>>12; - *x = tx; - - if(TPD_DO_WARP == 1) tpd_warp_calibrate(x, y); - *x = (*x) + ((*y)*(*x)*tpd_calmat[6]/TPD_RES_X)/TPD_RES_Y; - *y = (*y) + ((*y)*(*x)*tpd_calmat[7]/TPD_RES_X)/TPD_RES_Y; -} - -//#endif - -//#endif - diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.h b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.h deleted file mode 100644 index 913dfa46f9e..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_calibrate.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef TPD_CALIBRATE_H -#define TPD_CALIBRATE_H -#ifdef TPD_HAVE_CALIBRATION - -#ifndef TPD_CUSTOM_CALIBRATION - -extern int tpd_calmat[8]; -extern int tpd_def_calmat[8]; - -#endif - -void tpd_calibrate(int *x, int *y); -#else - -#define tpd_calibrate(x,y) - -#endif - -#endif diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_custom_gt9xx.h b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_custom_gt9xx.h deleted file mode 100644 index d9e63364046..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_custom_gt9xx.h +++ /dev/null @@ -1,416 +0,0 @@ -/* Copyright Statement: - * - * This software/firmware and related documentation ("MediaTek Software") are - * protected under relevant copyright laws. The information contained herein - * is confidential and proprietary to MediaTek Inc. and/or its licensors. - * Without the prior written permission of MediaTek inc. and/or its licensors, - * any reproduction, modification, use or disclosure of MediaTek Software, - * and information contained herein, in whole or in part, shall be strictly prohibited. - */ -/* MediaTek Inc. (C) 2010. All rights reserved. - * - * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES - * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") - * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON - * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE - * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR - * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH - * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES - * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES - * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK - * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR - * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND - * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, - * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, - * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO - * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. - * - * The following software/firmware and/or related documentation ("MediaTek Software") - * have been modified by MediaTek Inc. All revisions are subject to any receiver's - * applicable license agreements with MediaTek Inc. - */ - -#ifndef TPD_CUSTOM_GT9XX_H__ -#define TPD_CUSTOM_GT9XX_H__ - -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif -#include -#include -#include - -#include -#include -#ifdef MT6575 -#include -#include -#include -#endif -#ifdef MT6577 -#include -#include -#include -#endif -#include -#include -#include - -#include -#include - -/* Pre-defined definition */ - -#define TPD_KEY_COUNT 4 -#define key_1 60,850 //auto define -#define key_2 180,850 -#define key_3 300,850 -#define key_4 420,850 - -#define TPD_KEYS {KEY_BACK, KEY_HOME, KEY_MENU, KEY_SEARCH} -#define TPD_KEYS_DIM {{key_1,50,30},{key_2,50,30},{key_3,50,30},{key_4,50,30}} - -extern u16 show_len; -extern u16 total_len; -extern u8 gtp_rawdiff_mode; - -extern int tpd_halt; -extern s32 gtp_send_cfg(struct i2c_client *client); -extern void gtp_reset_guitar(struct i2c_client *client, s32 ms); -extern void gtp_int_sync(s32 ms); -extern u8 gup_init_update_proc(struct i2c_client *client); -extern u8 gup_init_fw_proc(struct i2c_client *client); -extern void mt_eint_unmask(unsigned int line); -extern void mt_eint_mask(unsigned int line); -extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len); -extern s32 gtp_i2c_write(struct i2c_client *client,u8 *buf,s32 len); -extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf, int len); -extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); -extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr, u8 *rxbuf, int len); - -//***************************PART1:ON/OFF define******************************* -#define GTP_CUSTOM_CFG 0 -#define GTP_DRIVER_SEND_CFG 1 // driver send config to TP in intilization -#define GTP_HAVE_TOUCH_KEY 0 -#define GTP_POWER_CTRL_SLEEP 0 // turn off/on power on suspend/resume - -#define GTP_AUTO_UPDATE 0 // auto updated fw by .bin file -#define GTP_HEADER_FW_UPDATE 0 // auto updated fw by gtp_default_FW in gt9xx_firmware.h, function together with GTP_AUTO_UDPATE -#define GTP_AUTO_UPDATE_CFG 0 // auto update config by .cfg file, function together with GTP_AUTO_UPDATE - -#define GTP_SUPPORT_I2C_DMA 0 // if gt9xxf, better enable it if hardware platform supported -#define GTP_COMPATIBLE_MODE 1 // compatible with GT9XXF -#define GTP_FL_LITTLE_SYSTEM 0 // power off/on on suspend/resume, gt9xxf with an interim firwmare for it, - // function together with GTP_COMATIBLE_MODE & GTP_POWER_CTRL_SLEEP -#define GTP_CREATE_WR_NODE 1 -#define GTP_ESD_PROTECT 1 // esd protection with a cycle of 2 seconds -#define GTP_CHARGER_SWITCH 0 // charger plugin & plugout detect - -#define GTP_WITH_PEN 0 -#define GTP_PEN_HAVE_BUTTON 0 // active pen has buttons, functions together with GTP_WITH_PEN - -#define GTP_GESTURE_WAKEUP 1 - -//#define TPD_PROXIMITY -//#define TPD_HAVE_BUTTON // report key as coordinate,Vibration feedback -//#define TPD_WARP_X // mirrored x coordinate -//#define TPD_WARP_Y // mirrored y coordinate -#define GTP_DEBUG_ON 1 -#define GTP_DEBUG_ARRAY_ON 0 -#define GTP_DEBUG_FUNC_ON 0 - -//***************************PART2:TODO define********************************** -//STEP_1(REQUIRED):Change config table. -// Sensor_ID Map: -/* sensor_opt1 sensor_opt2 Sensor_ID - GND GND 0 - VDDIO GND 1 - NC GND 2 - GND NC/300K 3 - VDDIO NC/300K 4 - NC NC/300K 5 -*/ -// TODO: define your own default or for Sensor_ID == 0 config here. -// The predefined one is just a sample config, which is not suitable for your tp in most cases. -#define CTP_CFG_GROUP1 {\ -} -// TODO: define your config for Sensor_ID == 1 here, if needed -#define CTP_CFG_GROUP2 {\ -} -// TODO: define your config for Sensor_ID == 2 here, if needed -#define CTP_CFG_GROUP3 {\ -} - -// TODO: define your config for Sensor_ID == 3 here, if needed -#define CTP_CFG_GROUP4 {\ -0x45,0x20,0x03,0x00,0x05,0x0A,0x34,0x02,0x01,0x08,0x19,0x0A,0x50,0x41,0x03,0x05,\ -0x00,0x00,0x00,0x00,0x33,0x12,0x04,0x14,0x16,0x1A,0x14,0x8C,0x2E,0x0E,0x3F,0x41,\ -0xD3,0x07,0x00,0x00,0x00,0xBA,0x02,0x11,0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1C,0x6C,0x94,0xC5,0x02,0x00,0x00,0x00,0x04,0xE3,0x20,0x00,0xB2,\ -0x2A,0x00,0x8E,0x37,0x00,0x73,0x48,0x00,0x60,0x5F,0x00,0x5F,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x40,0x33,0x11,0x03,0x08,0x08,0x0F,0x1F,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x0F,0x0A,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x13,\ -0x12,0x10,0x0F,0x0C,0x0A,0x08,0x06,0x04,0x02,0x00,0x16,0x18,0x1C,0x1D,0x1E,0x1F,\ -0x20,0x21,0x22,0x24,0x26,0x28,0x29,0x2A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x0F,0x01\ -} - -// TODO: define your config for Sensor_ID == 4 here, if needed -#define CTP_CFG_GROUP5 {\ -} - -// TODO: define your config for Sensor_ID == 5 here, if needed -#define CTP_CFG_GROUP6 {\ -0x49,0x20,0x03,0x00,0x05,0x0A,0x34,0x02,0x01,0x09,0x19,0x0C,0x64,0x3C,0x03,0x05,\ -0x00,0x00,0x00,0x00,0x33,0x12,0x04,0x14,0x16,0x1A,0x14,0x8C,0x2E,0x0E,0x2F,0x31,\ -0xD3,0x07,0x00,0x00,0x01,0xBA,0x02,0x11,0x00,0x09,0x00,0x1F,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x1C,0x4B,0x94,0xD5,0x03,0x06,0x00,0x00,0x04,0xE7,0x1F,0x00,0xC7,\ -0x25,0x00,0xA6,0x2E,0x00,0x8E,0x38,0x00,0x76,0x44,0x00,0x76,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x40,0x33,0x11,0x03,0x08,0x08,0x0F,0x1F,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x0F,0x0A,0x00,0x00,0x00,0x00,\ -0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x1C,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x13,\ -0x12,0x10,0x0F,0x0C,0x0A,0x08,0x06,0x04,0x02,0x00,0x16,0x18,0x1C,0x1D,0x1E,0x1F,\ -0x20,0x21,0x22,0x24,0x26,0x28,0x29,0x2A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ -0x00,0x00,0xD4,0x01\ -} - -// STEP_2(REQUIRED): Customize your I/O ports & I/O operations here -#define TPD_POWER_SOURCE_CUSTOM MT6323_POWER_LDO_VGP2// define your power source for tp if needed -#define GTP_RST_PORT GPIO_CTP_RST_PIN -#define GTP_INT_PORT GPIO_CTP_EINT_PIN - -#define GTP_GPIO_AS_INPUT(pin) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_AS_INT(pin) do{\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_EINT);\ - mt_set_gpio_dir(pin, GPIO_DIR_IN);\ - mt_set_gpio_pull_enable(pin, GPIO_PULL_DISABLE);\ - }while(0) -#define GTP_GPIO_GET_VALUE(pin) mt_get_gpio_in(pin) -#define GTP_GPIO_OUTPUT(pin,level) do{\ - if(pin == GPIO_CTP_EINT_PIN)\ - mt_set_gpio_mode(pin, GPIO_CTP_EINT_PIN_M_GPIO);\ - else\ - mt_set_gpio_mode(pin, GPIO_CTP_RST_PIN_M_GPIO);\ - mt_set_gpio_dir(pin, GPIO_DIR_OUT);\ - mt_set_gpio_out(pin, level);\ - }while(0) -#define GTP_GPIO_REQUEST(pin, label) gpio_request(pin, label) -#define GTP_GPIO_FREE(pin) gpio_free(pin) -#define GTP_IRQ_TAB {IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH} - -// STEP_3(optional):Custom set some config by themself,if need. -#if GTP_CUSTOM_CFG - #define GTP_MAX_HEIGHT 800 - #define GTP_MAX_WIDTH 480 - #define GTP_INT_TRIGGER 0 //0:Rising 1:Falling -#else - #define GTP_MAX_HEIGHT 1280 - #define GTP_MAX_WIDTH 800 - #define GTP_INT_TRIGGER 1 -#endif -#define GTP_MAX_TOUCH 5 -#define VELOCITY_CUSTOM -#define TPD_VELOCITY_CUSTOM_X 15 -#define TPD_VELOCITY_CUSTOM_Y 15 - -//STEP_4(optional):If this project have touch key,Set touch key config. -#if GTP_HAVE_TOUCH_KEY - #define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEND} -#endif - -//***************************PART3:OTHER define********************************* -#define GTP_DRIVER_VERSION "V2.2.7<2014/12/26>" -#define GTP_I2C_NAME "Goodix-TS" -#define GT91XX_CONFIG_PROC_FILE "gt9xx_config" -#define GTP_POLL_TIME 10 -#define GTP_ADDR_LENGTH 2 -#define GTP_CONFIG_MIN_LENGTH 186 -#define GTP_CONFIG_MAX_LENGTH 240 -#define FAIL 0 -#define SUCCESS 1 -#define SWITCH_OFF 0 -#define SWITCH_ON 1 - -#define CFG_GROUP_LEN(p_cfg_grp) (sizeof(p_cfg_grp) / sizeof(p_cfg_grp[0])) - -//******************** For GT9XXF Start **********************// -#if GTP_COMPATIBLE_MODE -typedef enum -{ - CHIP_TYPE_GT9 = 0, - CHIP_TYPE_GT9F = 1, -} CHIP_TYPE_T; -#endif - -// buffer -#define GTP_REG_BUFFER 0xB026 - -#define GTP_REG_SS51_SEG_B 0xC000 -#define GTP_REG_CHECKINFO 0xBF00 - -// State1 -#define GTP_REG_STATE1 0xBF08 -#define BUFFER_FULL 0x01 -#define CHECK_COMPLETE 0x02 -#define CHECK_ERROR 0x03 -#define WAIT_CHECK 0x04 // others: invalid - -// State2 -#define GTP_REG_STATE2 0xBF07 -#define IS_A_SEG 0x01 -#define IS_B_SEG_FIRST 0x02 -#define IS_B_SEG_OTHER 0x03 -#define IS_B_SEG_LAST 0x04 // others: invalid - -#define GTP_REG_MATRIX_DRVNUM 0x8069 -#define GTP_REG_MATRIX_SENNUM 0x806A -#define GTP_REG_RQST 0x8043 -#define GTP_REG_BAK_REF 0x99D0 -#define GTP_REG_MAIN_CLK 0x8020 -#define GTP_REG_CHIP_TYPE 0x8000 -#define GTP_REG_HAVE_KEY 0x804E - -#define GTP_FL_FW_BURN 0x00 -#define GTP_FL_ESD_RECOVERY 0x01 -#define GTP_FL_READ_REPAIR 0x02 -#define GTP_FL_PWR_RESUME_BURN 0x03 - -#define GTP_BAK_REF_SEND 0 -#define GTP_BAK_REF_STORE 1 -#define GTP_HOPPING_SEND 0 -#define GTP_HOPPING_STORE 1 -#define CFG_LOC_DRVA_NUM 29 -#define CFG_LOC_DRVB_NUM 30 -#define CFG_LOC_SENS_NUM 31 - -#define GTP_CHK_FW_MAX 1000 -#define GTP_CHK_FS_MNT_MAX 300 -#define GTP_BAK_REF_PATH "/cache/gtp_ref.bin" -#define GTP_MAIN_CLK_PATH "/cache/gtp_clk.bin" -#define GTP_RQST_CONFIG 0x01 -#define GTP_RQST_BAK_REF 0x02 -#define GTP_RQST_RESET 0x03 -#define GTP_RQST_MAIN_CLOCK 0x04 -#define GTP_RQST_STORE_HOPPING 0x05 -#define GTP_RQST_STORE_BAK_REF 0x06 -#define GTP_RQST_RESPONDED 0x00 -#define GTP_RQST_IDLE 0xFF - -//******************** For GT9XXF End **********************// - -//Register define -#define GTP_READ_COOR_ADDR 0x814E -#define GTP_REG_SLEEP 0x8040 -#define GTP_REG_SENSOR_ID 0x814A -#define GTP_REG_CONFIG_DATA 0x8047 -#define GTP_REG_VERSION 0x8140 -#define GTP_REG_HW_INFO 0x4220 - -#define RESOLUTION_LOC 3 -#define TRIGGER_LOC 8 - -#define I2C_MASTER_CLOCK 300 -#define I2C_BUS_NUMBER 0 // I2C Bus for TP, mt6572 -#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode -#define GTP_DMA_MAX_I2C_TRANSFER_SIZE (GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define MAX_TRANSACTION_LENGTH 8 -#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH) -#define TPD_MAX_RESET_COUNT 3 -#define TPD_CALIBRATION_MATRIX {962,0,0,0,1600,0,0,0}; - - -#define TPD_RESET_ISSUE_WORKAROUND -#define TPD_HAVE_CALIBRATION -#define TPD_NO_GPIO -#define TPD_RESET_ISSUE_WORKAROUND - -#ifdef TPD_WARP_X -#undef TPD_WARP_X -#define TPD_WARP_X(x_max, x) ( x_max - 1 - x ) -#else -#define TPD_WARP_X(x_max, x) x -#endif - -#ifdef TPD_WARP_Y -#undef TPD_WARP_Y -#define TPD_WARP_Y(y_max, y) ( y_max - 1 - y ) -#else -#define TPD_WARP_Y(y_max, y) y -#endif - -//Log define -#define GTP_INFO(fmt,arg...) printk("<<-GTP-INFO->> "fmt"\n",##arg) -#define GTP_ERROR(fmt,arg...) printk("<<-GTP-ERROR->> "fmt"\n",##arg) -#define GTP_DEBUG(fmt,arg...) do{\ - if(GTP_DEBUG_ON)\ - printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\ - }while(0) -#define GTP_DEBUG_ARRAY(array, num) do{\ - s32 i;\ - u8* a = array;\ - if(GTP_DEBUG_ARRAY_ON)\ - {\ - printk("<<-GTP-DEBUG-ARRAY->>\n");\ - for (i = 0; i < (num); i++)\ - {\ - printk("%02x ", (a)[i]);\ - if ((i + 1 ) %10 == 0)\ - {\ - printk("\n");\ - }\ - }\ - printk("\n");\ - }\ - }while(0) -#define GTP_DEBUG_FUNC() do{\ - if(GTP_DEBUG_FUNC_ON)\ - printk("<<-GTP-FUNC->> Func:%s@Line:%d\n",__func__,__LINE__);\ - }while(0) -#define GTP_SWAP(x, y) do{\ - typeof(x) z = x;\ - x = y;\ - y = z;\ - }while (0) - - -//*****************************End of Part III******************************** - -#endif /* TPD_CUSTOM_GT9XX_H__ */ diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.c deleted file mode 100644 index 3df17b83f91..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.c +++ /dev/null @@ -1,453 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "tpd.h" - -#ifdef TPD_DEBUG_CODE -int tpd_fail_count = 0; -int tpd_trial_count = 0; - -void tpd_debug_no_response(struct i2c_client *i2c_client) { - char sleep[2] = {0x07,0x01}; - char wakeup[2] = {0x07,0x02}; - char threshold[2] = {0x09, 0x04}; - char gesture[2] = {0x08, 0x11}; - char sleeptime[2] = {0x0d, 0x01}; - char idletime[2] = {0x0c, 0xff}; - static int trial_index = 0; - static int delay_index = 0; - int trial[] = {1,9,2,8,3,7,4,6,5}; - int delay[] = {1,100,2,50,3,25,4,12,5,6,6,1,1,500,500}; - int trial_max = 9; - int delay_max = 15; - int i,j; - - int wakeup_count = 200; - - for(i=0;i=31?0:1); - *buf = (0xffe0+tpd_debug_track_color); -} - -void tpd_down_debug_track(int x, int y) { - if(tpd_debug_touch_up == 1) { - DAL_Clean(); - tpd_debug_touch_up = 0; - } - LCD_LayerEnable(5, TRUE); - tpd_draw(x-1, y-1); tpd_draw(x, y-1); tpd_draw(x+1, y-1); - tpd_draw(x-1, y ); tpd_draw(x+1, y ); - tpd_draw(x-1, y+1); tpd_draw(x, y+1); tpd_draw(x+1, y+1); -} - -void tpd_up_debug_track(int x, int y) { - if(x==0 && y==0) { tpd_debug_track_color = 0; DAL_Clean(); } - tpd_debug_touch_up = 1; - -} -#endif // TPD_DEBUG_TRACK - - -#define BUFFER_SIZE 128 - -int tpd_em_log = 0; -module_param(tpd_em_log, int, 00664); - -void tpd_enable_em_log(int enable) -{ - if(enable) { - tpd_em_log=1; - } else { - tpd_em_log=0; - } -} -EXPORT_SYMBOL(tpd_enable_em_log); - - -int tpd_em_log_to_fs = 0; -module_param(tpd_em_log_to_fs, int, 00664); - -int tpd_em_log_first = 1; - -struct tpd_em_log_struct -{ - struct list_head list; - char data[BUFFER_SIZE]; -}; -static LIST_HEAD(tpd_em_log_list); -#if 0 - -static void *tpd_em_log_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct tpd_em_log_struct *p; - loff_t off = 0; - - list_for_each_entry(p, &tpd_em_log_list, list) { - if (*pos == off++) return p; - } - return NULL; -} - -static void *tpd_em_log_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct list_head *n = ((struct tpd_em_log_struct *) v)->list.next; - - ++*pos; - - return (n != &tpd_em_log_list) ? list_entry(n, struct tpd_em_log_struct, list) : NULL; -} - -static void tpd_em_log_seq_stop(struct seq_file *s, void *v) -{ - struct tpd_em_log_struct *p, *p_tmp; - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } -} - -static int tpd_em_log_seq_show(struct seq_file *seq, void *v) -{ - const struct tpd_em_log_struct *p = v; - seq_printf(seq, p->data); - return 0; -} - - - -static struct seq_operations tpd_em_log_seq_ops = { - .start = tpd_em_log_seq_start, - .next = tpd_em_log_seq_next, - .stop = tpd_em_log_seq_stop, - .show = tpd_em_log_seq_show -}; - - -static int tpd_em_log_open(struct inode *inode, struct file *file) { - return seq_open(file, &tpd_em_log_seq_ops); -}; - -static struct file_operations tpd_em_log_file_ops = { - .owner = THIS_MODULE, - .open = tpd_em_log_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release -}; -#endif -int tpd_log_line_buffer = 128; // per line 128 bytes -int tpd_log_line_cnt = 1024*10; -module_param(tpd_log_line_buffer, int, 00664); -module_param(tpd_log_line_cnt, int, 00664); - - -struct tpd_debug_log_buf -{ - unsigned int head; - unsigned int tail; - spinlock_t buffer_lock; - unsigned int cnt; - unsigned char *buffer; - -}; -struct tpd_debug_log_buf tpd_buf; - -static int tpd_debug_log_open(struct inode *inode, struct file *file) -{ - memset(&tpd_buf, 0, sizeof(struct tpd_debug_log_buf)); - tpd_buf.buffer= vmalloc(tpd_log_line_cnt*tpd_log_line_buffer); - if(tpd_buf.buffer == NULL) - { - printk("tpd_log: nomem for tpd_buf->buffer\n"); - return -ENOMEM; - } - tpd_buf.head = tpd_buf.tail = 0; - spin_lock_init(&tpd_buf.buffer_lock); - - file->private_data = &tpd_buf; - printk("[tpd_em_log]: open log file\n"); - return 0; -} - -static int tpd_debug_log_release(struct inode *inode, struct file *file) -{ - //struct tpd_debug_log_buf *tpd_buf = (tpd_debug_log_buf *)file->private_data; - printk("[tpd_em_log]: close log file\n"); - vfree(tpd_buf.buffer); - //free(tpd_buf); - return 0; -} - -static ssize_t tpd_debug_log_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) -{ - return 0; -} - -static ssize_t tpd_debug_log_read(struct file *file, char __user *buffer, - size_t count, loff_t *ppos) -{ - struct tpd_debug_log_buf *tpd_buf = (struct tpd_debug_log_buf *)file->private_data; - unsigned int retval = 0, unit = tpd_log_line_buffer; - unsigned char *tmp_buf = NULL; - - - if (tpd_buf->head == tpd_buf->tail && - (file->f_flags & O_NONBLOCK)) - return -EAGAIN; - - - while ((count - retval) >= unit) { - spin_lock_irq(&tpd_buf->buffer_lock); - if(tpd_buf->head != tpd_buf->tail) - { - tmp_buf = &tpd_buf->buffer[tpd_buf->tail++*unit]; - tpd_buf->tail &= tpd_log_line_cnt - 1; - } - else - { - //printk("*******************tpd_debug_log is empty **************************************\n"); - spin_unlock_irq(&tpd_buf->buffer_lock); - break; - } - spin_unlock_irq(&tpd_buf->buffer_lock); - //printk("%s, tmp_buf:0x%x\n", tmp_buf, tmp_buf); - if (copy_to_user(buffer+retval, tmp_buf, unit)) - return -EFAULT; - - retval += unit; - - } - - return retval; - - -} - -static unsigned char* tpd_log_find_buffer(void) -{ - unsigned char *buffer = NULL; - unsigned unit = tpd_log_line_buffer; - if(tpd_buf.buffer == NULL) - { - printk( "[tpd_em_log] :tpd_buf.buffer is NULL \n"); - return NULL; - } - spin_lock(&tpd_buf.buffer_lock); - buffer = &tpd_buf.buffer[tpd_buf.head++*unit]; - tpd_buf.head &= tpd_log_line_cnt - 1; - spin_unlock(&tpd_buf.buffer_lock); - if(tpd_buf.head == tpd_buf.tail) - { - snprintf(buffer, unit, "[tpd_em_log] overlay !!!!!\n"); - return NULL; - } - memset(buffer, 0, unit); - return buffer; -} - -static struct file_operations tpd_debug_log_fops = { - .owner = THIS_MODULE, - .read = tpd_debug_log_read, - .write = tpd_debug_log_write, - .open = tpd_debug_log_open, - .release = tpd_debug_log_release, -}; - -static struct miscdevice tpd_debug_log_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "tpd_em_log", - .fops = &tpd_debug_log_fops, -}; -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - if (down == TPD_TYPE_INT_DOWN) { - printk("[tpd_em_log] int trigger down\n"); - } else if (down == TPD_TYPE_INT_UP) { - printk("[tpd_em_log] int trigger up\n"); - } else if (down == TPD_TYPE_TIMER) { - printk("[tpd_em_log] timer trigger\n"); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - printk("[tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - printk("[tpd_em_log] the first or last point is rejected\n"); - }else if(down == TPD_TYPE_REJECT2){ - printk("[tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d ms, debt1:%d ms, spl_num:%d\n", raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - printk("[tpd_em_log] The first touch latency is %d ms\n", raw_x/1000); - } else if (down && tpd_down_status == 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,m(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - printk("[tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } -} - -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down) { - //static struct proc_dir_entry *entry = NULL; - //struct tpd_em_log_struct *tpd_em_log_struct_new; - struct timeval t; - -#if 0 - if (tpd_em_log_first) { - entry = create_proc_entry("tpd_em_log", 0, NULL); - if (entry) { - entry->proc_fops = &tpd_em_log_file_ops; - } - tpd_em_log_first = 0; - return; - } - tpd_em_log_struct_new = kmalloc(sizeof(struct tpd_em_log_struct), GFP_ATOMIC); - - memset(tpd_em_log_struct_new, 0, sizeof(struct tpd_em_log_struct)); -#else - unsigned char *buffer = NULL; - //unsigned int unit = tpd_log_line_buffer; - - //printk("[tpd_em_log]: start register log file"); - -#endif - buffer = tpd_log_find_buffer(); - if(buffer == NULL) - { - printk("not buffer \n"); - return; - } - do_gettimeofday(&t); - - if (down == TPD_TYPE_INT_DOWN) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger down\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_INT_UP) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] int trigger up\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_TIMER) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] timer trigger\n", (t.tv_sec & 0xFFF), t.tv_usec); - } else if (down == TPD_TYPE_RAW_DATA) { - if (tpd_em_log == TPD_TYPE_RAW_DATA) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,rz1=%d,rz2=%d,p=%d,r\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } - } else if(down == TPD_TYPE_REJECT1){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] the first or last point is rejected\n", (t.tv_sec & 0xFFF), t.tv_usec); - }else if(down == TPD_TYPE_REJECT2){ - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] pressure(%d) > NICE_PRESSURE(%d), debounce debt0:%d, debt1:%d, spl_num:%d\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p); - } else if(down == TPD_TYPE_FIST_LATENCY) { - snprintf(buffer, tpd_log_line_buffer,"[%5lu.%06lu][tpd_em_log] The first touch latency is %d ms\n", (t.tv_sec & 0xFFF), t.tv_usec, raw_x/1000); - } else if (down && tpd_down_status == 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else if (down && tpd_down_status != 0) { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,d(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } else { - snprintf(buffer, tpd_log_line_buffer, "[%5lu.%06lu][tpd_em_log] rx=%d,ry=%d,cx=%d,cy=%d,p=%d,u(+%ld ms)\n", - (t.tv_sec & 0xFFF), t.tv_usec, raw_x, raw_y, cal_x, cal_y, p, (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); - } - - //list_add_tail(&tpd_em_log_struct_new->list, &tpd_em_log_list); -} - -void tpd_em_log_release(void) { - struct tpd_em_log_struct *p, *p_tmp; - if (!tpd_em_log_first) { - remove_proc_entry("tpd_em_log", NULL); - - list_for_each_entry_safe(p, p_tmp, &tpd_em_log_list, list) { - list_del(&p->list); - kfree(p); - } - - tpd_em_log_first = 1; - tpd_em_log_to_fs = 0; - } -} - -static int __init tpd_log_init(void) -{ - if (misc_register(&tpd_debug_log_dev) < 0) - { - printk( "[tpd_em_log] :register device failed \n"); - return -1; - } - printk( "[tpd_em_log] :register device successfully \n"); - return 0; -} - -int tpd_debuglog = 0; -module_param(tpd_debuglog, int, 00664); - -module_init(tpd_log_init); -#endif // TPD_DEBUG_CODE diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.h b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.h deleted file mode 100644 index 6e116d0ccb3..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_debug.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef TPD_DEBUG_H -#define TPD_DEBUG_H -#ifdef TPD_DEBUG_CODE -#include - -void tpd_debug_no_response(struct i2c_client *); -extern int tpd_debug_nr; - -#define TPD_DEBUG_CHECK_NO_RESPONSE \ - if(tpd_debug_nr) { \ - wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \ - if(tpd_flag==0) { \ - tpd_debug_no_response(i2c_client); \ - continue; \ - } \ - } else - - -void tpd_debug_set_time(void); -extern int tpd_debug_time; -extern long tpd_last_2_int_time[2]; -extern long tpd_last_down_time; -extern int tpd_start_profiling; -extern int tpd_down_status; - -#define TPD_DEBUG_PRINT_INT \ - do { \ - if(tpd_debug_time) { \ - printk("tp_int\n"); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_UP \ - do { \ - if(pending==0 && tpd_debug_time) { \ - tpd_down_status=0; \ - printk("up on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - } \ - } while(0) - -#define TPD_DEBUG_PRINT_DOWN \ - do { \ - if(tpd_debug_time) { \ - if(tpd_down_status==0) printk("down on 0 ms\n"); \ - else printk("move on %ld ms (+%ld ms)\n", \ - (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \ - (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \ - tpd_down_status=1; \ - } \ - } while(0) - -#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0); - -extern int tpd_em_log; -extern int tpd_em_log_to_fs; -extern int tpd_type_cap; - -void tpd_em_log_output(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_store(int raw_x, int raw_y, int cal_x, int cal_y, int p, int down); -void tpd_em_log_release(void); - -#define TPD_TYPE_RAW_DATA 2 -#define TPD_TYPE_INT_DOWN 3 -#define TPD_TYPE_INT_UP 4 -#define TPD_TYPE_TIMER 5 -#define TPD_TYPE_REJECT1 6 -#define TPD_TYPE_REJECT2 7 -#define TPD_TYPE_FIST_LATENCY 8 - -#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \ - do { \ - if (tpd_em_log) { \ - if (!tpd_em_log_to_fs) { \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } else { \ - tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \ - tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \ - } \ - if (down == 1) \ - tpd_down_status = 1; \ - else if (down == 0) \ - tpd_down_status = 0; \ - } \ - else { \ - if (tpd_em_log_to_fs) { \ - tpd_em_log_release(); \ - } \ - } \ - } while(0) - -#ifdef TPD_DEBUG_TRACK -extern void *dal_fb_addr; -extern int tpd_debug_track; -void tpd_up_debug_track(int x, int y); -void tpd_down_debug_track(int x, int y); -#define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0) -#define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0) - -#endif // TPD_DEBUG_TRACK -#endif // TPD_DEBUG_CODE - -// Macros that will be embedded in code - -#ifndef TPD_DEBUG_CHECK_NO_RESPONSE -#define TPD_DEBUG_CHECK_NO_RESPONSE -#endif - -#ifndef TPD_DEBUG_SET_TIME -#define TPD_DEBUG_SET_TIME -#endif - -#ifndef TPD_DEBUG_PRINT_UP -#define TPD_DEBUG_PRINT_UP -#endif - -#ifndef TPD_DEBUG_PRINT_DOWN -#define TPD_DEBUG_PRINT_DOWN -#endif - -#ifndef TPD_UP_DEBUG_TRACK -#define TPD_UP_DEBUG_TRACK(x,y) -#endif - -#ifndef TPD_DOWN_DEBUG_TRACK -#define TPD_DOWN_DEBUG_TRACK(x,y) -#endif - - -#endif // TPD_DEBUG_H diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.c deleted file mode 100644 index dae7d60055f..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "tpd.h" - -//#ifndef TPD_CUSTOM_TREMBLE_TOLERANCE -int tpd_trembling_tolerance(int t, int p) { - if(t>5 || p>120) return 200; - if(p>90) return 64; - if(p>80) return 36; - return 26; -} -//#endif diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.h b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.h deleted file mode 100644 index 011c8cbd73b..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_default.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef TPD_FAT_TOUCH -#define TPD_FAT_TOUCH 120 -#endif - -int tpd_trembling_tolerance(int t, int p); diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_init.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_init.c deleted file mode 100644 index cc5b3795e67..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_init.c +++ /dev/null @@ -1 +0,0 @@ -// dummy file, temporarily for remake diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_misc.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_misc.c deleted file mode 100644 index 5e95a26e04d..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_misc.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "tpd.h" - -int tpd_calibrate_en = 0; -module_param(tpd_calibrate_en, int, 00664); - -int tpd_show_version = 0; -module_param(tpd_show_version, int, 00664); - -/* switch touch panel into single scan mode for decreasing interference */ -void tpd_switch_single_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_single_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_single_mode); - -/* switch touch panel into multiple scan mode for better performance */ -void tpd_switch_multiple_mode(void) { - #ifdef HAVE_SINGLE_MULTIPLE_SCAN_MODE - _tpd_switch_multiple_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_multiple_mode); - -/* switch touch panel into deep sleep mode */ -void tpd_switch_sleep_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_sleep_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_sleep_mode); - -/* switch touch panel back to normal mode */ -void tpd_switch_normal_mode(void) { - #ifdef HAVE_SLEEP_NORMAL_MODE - _tpd_switch_normal_mode(); - #endif -} -EXPORT_SYMBOL(tpd_switch_normal_mode); diff --git a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_setting.c b/arch/arm/mach-mt8127/ttab/touchpanel/tpd_setting.c deleted file mode 100644 index 87d514bb39a..00000000000 --- a/arch/arm/mach-mt8127/ttab/touchpanel/tpd_setting.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "tpd.h" - -int TPD_RES_X = 480; -int TPD_RES_Y = 800; - -//#if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) -int tpd_calmat[8] = {0}; -int tpd_def_calmat[8] = {0}; -int tpd_calmat_size = 8; -int tpd_def_calmat_size = 8; -module_param_array(tpd_calmat, int, &tpd_calmat_size, 00664); -module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 00444); -//#endif -//#ifdef TPD_TYPE_CAPACITIVE -int tpd_type_cap = 0; - -int tpd_v_magnify_x = 10; -int tpd_v_magnify_y = 10; -module_param(tpd_v_magnify_x, int, 00664); -module_param(tpd_v_magnify_y, int, 00664); - -module_param(tpd_type_cap, int, 00444); -int tpd_firmware_version[2] = {0,0}; -int tpd_firmware_version_size = 2; -module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 00444); - -int tpd_mode = TPD_MODE_NORMAL; -int tpd_mode_axis = 0; -int tpd_mode_min = 400; //TPD_RES_Y/2; -int tpd_mode_max = 800; //TPD_RES_Y; -int tpd_mode_keypad_tolerance = 480*480/1600; //TPD_RES_X*TPD_RES_X/1600; -module_param(tpd_mode, int, 00664); -module_param(tpd_mode_axis, int, 00664); -module_param(tpd_mode_min, int, 00664); -module_param(tpd_mode_max, int, 00664); -module_param(tpd_mode_keypad_tolerance, int, 00664); - -/* ATTENTION! all the default values should sync with tpd_adc_init()@tpd_adc.c */ -int tpd_em_debounce_time0 = 1; -int tpd_em_debounce_time = 0; -int tpd_em_debounce_time1 = 4; -module_param(tpd_em_debounce_time0, int, 00664); -module_param(tpd_em_debounce_time1, int, 00664); -module_param(tpd_em_debounce_time, int, 00664); - -int tpd_em_spl_num = 1; -module_param(tpd_em_spl_num, int, 00664); - -int tpd_em_pressure_threshold = 0; -module_param(tpd_em_pressure_threshold, int, 00664); - -int tpd_em_auto_time_interval = 10; -module_param(tpd_em_auto_time_interval, int, 00664); - -int tpd_em_sample_cnt = 16; -module_param(tpd_em_sample_cnt, int, 00664); - -int tpd_load_status = 0; -module_param(tpd_load_status, int, 00664); - -int tpd_em_asamp = 1; -module_param(tpd_em_asamp, int, 00664); diff --git a/arch/arm/mach-mt8127/ttab/vibrator/Makefile b/arch/arm/mach-mt8127/ttab/vibrator/Makefile deleted file mode 100755 index 4cad03c06dd..00000000000 --- a/arch/arm/mach-mt8127/ttab/vibrator/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include $(srctree)/drivers/misc/mediatek/Makefile.custom - -obj-y := cust_vibrator.o - diff --git a/arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.c b/arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.c deleted file mode 100644 index 20663f546d9..00000000000 --- a/arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -static struct vibrator_hw cust_vibrator_hw = { - .vib_timer = 25, - #ifdef CUST_VIBR_LIMIT - .vib_limit = 9, - #endif - #ifdef CUST_VIBR_VOL - .vib_vol = 0x5,//2.8V for vibr - #endif -}; - -struct vibrator_hw *get_cust_vibrator_hw(void) -{ - return &cust_vibrator_hw; -} - diff --git a/arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.h b/arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.h deleted file mode 100644 index f6965a2bfa6..00000000000 --- a/arch/arm/mach-mt8127/ttab/vibrator/cust_vibrator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CUST_VIBRATOR_H__ -#define __CUST_VIBRATOR_H__ - -#include -#include -#include -#include - -#define CUST_VIBR_LIMIT -#define CUST_VIBR_VOL -/*----------------------------------------------------------------------------*/ -struct vibrator_hw { - int vib_timer; -#ifdef CUST_VIBR_LIMIT - int vib_limit; -#endif -#ifdef CUST_VIBR_VOL - int vib_vol; -#endif -}; -/*----------------------------------------------------------------------------*/ -extern struct vibrator_hw *get_cust_vibrator_hw(void); -/*----------------------------------------------------------------------------*/ -#endif diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile deleted file mode 100644 index e4060e073e6..00000000000 --- a/arch/arm64/boot/dts/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -#include $(srctree)/mediatek/Makefile - -dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb - -dtb-$(CONFIG_ARCH_MT6752) += mt6752_evb_64.dtb k2v1_64.dtb - -targets += dtbs - -DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES)) -ifneq ($(DTB_NAMES),) -DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES)) -else -DTB_LIST := $(dtb-y) -endif -targets += $(DTB_LIST) - -dtbs: $(addprefix $(obj)/, $(DTB_LIST)) - -clean-files := dts/*.dtb *.dtb - -MTK_PLATFORM := $(subst ",,$(CONFIG_MTK_PLATFORM)) -ARCH_MTK_PROJECT := $(subst ",,$(CONFIG_ARCH_MTK_PROJECT)) - -MTK_ARCH_LIST := $(CONFIG_ARCH_MT6752) \ - $(CONFIG_ARCH_MT6732) \ - $(CONFIG_ARCH_MT6595) \ - $(CONFIG_ARCH_MT6795) \ - $(CONFIG_ARCH_MT6735) \ - $(CONFIG_ARCH_MT6735M) \ - $(CONFIG_ARCH_MT6753) - -ifneq ($(filter y, $(MTK_ARCH_LIST)),) -# For K2/6795 arm32 -DCT_EXTRA_PATH := $(objtree)/drivers/misc/mediatek/mach/$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct/ -else -DCT_EXTRA_PATH := $(objtree)/arch/arm/mach-$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct/ -endif - -DTC_FLAGS ?= -i $(DCT_EXTRA_PATH) diff --git a/arch/arm64/boot/dts/foundation-v8.dts b/arch/arm64/boot/dts/foundation-v8.dts deleted file mode 100644 index 519c4b2c068..00000000000 --- a/arch/arm64/boot/dts/foundation-v8.dts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * ARM Ltd. - * - * ARMv8 Foundation model DTS - */ - -/dts-v1/; - -/memreserve/ 0x80000000 0x00010000; - -/ { - model = "Foundation-v8A"; - compatible = "arm,foundation-aarch64", "arm,vexpress"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - chosen { }; - - aliases { - serial0 = &v2m_serial0; - serial1 = &v2m_serial1; - serial2 = &v2m_serial2; - serial3 = &v2m_serial3; - }; - - cpus { - #address-cells = <2>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x0>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - cpu@1 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x1>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - cpu@2 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x2>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - cpu@3 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x3>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - }; - - memory@80000000 { - device_type = "memory"; - reg = <0x00000000 0x80000000 0 0x80000000>, - <0x00000008 0x80000000 0 0x80000000>; - }; - - gic: interrupt-controller@2c001000 { - compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; - #interrupt-cells = <3>; - #address-cells = <0>; - interrupt-controller; - reg = <0x0 0x2c001000 0 0x1000>, - <0x0 0x2c002000 0 0x1000>, - <0x0 0x2c004000 0 0x2000>, - <0x0 0x2c006000 0 0x2000>; - interrupts = <1 9 0xf04>; - }; - - timer { - compatible = "arm,armv8-timer"; - interrupts = <1 13 0xff01>, - <1 14 0xff01>, - <1 11 0xff01>, - <1 10 0xff01>; - clock-frequency = <100000000>; - }; - - pmu { - compatible = "arm,armv8-pmuv3"; - interrupts = <0 60 4>, - <0 61 4>, - <0 62 4>, - <0 63 4>; - }; - - smb { - compatible = "arm,vexpress,v2m-p1", "simple-bus"; - arm,v2m-memory-map = "rs1"; - #address-cells = <2>; /* SMB chipselect number and offset */ - #size-cells = <1>; - - ranges = <0 0 0 0x08000000 0x04000000>, - <1 0 0 0x14000000 0x04000000>, - <2 0 0 0x18000000 0x04000000>, - <3 0 0 0x1c000000 0x04000000>, - <4 0 0 0x0c000000 0x04000000>, - <5 0 0 0x10000000 0x04000000>; - - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 63>; - interrupt-map = <0 0 0 &gic 0 0 4>, - <0 0 1 &gic 0 1 4>, - <0 0 2 &gic 0 2 4>, - <0 0 3 &gic 0 3 4>, - <0 0 4 &gic 0 4 4>, - <0 0 5 &gic 0 5 4>, - <0 0 6 &gic 0 6 4>, - <0 0 7 &gic 0 7 4>, - <0 0 8 &gic 0 8 4>, - <0 0 9 &gic 0 9 4>, - <0 0 10 &gic 0 10 4>, - <0 0 11 &gic 0 11 4>, - <0 0 12 &gic 0 12 4>, - <0 0 13 &gic 0 13 4>, - <0 0 14 &gic 0 14 4>, - <0 0 15 &gic 0 15 4>, - <0 0 16 &gic 0 16 4>, - <0 0 17 &gic 0 17 4>, - <0 0 18 &gic 0 18 4>, - <0 0 19 &gic 0 19 4>, - <0 0 20 &gic 0 20 4>, - <0 0 21 &gic 0 21 4>, - <0 0 22 &gic 0 22 4>, - <0 0 23 &gic 0 23 4>, - <0 0 24 &gic 0 24 4>, - <0 0 25 &gic 0 25 4>, - <0 0 26 &gic 0 26 4>, - <0 0 27 &gic 0 27 4>, - <0 0 28 &gic 0 28 4>, - <0 0 29 &gic 0 29 4>, - <0 0 30 &gic 0 30 4>, - <0 0 31 &gic 0 31 4>, - <0 0 32 &gic 0 32 4>, - <0 0 33 &gic 0 33 4>, - <0 0 34 &gic 0 34 4>, - <0 0 35 &gic 0 35 4>, - <0 0 36 &gic 0 36 4>, - <0 0 37 &gic 0 37 4>, - <0 0 38 &gic 0 38 4>, - <0 0 39 &gic 0 39 4>, - <0 0 40 &gic 0 40 4>, - <0 0 41 &gic 0 41 4>, - <0 0 42 &gic 0 42 4>; - - ethernet@2,02000000 { - compatible = "smsc,lan91c111"; - reg = <2 0x02000000 0x10000>; - interrupts = <15>; - }; - - v2m_clk24mhz: clk24mhz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <24000000>; - clock-output-names = "v2m:clk24mhz"; - }; - - v2m_refclk1mhz: refclk1mhz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1000000>; - clock-output-names = "v2m:refclk1mhz"; - }; - - v2m_refclk32khz: refclk32khz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - clock-output-names = "v2m:refclk32khz"; - }; - - iofpga@3,00000000 { - compatible = "arm,amba-bus", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 3 0 0x200000>; - - v2m_sysreg: sysreg@010000 { - compatible = "arm,vexpress-sysreg"; - reg = <0x010000 0x1000>; - }; - - v2m_serial0: uart@090000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x090000 0x1000>; - interrupts = <5>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - v2m_serial1: uart@0a0000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0a0000 0x1000>; - interrupts = <6>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - v2m_serial2: uart@0b0000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0b0000 0x1000>; - interrupts = <7>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - v2m_serial3: uart@0c0000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0c0000 0x1000>; - interrupts = <8>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - virtio_block@0130000 { - compatible = "virtio,mmio"; - reg = <0x130000 0x1000>; - interrupts = <42>; - }; - }; - }; -}; diff --git a/arch/arm64/boot/dts/rtsm_ve-aemv8a.dts b/arch/arm64/boot/dts/rtsm_ve-aemv8a.dts deleted file mode 100644 index 572005ea221..00000000000 --- a/arch/arm64/boot/dts/rtsm_ve-aemv8a.dts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * ARM Ltd. Fast Models - * - * Architecture Envelope Model (AEM) ARMv8-A - * ARMAEMv8AMPCT - * - * RTSM_VE_AEMv8A.lisa - */ - -/dts-v1/; - -/memreserve/ 0x80000000 0x00010000; - -/ { - model = "RTSM_VE_AEMv8A"; - compatible = "arm,rtsm_ve,aemv8a", "arm,vexpress"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - chosen { }; - - aliases { - serial0 = &v2m_serial0; - serial1 = &v2m_serial1; - serial2 = &v2m_serial2; - serial3 = &v2m_serial3; - }; - - cpus { - #address-cells = <2>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x0>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - cpu@1 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x1>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - cpu@2 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x2>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - cpu@3 { - device_type = "cpu"; - compatible = "arm,armv8"; - reg = <0x0 0x3>; - enable-method = "spin-table"; - cpu-release-addr = <0x0 0x8000fff8>; - }; - }; - - memory@80000000 { - device_type = "memory"; - reg = <0x00000000 0x80000000 0 0x80000000>, - <0x00000008 0x80000000 0 0x80000000>; - }; - - gic: interrupt-controller@2c001000 { - compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; - #interrupt-cells = <3>; - #address-cells = <0>; - interrupt-controller; - reg = <0x0 0x2c001000 0 0x1000>, - <0x0 0x2c002000 0 0x1000>, - <0x0 0x2c004000 0 0x2000>, - <0x0 0x2c006000 0 0x2000>; - interrupts = <1 9 0xf04>; - }; - - timer { - compatible = "arm,armv8-timer"; - interrupts = <1 13 0xff01>, - <1 14 0xff01>, - <1 11 0xff01>, - <1 10 0xff01>; - clock-frequency = <100000000>; - }; - - pmu { - compatible = "arm,armv8-pmuv3"; - interrupts = <0 60 4>, - <0 61 4>, - <0 62 4>, - <0 63 4>; - }; - - smb { - compatible = "simple-bus"; - - #address-cells = <2>; - #size-cells = <1>; - ranges = <0 0 0 0x08000000 0x04000000>, - <1 0 0 0x14000000 0x04000000>, - <2 0 0 0x18000000 0x04000000>, - <3 0 0 0x1c000000 0x04000000>, - <4 0 0 0x0c000000 0x04000000>, - <5 0 0 0x10000000 0x04000000>; - - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 63>; - interrupt-map = <0 0 0 &gic 0 0 4>, - <0 0 1 &gic 0 1 4>, - <0 0 2 &gic 0 2 4>, - <0 0 3 &gic 0 3 4>, - <0 0 4 &gic 0 4 4>, - <0 0 5 &gic 0 5 4>, - <0 0 6 &gic 0 6 4>, - <0 0 7 &gic 0 7 4>, - <0 0 8 &gic 0 8 4>, - <0 0 9 &gic 0 9 4>, - <0 0 10 &gic 0 10 4>, - <0 0 11 &gic 0 11 4>, - <0 0 12 &gic 0 12 4>, - <0 0 13 &gic 0 13 4>, - <0 0 14 &gic 0 14 4>, - <0 0 15 &gic 0 15 4>, - <0 0 16 &gic 0 16 4>, - <0 0 17 &gic 0 17 4>, - <0 0 18 &gic 0 18 4>, - <0 0 19 &gic 0 19 4>, - <0 0 20 &gic 0 20 4>, - <0 0 21 &gic 0 21 4>, - <0 0 22 &gic 0 22 4>, - <0 0 23 &gic 0 23 4>, - <0 0 24 &gic 0 24 4>, - <0 0 25 &gic 0 25 4>, - <0 0 26 &gic 0 26 4>, - <0 0 27 &gic 0 27 4>, - <0 0 28 &gic 0 28 4>, - <0 0 29 &gic 0 29 4>, - <0 0 30 &gic 0 30 4>, - <0 0 31 &gic 0 31 4>, - <0 0 32 &gic 0 32 4>, - <0 0 33 &gic 0 33 4>, - <0 0 34 &gic 0 34 4>, - <0 0 35 &gic 0 35 4>, - <0 0 36 &gic 0 36 4>, - <0 0 37 &gic 0 37 4>, - <0 0 38 &gic 0 38 4>, - <0 0 39 &gic 0 39 4>, - <0 0 40 &gic 0 40 4>, - <0 0 41 &gic 0 41 4>, - <0 0 42 &gic 0 42 4>; - - /include/ "rtsm_ve-motherboard.dtsi" - }; -}; diff --git a/arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi b/arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi deleted file mode 100644 index b45e5f39f57..00000000000 --- a/arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi +++ /dev/null @@ -1,234 +0,0 @@ -/* - * ARM Ltd. Fast Models - * - * Versatile Express (VE) system model - * Motherboard component - * - * VEMotherBoard.lisa - */ - - motherboard { - arm,v2m-memory-map = "rs1"; - compatible = "arm,vexpress,v2m-p1", "simple-bus"; - #address-cells = <2>; /* SMB chipselect number and offset */ - #size-cells = <1>; - #interrupt-cells = <1>; - ranges; - - flash@0,00000000 { - compatible = "arm,vexpress-flash", "cfi-flash"; - reg = <0 0x00000000 0x04000000>, - <4 0x00000000 0x04000000>; - bank-width = <4>; - }; - - vram@2,00000000 { - compatible = "arm,vexpress-vram"; - reg = <2 0x00000000 0x00800000>; - }; - - ethernet@2,02000000 { - compatible = "smsc,lan91c111"; - reg = <2 0x02000000 0x10000>; - interrupts = <15>; - }; - - v2m_clk24mhz: clk24mhz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <24000000>; - clock-output-names = "v2m:clk24mhz"; - }; - - v2m_refclk1mhz: refclk1mhz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1000000>; - clock-output-names = "v2m:refclk1mhz"; - }; - - v2m_refclk32khz: refclk32khz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - clock-output-names = "v2m:refclk32khz"; - }; - - iofpga@3,00000000 { - compatible = "arm,amba-bus", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 3 0 0x200000>; - - v2m_sysreg: sysreg@010000 { - compatible = "arm,vexpress-sysreg"; - reg = <0x010000 0x1000>; - gpio-controller; - #gpio-cells = <2>; - }; - - v2m_sysctl: sysctl@020000 { - compatible = "arm,sp810", "arm,primecell"; - reg = <0x020000 0x1000>; - clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&v2m_clk24mhz>; - clock-names = "refclk", "timclk", "apb_pclk"; - #clock-cells = <1>; - clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; - }; - - aaci@040000 { - compatible = "arm,pl041", "arm,primecell"; - reg = <0x040000 0x1000>; - interrupts = <11>; - clocks = <&v2m_clk24mhz>; - clock-names = "apb_pclk"; - }; - - mmci@050000 { - compatible = "arm,pl180", "arm,primecell"; - reg = <0x050000 0x1000>; - interrupts = <9 10>; - cd-gpios = <&v2m_sysreg 0 0>; - wp-gpios = <&v2m_sysreg 1 0>; - max-frequency = <12000000>; - vmmc-supply = <&v2m_fixed_3v3>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "mclk", "apb_pclk"; - }; - - kmi@060000 { - compatible = "arm,pl050", "arm,primecell"; - reg = <0x060000 0x1000>; - interrupts = <12>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "KMIREFCLK", "apb_pclk"; - }; - - kmi@070000 { - compatible = "arm,pl050", "arm,primecell"; - reg = <0x070000 0x1000>; - interrupts = <13>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "KMIREFCLK", "apb_pclk"; - }; - - v2m_serial0: uart@090000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x090000 0x1000>; - interrupts = <5>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - v2m_serial1: uart@0a0000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0a0000 0x1000>; - interrupts = <6>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - v2m_serial2: uart@0b0000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0b0000 0x1000>; - interrupts = <7>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - v2m_serial3: uart@0c0000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0c0000 0x1000>; - interrupts = <8>; - clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; - clock-names = "uartclk", "apb_pclk"; - }; - - wdt@0f0000 { - compatible = "arm,sp805", "arm,primecell"; - reg = <0x0f0000 0x1000>; - interrupts = <0>; - clocks = <&v2m_refclk32khz>, <&v2m_clk24mhz>; - clock-names = "wdogclk", "apb_pclk"; - }; - - v2m_timer01: timer@110000 { - compatible = "arm,sp804", "arm,primecell"; - reg = <0x110000 0x1000>; - interrupts = <2>; - clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&v2m_clk24mhz>; - clock-names = "timclken1", "timclken2", "apb_pclk"; - }; - - v2m_timer23: timer@120000 { - compatible = "arm,sp804", "arm,primecell"; - reg = <0x120000 0x1000>; - interrupts = <3>; - clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&v2m_clk24mhz>; - clock-names = "timclken1", "timclken2", "apb_pclk"; - }; - - rtc@170000 { - compatible = "arm,pl031", "arm,primecell"; - reg = <0x170000 0x1000>; - interrupts = <4>; - clocks = <&v2m_clk24mhz>; - clock-names = "apb_pclk"; - }; - - clcd@1f0000 { - compatible = "arm,pl111", "arm,primecell"; - reg = <0x1f0000 0x1000>; - interrupts = <14>; - clocks = <&v2m_oscclk1>, <&v2m_clk24mhz>; - clock-names = "clcdclk", "apb_pclk"; - }; - }; - - v2m_fixed_3v3: fixedregulator@0 { - compatible = "regulator-fixed"; - regulator-name = "3V3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - mcc { - compatible = "arm,vexpress,config-bus", "simple-bus"; - arm,vexpress,config-bridge = <&v2m_sysreg>; - - v2m_oscclk1: osc@1 { - /* CLCD clock */ - compatible = "arm,vexpress-osc"; - arm,vexpress-sysreg,func = <1 1>; - freq-range = <23750000 63500000>; - #clock-cells = <0>; - clock-output-names = "v2m:oscclk1"; - }; - - reset@0 { - compatible = "arm,vexpress-reset"; - arm,vexpress-sysreg,func = <5 0>; - }; - - muxfpga@0 { - compatible = "arm,vexpress-muxfpga"; - arm,vexpress-sysreg,func = <7 0>; - }; - - shutdown@0 { - compatible = "arm,vexpress-shutdown"; - arm,vexpress-sysreg,func = <8 0>; - }; - - reboot@0 { - compatible = "arm,vexpress-reboot"; - arm,vexpress-sysreg,func = <9 0>; - }; - - dvimode@0 { - compatible = "arm,vexpress-dvimode"; - arm,vexpress-sysreg,func = <11 0>; - }; - }; - }; diff --git a/arch/arm64/boot/dts/skeleton.dtsi b/arch/arm64/boot/dts/skeleton.dtsi deleted file mode 100644 index 38ead821bb4..00000000000 --- a/arch/arm64/boot/dts/skeleton.dtsi +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Skeleton device tree; the bare minimum needed to boot; just include and - * add a compatible value. The bootloader will typically populate the memory - * node. - */ - -/ { - #address-cells = <2>; - #size-cells = <1>; - chosen { }; - aliases { }; - memory { device_type = "memory"; reg = <0 0 0>; }; -}; diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig deleted file mode 100644 index e42c8c000e8..00000000000 --- a/arch/arm64/configs/defconfig +++ /dev/null @@ -1,89 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set -CONFIG_SCHED_AUTOGROUP=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_COMPAT_BRK is not set -CONFIG_PROFILING=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_ARCH_VEXPRESS=y -CONFIG_SMP=y -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_CMDLINE="console=ttyAMA0" -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_COMPAT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -# CONFIG_BLK_DEV is not set -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_SMC91X=y -# CONFIG_WLAN is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_FUSE_FS=y -CONFIG_CUSE=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -CONFIG_ATOMIC64_SELFTEST=y -CONFIG_MTK_BT_SUPPORT=y diff --git a/arch/arm64/configs/k6752v1_op01_pre_debug_defconfig b/arch/arm64/configs/k6752v1_op01_pre_debug_defconfig deleted file mode 100644 index 89a442c28ff..00000000000 --- a/arch/arm64/configs/k6752v1_op01_pre_debug_defconfig +++ /dev/null @@ -1,3024 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm64 3.10.54 Kernel Configuration -# -CONFIG_ARM64=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_64BIT=y -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_MMU=y -CONFIG_NO_IOPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_GENERIC_LOCKBREAK=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_ARM_ERRATA_824069 is not set -CONFIG_KERNEL_MODE_NEON=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_SPARSE_IRQ=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -# CONFIG_RESOURCE_COUNTERS is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_JUMP_LABEL is not set -CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_COMPAT_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_BLOCK_COMPAT=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# Platform selection -# -# CONFIG_ARCH_VEXPRESS is not set -# CONFIG_ARCH_MT6735 is not set -# CONFIG_ARCH_MT6735M is not set -# CONFIG_ARCH_MT6753 is not set -CONFIG_ARCH_MT6752=y -# CONFIG_ARCH_MT6795 is not set - -# -# MTK Board Support Package -# -CONFIG_MTK_EVB_BOARD=y -# CONFIG_MTK_FPGA is not set -CONFIG_MTK_PSCI=y -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x10000000 - -# -# Bus support -# -CONFIG_ARM_AMBA=y - -# -# Kernel Features -# -# CONFIG_ARM64_64K_PAGES is not set -CONFIG_SMP=y -CONFIG_ARM_CPU_TOPOLOGY=y -CONFIG_SCHED_MC=y -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -CONFIG_NR_CPUS=8 -CONFIG_SWP_EMULATE=y -CONFIG_HOTPLUG_CPU=y -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HW_PERF_EVENTS=y -CONFIG_ARMV7_COMPAT=y -CONFIG_ARMV7_COMPAT_CPUINFO=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -# CONFIG_BOUNCE is not set -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -# CONFIG_SECCOMP is not set - -# -# Boot options -# -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O " -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES="k6752v1_op01_pre" - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_GOV_HOTPLUG is not set - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_COMPAT_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y -CONFIG_COMPAT=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -# CONFIG_TOI_FILE is not set -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -CONFIG_PM_CLK=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM64_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_COMPAT_NETLINK_MESSAGES=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NET_DROP_MONITOR=y -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_HAVE_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_DMA_SHARED_BUFFER=y - -# -# Bus devices -# -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -CONFIG_DTC=y -CONFIG_OF=y - -# -# Device Tree and Open Firmware support -# -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_OF_SELFTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_IRQ=y -CONFIG_OF_DEVICE=y -CONFIG_OF_I2C=y -CONFIG_OF_NET=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -# CONFIG_ANDROID_PMEM is not set -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_ATMEL_PWM is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt6752" -CONFIG_ARCH_MTK_PROJECT="k6752v1_op01_pre" -CONFIG_MTK_INTERNAL=y -CONFIG_MTK_CIRQ=y -CONFIG_MTK_SYSTRACKER=y -CONFIG_MTK_L2C_SHARE=y -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -CONFIG_MTK_GPT_SCHEME_SUPPORT=y -# CONFIG_MTK_SHARED_SDCARD is not set -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -# CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT is not set -CONFIG_MTK_SECURITY_SW_SUPPORT=y -# CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT is not set -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -CONFIG_MD32_SUPPORT=y -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_ACCELEROMETER is not set -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -CONFIG_CUSTOM_KERNEL_BAROMETER=y -# CONFIG_MTK_SENSOR_HUB_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_SENSORHUB="" -CONFIG_CUSTOM_KERNEL_STEP_COUNTER="" -CONFIG_CUSTOM_KERNEL_SIGNIFICANT_MOTION_SENSOR="" -CONFIG_CUSTOM_KERNEL_ACTIVITY_SENSOR="" -CONFIG_CUSTOM_KERNEL_PICK_UP_SENSOR="" -CONFIG_CUSTOM_KERNEL_SHAKE_SENSOR="" -CONFIG_CUSTOM_KERNEL_FACE_DOWN_SENSOR="" -CONFIG_CUSTOM_KERNEL_IN_POCKET_SENSOR="" -CONFIG_CUSTOM_KERNEL_PEDOMETER="" -CONFIG_CUSTOM_KERNEL_HEART_RATE_SENSOR="" -CONFIG_CUSTOM_KERNEL_TILT_DETECTOR_SENSOR="" -CONFIG_CUSTOM_KERNEL_WAKE_GESTURE_SENSOR="" -CONFIG_CUSTOM_KERNEL_GLANCE_GESTURE_SENSOR="" -CONFIG_CUSTOM_KERNEL_IMGSENSOR="imx135_mipi_raw ov5648_mipi_raw s5k2p8_mipi_raw" -CONFIG_CUSTOM_KERNEL_LCM="nt35595_fhd_dsi_cmd_truly_nt50358" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_generic_v2" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -CONFIG_MTK_MMPROFILE_SUPPORT=y -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# -CONFIG_MTK_SCHED_CMP=y -CONFIG_MTK_SCHED_CMP_TGS=y -CONFIG_MTK_SCHED_CMP_TGS_WAKEUP=y -# CONFIG_MTK_SCHED_CMP_PACK_SMALL_TASK is not set - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -CONFIG_MTK_FTRACE_DEFAULT_ENABLE=y -# CONFIG_MTK_KERNEL_MARKER is not set -# CONFIG_MT65XX_TRACER is not set -# CONFIG_GENERIC_TRACER is not set - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -CONFIG_MTK_AEE_POWERKEY_HANG_DETECT=y -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -# CONFIG_MTK_RAM_CONSOLE_USING_SRAM is not set -CONFIG_MTK_RAM_CONSOLE_USING_DRAM=y -CONFIG_MTK_RAM_CONSOLE_SIZE=0x4000 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF912c000 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x43F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -# CONFIG_MT_DEBUG_MUTEXES is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -# CONFIG_EARLY_LINUX_PORTING is not set -# CONFIG_MTK_MCI is not set -CONFIG_MTK_ETM=y - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -CONFIG_MT_LOAD_BALANCE_ENHANCEMENT=y -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -CONFIG_MTK_COMPAT=y -CONFIG_MTK_CPU_TOPOLOGY=y -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -CONFIG_MTK_SCHED_RQAVG_US=y -CONFIG_MTK_SCHED_RQAVG_KS=y -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -# CONFIG_MTK_TABLET_HARDWARE is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -CONFIG_MTK_CCCI_DEVICES=y -# CONFIG_MTK_CCCI_DRIVER is not set -# CONFIG_MTK_CCCI_EXT is not set -CONFIG_MTK_ECCCI_DRIVER=y -CONFIG_MTK_ECCCI_CLDMA=y -CONFIG_MTK_ECCCI_CCIF=y -# CONFIG_MTK_ECCCI_UT is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -# CONFIG_MTK_NET_CCMNI is not set -CONFIG_MTK_ENABLE_MD1=y -CONFIG_MTK_MD1_SUPPORT=6 -CONFIG_MD1_SIZE=0x5000000 -CONFIG_MD1_SMEM_SIZE=0x200000 -# CONFIG_MTK_ENABLE_MD2 is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -CONFIG_MTK_UMTS_TDD128_MODE=y -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -# CONFIG_MTK_DITHERING_SUPPORT is not set -CONFIG_MTK_LCM_PHYSICAL_ROTATION="" -CONFIG_LCM_HEIGHT="1920" -CONFIG_LCM_WIDTH="1080" -# CONFIG_MTK_OVERLAY_ENGINE_SUPPORT is not set -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -# CONFIG_LCM_SEND_CMD_IN_VIDEO is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_8127 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_6752=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6625_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -# CONFIG_MTK_IDLE_TIME_FIX is not set -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -CONFIG_MTK_AP_TO_SCP_I2C=y -CONFIG_MTK_SPI=y -# CONFIG_MTK_CMMB is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -# CONFIG_KEYBOARD_HID is not set -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT=y -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -CONFIG_MTK_BQ24261_SUPPORT=y -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_MAX8971_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -# CONFIG_MTK_SOUND is not set -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -CONFIG_MTK_CM36652_NEW=y -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_BMA250 is not set -CONFIG_MTK_MPU6515A=y -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU3000_NEW is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6515G=y -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -CONFIG_MTK_YAS532=y -CONFIG_MTK_BMP180_NEW=y -CONFIG_MTK_TOUCHPANEL=y -# CONFIG_MTK_S7020 is not set -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -# CONFIG_LEDS_RT8542 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -# CONFIG_MTK_STAGING is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -CONFIG_MTK_EMMC_CACHE=y -# CONFIG_MTK_GPU_SUPPORT is not set -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -CONFIG_MTK_HDMI_SUPPORT=y -# CONFIG_MTK_INTERNAL_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="Sii8348" -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_INTERNAL_MHL_SUPPORT is not set -CONFIG_MTK_THERMAL_PA_VIA_ATCMD=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -# CONFIG_MTK_VIDEO_HEVC_SUPPORT is not set -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -# CONFIG_MTK_LENS_DUMMYLENS_SUPPORT is not set -CONFIG_MTK_LENS_AD5820AF_SUPPORT=y -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -CONFIG_MTK_LENS_BU64745GWZAF_SUPPORT=y -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -CONFIG_MTK_LENS_DW9714AF_SUPPORT=y -# CONFIG_MTK_LENS_DW9714A_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -# CONFIG_MTK_LENS_FM50AF_SUPPORT is not set -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCB032GWZ_3_SUPPORT is not set -CONFIG_MTK_CPU_STRESS=y -CONFIG_MTK_LASTPC=y -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -CONFIG_MTK_CMDQ=y -CONFIG_MTK_VIDEOX=y -CONFIG_MTK_MT_LOGGER=y -# CONFIG_MTK_CONN_MD is not set -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -# CONFIG_MTK_FLASHLIGHT is not set -# CONFIG_MTK_DUM_CHAR is not set -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -# CONFIG_MTK_SOUND_DRV is not set -CONFIG_MTK_POWER_GS=y -# CONFIG_MTK_VIDEO is not set -# CONFIG_MTK_MRDUMP is not set -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_EGALAX is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_MTK=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX is not set -CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT_SCP=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_MAX1187X is not set -# CONFIG_TOUCHSCREEN_MTK_GT9XXTB_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_TOUCHSCREEN_S7020 is not set -# CONFIG_TOUCHSCREEN_MTK_GT9XX_2 is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_MTK_MMS244 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_W90X900 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_S3528 is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set - -# -# PCMCIA character devices -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -CONFIG_OF_GPIO=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_TS5500 is not set -# CONFIG_GPIO_GRGPIO is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -CONFIG_POWER_RESET=y -# CONFIG_POWER_RESET_GPIO is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_FB_SSD1307 is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_COMPRESS_OFFLOAD=y -CONFIG_SND_JACK=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_SEQ_DUMMY=y -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=y -CONFIG_SND_SEQ_HRTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_VERBOSE=y -CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_SND_RAWMIDI_SEQ=y -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -CONFIG_SND_SOC=y -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set -# CONFIG_MT_SND_SOC_V1 is not set -CONFIG_MT_SND_SOC_V2=y -# CONFIG_MT_SND_SOC_V3 is not set -CONFIG_MTK_SPEAKER=y -# CONFIG_MTK_NXP_TFA9890 is not set -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SIMPLE_CARD=y -CONFIG_SOUND_PRIME=y - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -# CONFIG_UHID is not set -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_SDHCI_PXAV3 is not set -# CONFIG_MMC_SDHCI_PXAV2 is not set -# CONFIG_MMC_SPI is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_RENESAS_TPU is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -# CONFIG_RTC_SYSTOHC is not set -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set -# CONFIG_RTC_DRV_SNVS is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_DEBUG is not set -# CONFIG_COMMON_CLK_SI5351 is not set - -# -# Hardware Spinlock drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_ARM_ARCH_TIMER=y -# CONFIG_MAILBOX is not set -CONFIG_IOMMU_SUPPORT=y -CONFIG_OF_IOMMU=y - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -CONFIG_MTK_GIC=y -CONFIG_MTK_EIC=y -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_USE_FOR_EXT23=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -CONFIG_EXT4_DEBUG=y -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -CONFIG_QUOTA_TREE=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_HAVE_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -CONFIG_FAULT_INJECTION=y -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -CONFIG_ENABLE_DEFAULT_TRACERS=y -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -CONFIG_DMA_API_DEBUG=y -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -CONFIG_EARLY_PRINTK=y -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_ABLK_HELPER=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_ARM64_CRYPTO=y -# CONFIG_CRYPTO_SHA1_ARM64_CE is not set -CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_GHASH_ARM64_CE is not set -CONFIG_CRYPTO_AES_ARM64_CE=y -# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -CONFIG_GATOR_DRIVER=y diff --git a/arch/arm64/configs/k6752v1_op01_pre_defconfig b/arch/arm64/configs/k6752v1_op01_pre_defconfig deleted file mode 100644 index 558d2b2fe75..00000000000 --- a/arch/arm64/configs/k6752v1_op01_pre_defconfig +++ /dev/null @@ -1,2973 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm64 3.10.54 Kernel Configuration -# -CONFIG_ARM64=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_64BIT=y -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_MMU=y -CONFIG_NO_IOPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_GENERIC_LOCKBREAK=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_ARM_ERRATA_824069 is not set -CONFIG_KERNEL_MODE_NEON=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_SPARSE_IRQ=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -# CONFIG_RESOURCE_COUNTERS is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_JUMP_LABEL is not set -CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_COMPAT_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_BLOCK_COMPAT=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# Platform selection -# -# CONFIG_ARCH_VEXPRESS is not set -# CONFIG_ARCH_MT6735 is not set -CONFIG_ARCH_MT6752=y -# CONFIG_ARCH_MT6795 is not set - -# -# MTK Board Support Package -# -CONFIG_MTK_EVB_BOARD=y -# CONFIG_MTK_FPGA is not set -CONFIG_MTK_PSCI=y -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x10000000 - -# -# Bus support -# -CONFIG_ARM_AMBA=y - -# -# Kernel Features -# -# CONFIG_ARM64_64K_PAGES is not set -CONFIG_SMP=y -CONFIG_ARM_CPU_TOPOLOGY=y -CONFIG_SCHED_MC=y -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -CONFIG_NR_CPUS=8 -# CONFIG_SWP_EMULATE is not set -CONFIG_HOTPLUG_CPU=y -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_HAVE_ARCH_PFN_VALID=y -# CONFIG_ARMV7_COMPAT is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -# CONFIG_BOUNCE is not set -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -# CONFIG_SECCOMP is not set - -# -# Boot options -# -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O " -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES="k6752v1_op01_pre" - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_GOV_HOTPLUG is not set - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_COMPAT_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y -CONFIG_COMPAT=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -# CONFIG_TOI_FILE is not set -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -CONFIG_PM_CLK=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM64_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_COMPAT_NETLINK_MESSAGES=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NET_DROP_MONITOR=y -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_HAVE_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_DMA_SHARED_BUFFER=y - -# -# Bus devices -# -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -CONFIG_DTC=y -CONFIG_OF=y - -# -# Device Tree and Open Firmware support -# -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_OF_SELFTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_IRQ=y -CONFIG_OF_DEVICE=y -CONFIG_OF_I2C=y -CONFIG_OF_NET=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -# CONFIG_ANDROID_PMEM is not set -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_ATMEL_PWM is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt6752" -CONFIG_ARCH_MTK_PROJECT="k6752v1_op01_pre" -CONFIG_MTK_INTERNAL=y -CONFIG_MTK_CIRQ=y -CONFIG_MTK_SYSTRACKER=y -CONFIG_MTK_L2C_SHARE=y -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -CONFIG_MTK_GPT_SCHEME_SUPPORT=y -# CONFIG_MTK_SHARED_SDCARD is not set -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -# CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT is not set -CONFIG_MTK_SECURITY_SW_SUPPORT=y -# CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT is not set -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -CONFIG_MD32_SUPPORT=y -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -# CONFIG_MTK_SMARTBOOK_SUPPORT is not set -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_ACCELEROMETER is not set -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -CONFIG_CUSTOM_KERNEL_BAROMETER=y -CONFIG_CUSTOM_KERNEL_IMGSENSOR="imx135_mipi_raw ov5648_mipi_raw s5k2p8_mipi_raw" -CONFIG_CUSTOM_KERNEL_LCM="nt35595_fhd_dsi_cmd_truly_nt50358" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_generic_v2" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -CONFIG_MTK_MMPROFILE_SUPPORT=y -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# -CONFIG_MTK_SCHED_CMP=y -CONFIG_MTK_SCHED_CMP_TGS=y -CONFIG_MTK_SCHED_CMP_TGS_WAKEUP=y -# CONFIG_MTK_SCHED_CMP_PACK_SMALL_TASK is not set - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -# CONFIG_MT65XX_TRACER is not set -# CONFIG_GENERIC_TRACER is not set - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -CONFIG_MTK_AEE_POWERKEY_HANG_DETECT=y -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -# CONFIG_MTK_RAM_CONSOLE_USING_SRAM is not set -CONFIG_MTK_RAM_CONSOLE_USING_DRAM=y -CONFIG_MTK_RAM_CONSOLE_SIZE=0x4000 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF912c000 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x43F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -# CONFIG_EARLY_LINUX_PORTING is not set -# CONFIG_MTK_MCI is not set -CONFIG_MTK_ETM=y - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -CONFIG_MT_LOAD_BALANCE_ENHANCEMENT=y -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -CONFIG_MTK_CPU_TOPOLOGY=y -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -CONFIG_MTK_SCHED_RQAVG_US=y -CONFIG_MTK_SCHED_RQAVG_KS=y -CONFIG_MTK_STORAGE_PID_LOGGER=y -CONFIG_MTK_COMPAT=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -# CONFIG_MTK_TABLET_HARDWARE is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -CONFIG_MTK_CCCI_DEVICES=y -# CONFIG_MTK_CCCI_DRIVER is not set -# CONFIG_MTK_CCCI_EXT is not set -CONFIG_MTK_ECCCI_DRIVER=y -CONFIG_MTK_ECCCI_CLDMA=y -CONFIG_MTK_ECCCI_CCIF=y -# CONFIG_MTK_ECCCI_UT is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -# CONFIG_MTK_NET_CCMNI is not set -CONFIG_MTK_ENABLE_MD1=y -CONFIG_MTK_MD1_SUPPORT=6 -CONFIG_MD1_SIZE=0x5000000 -CONFIG_MD1_SMEM_SIZE=0x200000 -# CONFIG_MTK_ENABLE_MD2 is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -CONFIG_MTK_UMTS_TDD128_MODE=y -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -CONFIG_MTK_LTE_SUPPORT=y -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -# CONFIG_MTK_DITHERING_SUPPORT is not set -CONFIG_MTK_LCM_PHYSICAL_ROTATION="" -CONFIG_LCM_HEIGHT="1920" -CONFIG_LCM_WIDTH="1080" -# CONFIG_MTK_OVERLAY_ENGINE_SUPPORT is not set -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_8127 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_6752=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6625_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -# CONFIG_MTK_IDLE_TIME_FIX is not set -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -# CONFIG_MTK_MJC_DRIVER is not set -CONFIG_MTK_I2C=y -CONFIG_MTK_AP_TO_SCP_I2C=y -CONFIG_MTK_SPI=y -# CONFIG_MTK_CMMB is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -# CONFIG_KEYBOARD_HID is not set -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT=y -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -CONFIG_MTK_BQ24261_SUPPORT=y -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -# CONFIG_MTK_SOUND is not set -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -CONFIG_MTK_CM36652_NEW=y -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_BMA250 is not set -CONFIG_MTK_MPU6515A=y -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6515G=y -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -CONFIG_MTK_YAS532=y -CONFIG_MTK_BMP180_NEW=y -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -# CONFIG_MTK_STAGING is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -CONFIG_MTK_EMMC_CACHE=y -# CONFIG_MTK_GPU_SUPPORT is not set -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -CONFIG_MTK_HDMI_SUPPORT=y -# CONFIG_MTK_INTERNAL_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="Sii8348" -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_INTERNAL_MHL_SUPPORT is not set -CONFIG_MTK_THERMAL_PA_VIA_ATCMD=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -# CONFIG_MTK_VIDEO_HEVC_SUPPORT is not set -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -# CONFIG_MTK_LENS_DUMMYLENS_SUPPORT is not set -CONFIG_MTK_LENS_AD5820AF_SUPPORT=y -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -CONFIG_MTK_LENS_DW9714AF_SUPPORT=y -CONFIG_MTK_LENS_BU64745GWZAF_SUPPORT=y -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -# CONFIG_MTK_LENS_FM50AF_SUPPORT is not set -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -CONFIG_MTK_CPU_STRESS=y -CONFIG_MTK_LASTPC=y -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -CONFIG_MTK_CMDQ=y -CONFIG_MTK_VIDEOX=y -CONFIG_MTK_MT_LOGGER=y -# CONFIG_MTK_CONN_MD is not set -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -# CONFIG_MTK_FLASHLIGHT is not set -# CONFIG_MTK_DUM_CHAR is not set -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -# CONFIG_MTK_SOUND_DRV is not set -CONFIG_MTK_POWER_GS=y -# CONFIG_MTK_VIDEO is not set -# CONFIG_MTK_MRDUMP is not set -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_EGALAX is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_MTK=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX is not set -CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT_SCP=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_GT9XXTB_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_TOUCHSCREEN_S7020 is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_W90X900 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set - -# -# PCMCIA character devices -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -CONFIG_OF_GPIO=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_TS5500 is not set -# CONFIG_GPIO_GRGPIO is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -CONFIG_POWER_RESET=y -# CONFIG_POWER_RESET_GPIO is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_FB_SSD1307 is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_COMPRESS_OFFLOAD=y -CONFIG_SND_JACK=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_SEQ_DUMMY=y -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=y -CONFIG_SND_SEQ_HRTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_VERBOSE=y -CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_SND_RAWMIDI_SEQ=y -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -CONFIG_SND_SOC=y -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set -# CONFIG_MT_SND_SOC_V1 is not set -CONFIG_MT_SND_SOC_V2=y -# CONFIG_MT_SND_SOC_V3 is not set -CONFIG_MTK_SPEAKER=y -# CONFIG_MTK_NXP_TFA9890 is not set -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SIMPLE_CARD=y -CONFIG_SOUND_PRIME=y - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -# CONFIG_UHID is not set -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_SDHCI_PXAV3 is not set -# CONFIG_MMC_SDHCI_PXAV2 is not set -# CONFIG_MMC_SPI is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_RENESAS_TPU is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -# CONFIG_RTC_SYSTOHC is not set -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set -# CONFIG_RTC_DRV_SNVS is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_DEBUG is not set -# CONFIG_COMMON_CLK_SI5351 is not set - -# -# Hardware Spinlock drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_ARM_ARCH_TIMER=y -# CONFIG_MAILBOX is not set -CONFIG_IOMMU_SUPPORT=y -CONFIG_OF_IOMMU=y - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -CONFIG_MTK_GIC=y -CONFIG_MTK_EIC=y -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_USE_FOR_EXT23=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -CONFIG_EXT4_DEBUG=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -CONFIG_QUOTA_TREE=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_HAVE_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -CONFIG_FAULT_INJECTION=y -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -CONFIG_ENABLE_DEFAULT_TRACERS=y -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -CONFIG_DMA_API_DEBUG=y -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -CONFIG_EARLY_PRINTK=y -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_ARM64_CRYPTO=y -# CONFIG_CRYPTO_SHA1_ARM64_CE is not set -CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_GHASH_ARM64_CE is not set -CONFIG_CRYPTO_AES_ARM64_CE=y -# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -CONFIG_GATOR_DRIVER=y -CONFIG_HW_PERF_EVENTS=y diff --git a/arch/arm64/configs/k6752v1_op02_pre_debug_defconfig b/arch/arm64/configs/k6752v1_op02_pre_debug_defconfig deleted file mode 100644 index 9ff7b0a056e..00000000000 --- a/arch/arm64/configs/k6752v1_op02_pre_debug_defconfig +++ /dev/null @@ -1,3024 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm64 3.10.54 Kernel Configuration -# -CONFIG_ARM64=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_64BIT=y -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_MMU=y -CONFIG_NO_IOPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_GENERIC_LOCKBREAK=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_ARM_ERRATA_824069 is not set -CONFIG_KERNEL_MODE_NEON=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_SPARSE_IRQ=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -# CONFIG_RESOURCE_COUNTERS is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=5 -CONFIG_EXPERT=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_JUMP_LABEL is not set -CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_COMPAT_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_BLOCK_COMPAT=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y - -# -# Platform selection -# -# CONFIG_ARCH_VEXPRESS is not set -# CONFIG_ARCH_MT6735 is not set -# CONFIG_ARCH_MT6735M is not set -# CONFIG_ARCH_MT6753 is not set -CONFIG_ARCH_MT6752=y -# CONFIG_ARCH_MT6795 is not set - -# -# MTK Board Support Package -# -CONFIG_MTK_EVB_BOARD=y -# CONFIG_MTK_FPGA is not set -CONFIG_MTK_PSCI=y -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x10000000 - -# -# Bus support -# -CONFIG_ARM_AMBA=y - -# -# Kernel Features -# -# CONFIG_ARM64_64K_PAGES is not set -CONFIG_SMP=y -CONFIG_ARM_CPU_TOPOLOGY=y -CONFIG_SCHED_MC=y -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -CONFIG_NR_CPUS=8 -CONFIG_SWP_EMULATE=y -CONFIG_HOTPLUG_CPU=y -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HW_PERF_EVENTS=y -CONFIG_ARMV7_COMPAT=y -CONFIG_ARMV7_COMPAT_CPUINFO=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=999999 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -# CONFIG_BOUNCE is not set -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -# CONFIG_SECCOMP is not set - -# -# Boot options -# -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O " -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES="k6752v1_op02_pre" - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_GOV_HOTPLUG is not set - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_COMPAT_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y -CONFIG_COMPAT=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -# CONFIG_TOI_FILE is not set -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -CONFIG_PM_CLK=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM64_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_COMPAT_NETLINK_MESSAGES=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NET_DROP_MONITOR=y -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -CONFIG_MTK_NET_LOGGING=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_HAVE_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_DMA_SHARED_BUFFER=y - -# -# Bus devices -# -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -CONFIG_DTC=y -CONFIG_OF=y - -# -# Device Tree and Open Firmware support -# -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_OF_SELFTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_IRQ=y -CONFIG_OF_DEVICE=y -CONFIG_OF_I2C=y -CONFIG_OF_NET=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -# CONFIG_ANDROID_PMEM is not set -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_ATMEL_PWM is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt6752" -CONFIG_ARCH_MTK_PROJECT="k6752v1_op02_pre" -CONFIG_MTK_INTERNAL=y -CONFIG_MTK_CIRQ=y -CONFIG_MTK_SYSTRACKER=y -CONFIG_MTK_L2C_SHARE=y -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -CONFIG_MTK_GPT_SCHEME_SUPPORT=y -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -# CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT is not set -CONFIG_MTK_SECURITY_SW_SUPPORT=y -# CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT is not set -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -CONFIG_MD32_SUPPORT=y -CONFIG_MTK_MEMCFG=y -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -CONFIG_MTK_SMARTBOOK_SUPPORT=y -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_ACCELEROMETER is not set -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -CONFIG_CUSTOM_KERNEL_BAROMETER=y -# CONFIG_MTK_SENSOR_HUB_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_SENSORHUB="" -CONFIG_CUSTOM_KERNEL_STEP_COUNTER="" -CONFIG_CUSTOM_KERNEL_SIGNIFICANT_MOTION_SENSOR="" -CONFIG_CUSTOM_KERNEL_ACTIVITY_SENSOR="" -CONFIG_CUSTOM_KERNEL_PICK_UP_SENSOR="" -CONFIG_CUSTOM_KERNEL_SHAKE_SENSOR="" -CONFIG_CUSTOM_KERNEL_FACE_DOWN_SENSOR="" -CONFIG_CUSTOM_KERNEL_IN_POCKET_SENSOR="" -CONFIG_CUSTOM_KERNEL_PEDOMETER="" -CONFIG_CUSTOM_KERNEL_HEART_RATE_SENSOR="" -CONFIG_CUSTOM_KERNEL_TILT_DETECTOR_SENSOR="" -CONFIG_CUSTOM_KERNEL_WAKE_GESTURE_SENSOR="" -CONFIG_CUSTOM_KERNEL_GLANCE_GESTURE_SENSOR="" -CONFIG_CUSTOM_KERNEL_IMGSENSOR="imx135_mipi_raw ov5648_mipi_raw s5k2p8_mipi_raw" -CONFIG_CUSTOM_KERNEL_LCM="nt35595_fhd_dsi_cmd_truly_nt50358" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_generic_v2" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -CONFIG_MTK_MMPROFILE_SUPPORT=y -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# -CONFIG_MTK_SCHED_CMP=y -CONFIG_MTK_SCHED_CMP_TGS=y -CONFIG_MTK_SCHED_CMP_TGS_WAKEUP=y -# CONFIG_MTK_SCHED_CMP_PACK_SMALL_TASK is not set - -# -# Tracer Related -# -CONFIG_MTK_SCHED_TRACERS=y -CONFIG_MTK_FTRACE_DEFAULT_ENABLE=y -# CONFIG_MTK_KERNEL_MARKER is not set -# CONFIG_MT65XX_TRACER is not set -# CONFIG_GENERIC_TRACER is not set - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -CONFIG_MTPROF_IRQ_DURATION=y -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -CONFIG_MTK_AEE_POWERKEY_HANG_DETECT=y -CONFIG_MTK_AEE_MRDUMP=y -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -# CONFIG_MTK_RAM_CONSOLE_USING_SRAM is not set -CONFIG_MTK_RAM_CONSOLE_USING_DRAM=y -CONFIG_MTK_RAM_CONSOLE_SIZE=0x4000 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF912c000 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x43F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -CONFIG_MT_SCHED_MONITOR=y -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -# CONFIG_MT_DEBUG_MUTEXES is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -CONFIG_MT_ENG_BUILD=y -CONFIG_RAMDISK_OFFSET=0xF00000 -# CONFIG_EARLY_LINUX_PORTING is not set -# CONFIG_MTK_MCI is not set -CONFIG_MTK_ETM=y - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -CONFIG_MT_LOAD_BALANCE_ENHANCEMENT=y -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -# CONFIG_MT_SCHED_DEBUG_ONLY is not set -CONFIG_MTK_COMPAT=y -CONFIG_MTK_CPU_TOPOLOGY=y -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -CONFIG_MTK_SCHED_RQAVG_US=y -CONFIG_MTK_SCHED_RQAVG_KS=y -CONFIG_MTK_STORAGE_PID_LOGGER=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -# CONFIG_MTK_TABLET_HARDWARE is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -CONFIG_MTK_CCCI_DEVICES=y -# CONFIG_MTK_CCCI_DRIVER is not set -# CONFIG_MTK_CCCI_EXT is not set -CONFIG_MTK_ECCCI_DRIVER=y -CONFIG_MTK_ECCCI_CLDMA=y -CONFIG_MTK_ECCCI_CCIF=y -# CONFIG_MTK_ECCCI_UT is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -# CONFIG_MTK_NET_CCMNI is not set -CONFIG_MTK_ENABLE_MD1=y -CONFIG_MTK_MD1_SUPPORT=5 -CONFIG_MD1_SIZE=0x5000000 -CONFIG_MD1_SMEM_SIZE=0x200000 -# CONFIG_MTK_ENABLE_MD2 is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -# CONFIG_MTK_LTE_SUPPORT is not set -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -# CONFIG_MTK_DITHERING_SUPPORT is not set -CONFIG_MTK_LCM_PHYSICAL_ROTATION="" -CONFIG_LCM_HEIGHT="1920" -CONFIG_LCM_WIDTH="1080" -# CONFIG_MTK_OVERLAY_ENGINE_SUPPORT is not set -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -# CONFIG_LCM_SEND_CMD_IN_VIDEO is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_8127 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_6752=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6625_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -# CONFIG_MTK_IDLE_TIME_FIX is not set -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -CONFIG_MTK_MJC_DRIVER=y -CONFIG_MTK_I2C=y -CONFIG_MTK_AP_TO_SCP_I2C=y -CONFIG_MTK_SPI=y -# CONFIG_MTK_CMMB is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -# CONFIG_KEYBOARD_HID is not set -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -CONFIG_MTK_BQ24261_SUPPORT=y -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_MAX8971_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -# CONFIG_MTK_SOUND is not set -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -CONFIG_MTK_CM36652_NEW=y -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_BMA250 is not set -CONFIG_MTK_MPU6515A=y -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU3000_NEW is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6515G=y -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -CONFIG_MTK_YAS532=y -CONFIG_MTK_BMP180_NEW=y -CONFIG_MTK_TOUCHPANEL=y -# CONFIG_MTK_S7020 is not set -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -# CONFIG_LEDS_RT8542 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -CONFIG_USB_MTK_DEBUG_FS=y -CONFIG_USB_MTK_DEBUG=y -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -# CONFIG_MTK_STAGING is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -CONFIG_MTK_EMMC_CACHE=y -# CONFIG_MTK_GPU_SUPPORT is not set -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -CONFIG_MTK_HDMI_SUPPORT=y -# CONFIG_MTK_INTERNAL_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="Sii8348" -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_INTERNAL_MHL_SUPPORT is not set -CONFIG_MTK_THERMAL_PA_VIA_ATCMD=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -# CONFIG_MTK_VIDEO_HEVC_SUPPORT is not set -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -# CONFIG_MTK_LENS_DUMMYLENS_SUPPORT is not set -CONFIG_MTK_LENS_AD5820AF_SUPPORT=y -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -CONFIG_MTK_LENS_BU64745GWZAF_SUPPORT=y -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -CONFIG_MTK_LENS_DW9714AF_SUPPORT=y -# CONFIG_MTK_LENS_DW9714A_SUPPORT is not set -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -# CONFIG_MTK_LENS_FM50AF_SUPPORT is not set -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCB032GWZ_3_SUPPORT is not set -CONFIG_MTK_CPU_STRESS=y -CONFIG_MTK_LASTPC=y -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -CONFIG_MTK_CMDQ=y -CONFIG_MTK_VIDEOX=y -CONFIG_MTK_MT_LOGGER=y -# CONFIG_MTK_CONN_MD is not set -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -# CONFIG_MTK_FLASHLIGHT is not set -# CONFIG_MTK_DUM_CHAR is not set -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -# CONFIG_MTK_SOUND_DRV is not set -CONFIG_MTK_POWER_GS=y -# CONFIG_MTK_VIDEO is not set -# CONFIG_MTK_MRDUMP is not set -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_DEBUG=y -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_EGALAX is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_MTK=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX is not set -CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT_SCP=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_MAX1187X is not set -# CONFIG_TOUCHSCREEN_MTK_GT9XXTB_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_TOUCHSCREEN_S7020 is not set -# CONFIG_TOUCHSCREEN_MTK_GT9XX_2 is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_MTK_MMS244 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_W90X900 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_S3528 is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_KGDB_NMI is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_CONSOLE_POLL=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set - -# -# PCMCIA character devices -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -CONFIG_OF_GPIO=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_TS5500 is not set -# CONFIG_GPIO_GRGPIO is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -CONFIG_POWER_RESET=y -# CONFIG_POWER_RESET_GPIO is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_FB_SSD1307 is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_COMPRESS_OFFLOAD=y -CONFIG_SND_JACK=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_SEQ_DUMMY=y -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=y -CONFIG_SND_SEQ_HRTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_VERBOSE=y -CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_SND_RAWMIDI_SEQ=y -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -CONFIG_SND_SOC=y -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set -# CONFIG_MT_SND_SOC_V1 is not set -CONFIG_MT_SND_SOC_V2=y -# CONFIG_MT_SND_SOC_V3 is not set -CONFIG_MTK_SPEAKER=y -# CONFIG_MTK_NXP_TFA9890 is not set -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SIMPLE_CARD=y -CONFIG_SOUND_PRIME=y - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -CONFIG_HIDRAW=y -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -CONFIG_HID_MAGICMOUSE=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_SDHCI_PXAV3 is not set -# CONFIG_MMC_SDHCI_PXAV2 is not set -# CONFIG_MMC_SPI is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_RENESAS_TPU is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -# CONFIG_RTC_SYSTOHC is not set -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set -# CONFIG_RTC_DRV_SNVS is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_DEBUG is not set -# CONFIG_COMMON_CLK_SI5351 is not set - -# -# Hardware Spinlock drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_ARM_ARCH_TIMER=y -# CONFIG_MAILBOX is not set -CONFIG_IOMMU_SUPPORT=y -CONFIG_OF_IOMMU=y - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -CONFIG_MTK_GIC=y -CONFIG_MTK_EIC=y -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_USE_FOR_EXT23=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -CONFIG_EXT4_DEBUG=y -CONFIG_JBD=y -CONFIG_JBD_DEBUG=y -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -CONFIG_QUOTA_TREE=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -CONFIG_SLUB_DEBUG_ON=y -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_PROVE_LOCKING=y -CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_LOCKDEP=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_HAVE_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_DEBUG_LIST=y -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -CONFIG_FAULT_INJECTION=y -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -CONFIG_ENABLE_DEFAULT_TRACERS=y -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -CONFIG_DMA_API_DEBUG=y -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_KGDB=y -CONFIG_KGDB_SERIAL_CONSOLE=y -# CONFIG_KGDB_TESTS is not set -CONFIG_KGDB_KDB=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -CONFIG_EARLY_PRINTK=y -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_ABLK_HELPER=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_ARM64_CRYPTO=y -# CONFIG_CRYPTO_SHA1_ARM64_CE is not set -CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_GHASH_ARM64_CE is not set -CONFIG_CRYPTO_AES_ARM64_CE=y -# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -CONFIG_GATOR_DRIVER=y diff --git a/arch/arm64/configs/k6752v1_op02_pre_defconfig b/arch/arm64/configs/k6752v1_op02_pre_defconfig deleted file mode 100644 index a9ceae59c1b..00000000000 --- a/arch/arm64/configs/k6752v1_op02_pre_defconfig +++ /dev/null @@ -1,2973 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm64 3.10.54 Kernel Configuration -# -CONFIG_ARM64=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_64BIT=y -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_MMU=y -CONFIG_NO_IOPORT=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_GENERIC_LOCKBREAK=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_ARM_ERRATA_824069 is not set -CONFIG_KERNEL_MODE_NEON=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_FHANDLE is not set -CONFIG_AUDIT=y -# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set -CONFIG_HAVE_GENERIC_HARDIRQS=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_SPARSE_IRQ=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_PREEMPT_RCU=y -CONFIG_RCU_STALL_COMMON=y -CONFIG_RCU_FANOUT=32 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_BOOST is not set -# CONFIG_RCU_NOCB_CPU is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -# CONFIG_RESOURCE_COUNTERS is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -CONFIG_UIDGID_CONVERTED=y -# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_HOTPLUG=y -CONFIG_PANIC_TIMEOUT=1 -CONFIG_EXPERT=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_SLUB_DEBUG is not set -CONFIG_COMPAT_BRK=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -# CONFIG_JUMP_LABEL is not set -CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_USE_GENERIC_SMP_HELPERS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_COMPAT_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_STOP_MACHINE=y -CONFIG_BLOCK=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_BLOCK_COMPAT=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# Platform selection -# -# CONFIG_ARCH_VEXPRESS is not set -# CONFIG_ARCH_MT6735 is not set -CONFIG_ARCH_MT6752=y -# CONFIG_ARCH_MT6795 is not set - -# -# MTK Board Support Package -# -CONFIG_MTK_EVB_BOARD=y -# CONFIG_MTK_FPGA is not set -CONFIG_MTK_PSCI=y -CONFIG_MAX_DRAM_SIZE_SUPPORT=0x10000000 - -# -# Bus support -# -CONFIG_ARM_AMBA=y - -# -# Kernel Features -# -# CONFIG_ARM64_64K_PAGES is not set -CONFIG_SMP=y -CONFIG_ARM_CPU_TOPOLOGY=y -CONFIG_SCHED_MC=y -# CONFIG_SCHED_SMT is not set -# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set -# CONFIG_HEVTASK_INTERFACE is not set -# CONFIG_ARCH_SCALE_INVARIANT_CPU_CAPACITY is not set -CONFIG_NR_CPUS=8 -# CONFIG_SWP_EMULATE is not set -CONFIG_HOTPLUG_CPU=y -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ=100 -CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_HAVE_ARCH_PFN_VALID=y -# CONFIG_ARMV7_COMPAT is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -# CONFIG_BOUNCE is not set -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -# CONFIG_SECCOMP is not set - -# -# Boot options -# -CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O " -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y -CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES="k6752v1_op02_pre" - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEPLUS is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_BALANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set -# CONFIG_CPU_FREQ_GOV_BALANCE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -# CONFIG_CPU_FREQ_GOV_INTERACTIVEPLUS is not set -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_GOV_HOTPLUG is not set - -# -# ARM CPU frequency scaling drivers -# -# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set -# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_COMPAT_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y -CONFIG_COMPAT=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_HAS_SBSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -CONFIG_FB_EARLYSUSPEND=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_TOI_CORE=y - -# -# Image Storage (you need at least one allocator) -# -# CONFIG_TOI_FILE is not set -CONFIG_TOI_SWAP=y - -# -# General Options -# -CONFIG_TOI_CRYPTO=y -CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2 -# CONFIG_TOI_KEEP_IMAGE is not set -CONFIG_TOI_REPLACE_SWSUSP=y -# CONFIG_TOI_IGNORE_LATE_INITCALL is not set -CONFIG_TOI_DEFAULT_WAIT=2 -CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=2000 -# CONFIG_TOI_CHECKSUM is not set -CONFIG_TOI=y -CONFIG_TOI_ZRAM_SUPPORT=y -CONFIG_TOI_FIXUP=y -CONFIG_TOI_ENHANCE=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_WAKELOCKS_LIMIT=100 -CONFIG_PM_WAKELOCKS_GC=y -# CONFIG_PM_RUNTIME is not set -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -CONFIG_PM_CLK=y -# CONFIG_SUSPEND_TIME is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM64_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_COMPAT_NETLINK_MESSAGES=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=y -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -# CONFIG_IP_FIB_TRIE_STATS is not set -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_ROUTE_CLASSID=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=y -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_IPV6_MIP6=y -CONFIG_INET6_XFRM_TUNNEL=y -CONFIG_INET6_TUNNEL=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -CONFIG_INET6_XFRM_MODE_BEET=y -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y -CONFIG_IPV6_SIT=y -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=y -# CONFIG_IPV6_GRE is not set -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -CONFIG_MTK_DHCPV6C_WIFI=y -# CONFIG_NETLABEL is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_CONNTRACK_MARK=y -# CONFIG_NF_CONNTRACK_SECMARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -# CONFIG_NF_CT_PROTO_DCCP is not set -CONFIG_NF_CT_PROTO_GRE=y -# CONFIG_NF_CT_PROTO_SCTP is not set -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=y -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -CONFIG_NF_CONNTRACK_PPTP=y -# CONFIG_NF_CONNTRACK_SANE is not set -CONFIG_NF_CONNTRACK_SIP=y -CONFIG_NF_CONNTRACK_TFTP=y -CONFIG_NF_CT_NETLINK=y -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set -CONFIG_NF_NAT=y -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_FTP=y -# CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_SIP=y -CONFIG_NF_NAT_TFTP=y -CONFIG_NETFILTER_TPROXY=y -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -CONFIG_NETFILTER_XT_MARK=y -CONFIG_NETFILTER_XT_CONNMARK=y - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_CT is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -CONFIG_NETFILTER_XT_TARGET_HL=y -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NETMAP=y -CONFIG_NETFILTER_XT_TARGET_NFLOG=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -CONFIG_NETFILTER_XT_TARGET_REDIRECT=y -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set -CONFIG_NETFILTER_XT_TARGET_TCPMSS=y -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -CONFIG_NETFILTER_XT_MATCH_IPRANGE=y -CONFIG_NETFILTER_XT_MATCH_LENGTH=y -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -CONFIG_NETFILTER_XT_MATCH_MARK=y -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -CONFIG_NETFILTER_XT_MATCH_POLICY=y -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -CONFIG_NETFILTER_XT_MATCH_QTAGUID=y -CONFIG_NETFILTER_XT_MATCH_QUOTA=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2=y -CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -CONFIG_NETFILTER_XT_MATCH_REALM=y -CONFIG_NETFILTER_XT_MATCH_RECENT=y -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_SOCKET=y -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STATISTIC=y -CONFIG_NETFILTER_XT_MATCH_STRING=y -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y -CONFIG_NETFILTER_XT_MATCH_TIME=y -CONFIG_NETFILTER_XT_MATCH_U32=y -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_NF_NAT_IPV4=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_NF_NAT_PROTO_GRE=y -CONFIG_NF_NAT_PPTP=y -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_MANGLE=y -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -CONFIG_IP_NF_RAW=y -# CONFIG_IP_NF_SECURITY is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=y -CONFIG_NF_CONNTRACK_IPV6=y -CONFIG_IP6_NF_IPTABLES=y -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -CONFIG_IP6_NF_MATCH_FRAG=y -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_IPV6HEADER=y -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_TARGET_HL=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -# CONFIG_IP6_NF_SECURITY is not set -# CONFIG_NF_NAT_IPV6 is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=y -CONFIG_BRIDGE=y -CONFIG_BRIDGE_IGMP_SNOOPING=y -# CONFIG_BRIDGE_VLAN_FILTERING is not set -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=y -# CONFIG_VLAN_8021Q_GVRP is not set -# CONFIG_VLAN_8021Q_MVRP is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -CONFIG_NET_SCHED=y - -# -# Queueing/Scheduling -# -# CONFIG_NET_SCH_CBQ is not set -CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set -# CONFIG_NET_SCH_PRIO is not set -# CONFIG_NET_SCH_MULTIQ is not set -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set -# CONFIG_NET_SCH_NETEM is not set -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set -CONFIG_NET_CLS_FW=y -CONFIG_NET_CLS_U32=y -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -# CONFIG_NET_CLS_RSVP is not set -# CONFIG_NET_CLS_RSVP6 is not set -CONFIG_NET_CLS_FLOW=y -# CONFIG_NET_CLS_CGROUP is not set -# CONFIG_NET_EMATCH is not set -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=y -# CONFIG_NET_ACT_GACT is not set -CONFIG_NET_ACT_MIRRED=y -CONFIG_NET_ACT_IPT=y -# CONFIG_NET_ACT_NAT is not set -# CONFIG_NET_ACT_PEDIT is not set -# CONFIG_NET_ACT_SIMP is not set -# CONFIG_NET_ACT_SKBEDIT is not set -# CONFIG_NET_ACT_CSUM is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_DCB is not set -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set -CONFIG_BQL=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NET_DROP_MONITOR=y -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -# CONFIG_CFG80211_REG_DEBUG is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -# CONFIG_LIB80211 is not set -# CONFIG_CFG80211_ALLOW_RECONNECT is not set -# CONFIG_MAC80211 is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -# CONFIG_MTK_NET_LOGGING is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_FW_LOADER_USER_HELPER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_HAVE_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_DMA_SHARED_BUFFER=y - -# -# Bus devices -# -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_UBI is not set -CONFIG_DTC=y -CONFIG_OF=y - -# -# Device Tree and Open Firmware support -# -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_OF_SELFTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_IRQ=y -CONFIG_OF_DEVICE=y -CONFIG_OF_I2C=y -CONFIG_OF_NET=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_BLK_DEV_RBD is not set - -# -# Misc devices -# -# CONFIG_ANDROID_PMEM is not set -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_ATMEL_PWM is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ATMEL_SSC is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -CONFIG_UID_STAT=y -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set -CONFIG_MEDIATEK_SOLUTION=y -CONFIG_MTK_PLATFORM="mt6752" -CONFIG_ARCH_MTK_PROJECT="k6752v1_op02_pre" -CONFIG_MTK_INTERNAL=y -CONFIG_MTK_CIRQ=y -CONFIG_MTK_SYSTRACKER=y -CONFIG_MTK_L2C_SHARE=y -CONFIG_HAVE_AEE_FEATURE=y -CONFIG_HAVE_XLOG_FEATURE=y -# CONFIG_FPGA_EARLY_PORTING is not set -CONFIG_MTK_EMMC_SUPPORT=y -CONFIG_MTK_NEW_COMBO_EMMC_SUPPORT=y -CONFIG_MTK_GPT_SCHEME_SUPPORT=y -CONFIG_MTK_SHARED_SDCARD=y -CONFIG_MTK_MULTI_STORAGE_SUPPORT=y -# CONFIG_MTK_MULTI_PARTITION_MOUNT_ONLY_SUPPORT is not set -CONFIG_MTK_SECURITY_SW_SUPPORT=y -# CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT is not set -# CONFIG_HAVE_TRUSTONIC_TEE_SUPPORT is not set -# CONFIG_MTK_THERMAL_STATUS_COLLECTION is not set -CONFIG_MD32_SUPPORT=y -# CONFIG_MTK_MEMCFG is not set -# CONFIG_MTK_DT_SUPPORT is not set -# CONFIG_EVDO_DT_SUPPORT is not set -# CONFIG_EVDO_DT_VIA_SUPPORT is not set -CONFIG_MTK_SMARTBOOK_SUPPORT=y -CONFIG_MTK_SENSOR_SUPPORT=y -# CONFIG_MTK_AUTO_DETECT_ACCELEROMETER is not set -# CONFIG_MTK_AUTO_DETECT_MAGNETOMETER is not set -# CONFIG_MTK_AUTO_DETECT_ALSPS is not set -CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y -CONFIG_CUSTOM_KERNEL_GYROSCOPE=y -CONFIG_CUSTOM_KERNEL_ALSPS=y -# CONFIG_CUSTOM_SEC_AUTH_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_MAGNETOMETER=y -CONFIG_CUSTOM_KERNEL_BAROMETER=y -CONFIG_CUSTOM_KERNEL_IMGSENSOR="imx135_mipi_raw ov5648_mipi_raw s5k2p8_mipi_raw" -CONFIG_CUSTOM_KERNEL_LCM="nt35595_fhd_dsi_cmd_truly_nt50358" -CONFIG_CUSTOM_KERNEL_FLASHLIGHT="constant_flashlight" -CONFIG_CUSTOM_KERNEL_EXTMD="" -CONFIG_CUSTOM_KERNEL_SSW="ssw_generic_v2" -# CONFIG_MTK_FORCE_CLUSTER1 is not set -CONFIG_MTK_MMPROFILE_SUPPORT=y -CONFIG_MTK_HIBERNATION=y -# CONFIG_CUSTOM_KERNEL_CHARGEPUMP is not set -# CONFIG_MTK_TC1_FEATURE is not set - -# -# Kernel Configurations -# - -# -# MTK Cluster MultiProcessor Scheduler -# -CONFIG_MTK_SCHED_CMP=y -CONFIG_MTK_SCHED_CMP_TGS=y -CONFIG_MTK_SCHED_CMP_TGS_WAKEUP=y -# CONFIG_MTK_SCHED_CMP_PACK_SMALL_TASK is not set - -# -# Tracer Related -# -# CONFIG_MTK_SCHED_TRACERS is not set -# CONFIG_MTK_KERNEL_MARKER is not set -# CONFIG_MT65XX_TRACER is not set -# CONFIG_GENERIC_TRACER is not set - -# -# MET -# -CONFIG_MTK_MET=y -CONFIG_MTK_MET_PLF=y - -# -# MTPROF tools -# -CONFIG_MTK_MUTATION=y -CONFIG_MTPROF_CPUTIME=y -# CONFIG_MTPROF_IRQ_DURATION is not set -CONFIG_MTK_AEE_FEATURE=y -CONFIG_MTK_AEE_AED=y -CONFIG_MTK_AEE_IPANIC=y -CONFIG_MTK_AEE_POWERKEY_HANG_DETECT=y -# CONFIG_MTK_AEE_MRDUMP is not set -# CONFIG_ANDROID_VMEM is not set -# CONFIG_CPUTIME_SUPPORT is not set -# CONFIG_CPUTIME_STATS is not set -CONFIG_MTK_RAM_CONSOLE=y -# CONFIG_MTK_RAM_CONSOLE_USING_SRAM is not set -CONFIG_MTK_RAM_CONSOLE_USING_DRAM=y -CONFIG_MTK_RAM_CONSOLE_SIZE=0x4000 -CONFIG_MTK_RAM_CONSOLE_ADDR=0xF912c000 -CONFIG_MTK_RAM_CONSOLE_DRAM_SIZE=0x10000 -CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x43F00000 -# CONFIG_PREEMPT_MONITOR is not set -# CONFIG_ISR_MONITOR is not set -# CONFIG_MT_SCHED_MONITOR is not set -# CONFIG_MT_CHRDEV_REG is not set -# CONFIG_MT_LOCK_DEBUG is not set -CONFIG_PRINTK_PROCESS_INFO=y -CONFIG_MT_PRINTK_UART_CONSOLE=y -# CONFIG_MT_ENG_BUILD is not set -CONFIG_RAMDISK_OFFSET=0xF00000 -# CONFIG_EARLY_LINUX_PORTING is not set -# CONFIG_MTK_MCI is not set -CONFIG_MTK_ETM=y - -# -# MT load balance and schedule enhancement -# -CONFIG_MT_SCHED=y -CONFIG_MT_LOAD_BALANCE_ENHANCEMENT=y -# CONFIG_MT_LOAD_BALANCE_PROFILER is not set -# CONFIG_MT_SCHED_NOTICE is not set -CONFIG_MTK_CPU_TOPOLOGY=y -# CONFIG_MT_PRIO_TRACER is not set -# CONFIG_MTK_WQ_DEBUG is not set -CONFIG_MTK_SCHED_RQAVG_US=y -CONFIG_MTK_SCHED_RQAVG_KS=y -CONFIG_MTK_STORAGE_PID_LOGGER=y -CONFIG_MTK_COMPAT=y - -# -# MTK Large Memory mode support -# -# CONFIG_MTK_LM_MODE is not set -# CONFIG_MTK_TABLET_HARDWARE is not set -# CONFIG_MTK_IPV6_TETHER_NDP_MODE is not set -# CONFIG_MTK_EMMC_SUPPORT_OTP is not set -CONFIG_MTK_TETHERINGIPV6_SUPPORT=y - -# -# Drivers Configurations -# -CONFIG_MTK_ACCDET=y -CONFIG_MTK_CCCI_DEVICES=y -# CONFIG_MTK_CCCI_DRIVER is not set -# CONFIG_MTK_CCCI_EXT is not set -CONFIG_MTK_ECCCI_DRIVER=y -CONFIG_MTK_ECCCI_CLDMA=y -CONFIG_MTK_ECCCI_CCIF=y -# CONFIG_MTK_ECCCI_UT is not set -# CONFIG_MTK_MD_LOW_BAT_SUPPORT is not set -# CONFIG_MTK_NET_CCMNI is not set -CONFIG_MTK_ENABLE_MD1=y -CONFIG_MTK_MD1_SUPPORT=5 -CONFIG_MD1_SIZE=0x5000000 -CONFIG_MD1_SMEM_SIZE=0x200000 -# CONFIG_MTK_ENABLE_MD2 is not set -CONFIG_MTK_MD_SBP_CUSTOM_VALUE="" -CONFIG_MTK_MD2_SBP_CUSTOM_VALUE="" -# CONFIG_MTK_UMTS_TDD128_MODE is not set -# CONFIG_MTK_EMCI_DEVICES is not set -CONFIG_MTK_EXTERNAL_MODEM_SLOT="" -# CONFIG_MTK_SWITCH_TX_POWER is not set -CONFIG_MTK_LTE_SUPPORT=y -CONFIG_MTK_FB=y -CONFIG_MTK_FB_SUPPORT_ASSERTION_LAYER=y -# CONFIG_MTK_DITHERING_SUPPORT is not set -CONFIG_MTK_LCM_PHYSICAL_ROTATION="" -CONFIG_LCM_HEIGHT="1920" -CONFIG_LCM_WIDTH="1080" -# CONFIG_MTK_OVERLAY_ENGINE_SUPPORT is not set -# CONFIG_MTK_TVOUT_SUPPORT is not set -# CONFIG_MIXMODE_FOR_INCELL is not set -CONFIG_GPS=y -CONFIG_MTK_GPS=y -CONFIG_MTK_NFC=y -CONFIG_NFC_MT6605=y -# CONFIG_NFC_MSR3110 is not set -CONFIG_MTK_BTIF=y -CONFIG_MTK_COMBO=y -# CONFIG_MTK_COMBO_CHIP_MT6620 is not set -# CONFIG_MTK_COMBO_CHIP_MT6628 is not set -# CONFIG_MTK_COMBO_CHIP_MT6630 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6572 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_6582 is not set -# CONFIG_MTK_COMBO_CHIP_CONSYS_8127 is not set -CONFIG_MTK_COMBO_CHIP_CONSYS_6752=y -# CONFIG_MTK_COMBO_CHIP_CONSYS_6592 is not set -CONFIG_MTK_COMBO_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_CHIP="CONSYS_6752" -CONFIG_MTK_WLAN_SUPPORT=y -CONFIG_MTK_WAPI_SUPPORT=y -CONFIG_MTK_PASSPOINT_R1_SUPPORT=y -# CONFIG_MTK_PASSPOINT_R2_SUPPORT is not set -CONFIG_MTK_COMBO_PLAT_PATH="" -# CONFIG_MTK_COMBO_COMM is not set -CONFIG_MTK_COMBO_BT=y -# CONFIG_MTK_COMBO_ANT is not set -CONFIG_MTK_COMBO_GPS=y -CONFIG_MTK_GPS_SUPPORT=y -CONFIG_MTK_COMBO_WIFI=y -CONFIG_MTK_BT_SUPPORT=y -CONFIG_MTK_WFD_SUPPORT=y -CONFIG_MTK_FM=y -CONFIG_MTK_FM_SUPPORT=y -CONFIG_MTK_FM_CHIP="MT6625_FM" -# CONFIG_MTK_FM_50KHZ_SUPPORT is not set -# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set -# CONFIG_SDIOAUTOK_SUPPORT is not set -CONFIG_MTK_MT6306_SUPPORT=y -# CONFIG_MTK_IDLE_TIME_FIX is not set -CONFIG_MTK_G2D=y -CONFIG_MTK_MPEG4_DEC_DRIVER=y -CONFIG_MTK_MPEG4_ENC_DRIVER=y -CONFIG_MTK_H264_DEC_DRIVER=y -CONFIG_MTK_MFLEXVIDEO_DRIVER=y -CONFIG_MTK_VIDEOCODEC_DRIVER=y -CONFIG_MTK_MJC_DRIVER=y -CONFIG_MTK_I2C=y -CONFIG_MTK_AP_TO_SCP_I2C=y -CONFIG_MTK_SPI=y -# CONFIG_MTK_CMMB is not set -CONFIG_MTK_JPEG=y -CONFIG_MTK_KEYPAD=y -# CONFIG_KEYBOARD_HID is not set -CONFIG_MTK_LEDS=y -CONFIG_MTK_MMC=y -# CONFIG_MTK_SDIOAUTOK_SUPPORT is not set - -# -# MediaTek OFN / Jogball Related Drivers -# -# CONFIG_MOUSE_PANASONIC_EVQWJN is not set -# CONFIG_MOUSE_AVAGOTECH_A320 is not set -CONFIG_MTK_SMART_BATTERY=y -CONFIG_MTK_PMIC=y -CONFIG_MTK_PMIC_WRAP=y -# CONFIG_MTK_PMIC_MT6397 is not set -# CONFIG_POWER_EXT is not set -# CONFIG_MTK_POWER_EXT_DETECT is not set -# CONFIG_MTK_PUMP_EXPRESS_SUPPORT is not set -# CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT is not set -# CONFIG_MTK_VOW_SUPPORT is not set -# CONFIG_MTK_EXTERNAL_LDO is not set -# CONFIG_X2_BQ27531_SUPPORT is not set -# CONFIG_MTK_BQ24250_SUPPORT is not set -CONFIG_MTK_BQ24261_SUPPORT=y -# CONFIG_MTK_BQ24196_SUPPORT is not set -# CONFIG_MTK_FAN5405_SUPPORT is not set -# CONFIG_MTK_FAN5402_SUPPORT is not set -# CONFIG_MTK_BQ24158_SUPPORT is not set -# CONFIG_MTK_BQ24296_SUPPORT is not set -# CONFIG_MTK_BQ27541_SUPPORT is not set -# CONFIG_MTK_NCP1851_SUPPORT is not set -# CONFIG_MTK_NCP1854_SUPPORT is not set -# CONFIG_MTK_RT9536_SUPPORT is not set -# CONFIG_MTK_DUAL_INPUT_CHARGER_SUPPORT is not set -# CONFIG_MTK_WIRELESS_CHARGER_SUPPORT is not set -# CONFIG_MTK_JEITA_STANDARD_SUPPORT is not set -CONFIG_MTK_RTC=y -CONFIG_MTK_SERIAL=y -CONFIG_MTK_SERIAL_CONSOLE=y -# CONFIG_MTK_SERIAL_MODEM_TEST is not set -# CONFIG_MTK_UART_USB_SWITCH is not set -CONFIG_MTK_SIM2=y -# CONFIG_MTK_SOUND is not set -# CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set -# CONFIG_MTK_CM36283 is not set -# CONFIG_MTK_GP2AP002S00F is not set -# CONFIG_MTK_APM_16D is not set -# CONFIG_MTK_EPL2182 is not set -# CONFIG_MTK_EPL2182_NEW is not set -# CONFIG_MTK_STK3X1X is not set -CONFIG_MTK_CM36652_NEW=y -# CONFIG_MTK_APDS9930 is not set -# CONFIG_MTK_CM3232_NEW is not set -# CONFIG_MTK_APDS9930_NEW is not set -# CONFIG_MTK_KXTJ2_1009 is not set -# CONFIG_MTK_KXTIK1004 is not set -# CONFIG_MTK_K2DH is not set -# CONFIG_MTK_BMA222E is not set -# CONFIG_MTK_BMA222E_NEW is not set -# CONFIG_MTK_MPU6050G_NEW is not set -# CONFIG_MTK_BMA250 is not set -CONFIG_MTK_MPU6515A=y -# CONFIG_MTK_KXTJ2_1009_NEW is not set -# CONFIG_MTK_BMA250E is not set -# CONFIG_MTK_MPU3050C is not set -# CONFIG_MTK_MPU3000 is not set -# CONFIG_MTK_MPU6050GY_NEW is not set -CONFIG_MTK_MPU6515G=y -# CONFIG_MTK_MPU3050C_NEW is not set -# CONFIG_MTK_AKM8963 is not set -# CONFIG_MTK_AKM8963_NEW is not set -# CONFIG_MTK_HSCDTD006 is not set -# CONFIG_MTK_BMM050 is not set -# CONFIG_MTK_BMM050_NEW is not set -# CONFIG_MTK_MMC3416X is not set -# CONFIG_MTK_BMA050 is not set -# CONFIG_MTK_BMA050_NEW is not set -# CONFIG_MTK_S2200 is not set -CONFIG_MTK_YAS532=y -CONFIG_MTK_BMP180_NEW=y -CONFIG_MTK_TOUCHPANEL=y -CONFIG_MTK_USB_GADGET=y -# CONFIG_USB_MU3D_PIO_ONLY is not set -# CONFIG_USB_MU3D_DRV is not set -# CONFIG_USB_MU3D_DVT is not set -# CONFIG_MU3_PHY is not set -# CONFIG_MTK_XHCI is not set -# CONFIG_MTK_OTG_PMIC_BOOST_5V is not set -# CONFIG_MTK_TEST_XHCI is not set -# CONFIG_USBIF_COMPLIANCE is not set -# CONFIG_MTK_S3320 is not set -# CONFIG_MTK_S3320_47 is not set -# CONFIG_LEDS_LM3632 is not set -# CONFIG_LEDS_LM3639 is not set -CONFIG_MTK_VIBRATOR=y -CONFIG_MTK_WD_KICKER=y -# CONFIG_MT592X_SDIO_CLNT is not set -CONFIG_USB_MTK_ACM_TEMP=y -CONFIG_USB_MTK_HDRC=y -CONFIG_USB_MTK_HDRC_GADGET=y -CONFIG_USB_MTK_OTG=y -# CONFIG_USB_MTK_DUALMODE is not set -# CONFIG_USB_MTK_DEBUG_FS is not set -# CONFIG_USB_MTK_DEBUG is not set -CONFIG_USB_MTK_HDRC_HCD=y -# CONFIG_MTK_USB_UNIQUE_SERIAL is not set -# CONFIG_MTK_USBFSH is not set -# CONFIG_MUSBFSH_PIO_ONLY is not set -CONFIG_AMPC_CDEV_NUM=151 -CONFIG_ION_MTK=y -CONFIG_MMPROFILE=y -# CONFIG_MTK_STAGING is not set -# CONFIG_PWR_LOSS_MTK_TEST is not set -CONFIG_MTK_EMMC_CACHE=y -# CONFIG_MTK_GPU_SUPPORT is not set -# CONFIG_MTK_ICUSB_SUPPORT is not set -# CONFIG_MTK_DT_USB_SUPPORT is not set -# CONFIG_MTK_SWCHR_SUPPORT is not set -# CONFIG_MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION is not set -CONFIG_MTK_KERNEL_POWER_OFF_CHARGING=y -# CONFIG_MTK_BQ24160_SUPPORT is not set -# CONFIG_MTK_MT8193_SUPPORT is not set -CONFIG_MTK_HDMI_SUPPORT=y -# CONFIG_MTK_INTERNAL_HDMI_SUPPORT is not set -# CONFIG_MTK_MT8193_HDCP_SUPPORT is not set -CONFIG_CUSTOM_KERNEL_HDMI="Sii8348" -# CONFIG_SINGLE_PANEL_OUTPUT is not set -# CONFIG_MTK_INTERNAL_MHL_SUPPORT is not set -CONFIG_MTK_THERMAL_PA_VIA_ATCMD=y -CONFIG_MTK_SIM1_SOCKET_TYPE="1" -CONFIG_MTK_SIM2_SOCKET_TYPE="1" -# CONFIG_MTK_SEC_MODEM_NVRAM_ANTI_CLONE is not set -# CONFIG_MTK_MT6333_SUPPORT is not set -# CONFIG_MTK_CTP_RESET_CONFIG is not set -CONFIG_MTK_BICR_SUPPORT=y -# CONFIG_MTK_VIDEO_HEVC_SUPPORT is not set -CONFIG_MTK_AAL_SUPPORT=y -# CONFIG_MTK_MULTIBRIDGE_SUPPORT is not set -# CONFIG_NAND_OTP_SUPPORT is not set -# CONFIG_MTK_OD_SUPPORT is not set -# CONFIG_MTK_LENS_DUMMYLENS_SUPPORT is not set -CONFIG_MTK_LENS_AD5820AF_SUPPORT=y -# CONFIG_MTK_LENS_AD5823_SUPPORT is not set -# CONFIG_MTK_LENS_AD5823AF_SUPPORT is not set -# CONFIG_MTK_LENS_AK7345AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6424AF_SUPPORT is not set -# CONFIG_MTK_LENS_BU6429AF_SUPPORT is not set -# CONFIG_MTK_LENS_DW9718AF_SUPPORT is not set -CONFIG_MTK_LENS_DW9714AF_SUPPORT=y -CONFIG_MTK_LENS_BU64745GWZAF_SUPPORT=y -# CONFIG_MTK_LENS_LC898122AF_SUPPORT is not set -# CONFIG_MTK_LENS_LC898212AF_SUPPORT is not set -# CONFIG_MTK_LENS_FM50AF_SUPPORT is not set -# CONFIG_MTK_LENS_MT9P017AF_SUPPORT is not set -# CONFIG_MTK_LENS_OV8825AF_SUPPORT is not set -# CONFIG_MTK_LENS_SENSORDRIVE_SUPPORT is not set -# CONFIG_MTK_LENS_GAF001AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF002AF_SUPPORT is not set -# CONFIG_MTK_LENS_GAF008AF_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_GT24C32A_SUPPORT is not set -# CONFIG_MTK_CAM_CAL_BRCC064GWZ_3_SUPPORT is not set -CONFIG_MTK_CPU_STRESS=y -CONFIG_MTK_LASTPC=y -CONFIG_MTK_FMRADIO=y -CONFIG_MTK_HWMON=y -CONFIG_MTK_CMDQ=y -CONFIG_MTK_VIDEOX=y -CONFIG_MTK_MT_LOGGER=y -# CONFIG_MTK_CONN_MD is not set -CONFIG_MTK_LENS=y -CONFIG_MTK_IMGSENSOR=y -# CONFIG_MTK_FLASHLIGHT is not set -# CONFIG_MTK_DUM_CHAR is not set -CONFIG_MTK_SYSENV=y -CONFIG_MTK_SMI=y -CONFIG_MTK_BTCVSD=y -# CONFIG_MTK_SOUND_DRV is not set -CONFIG_MTK_POWER_GS=y -# CONFIG_MTK_VIDEO is not set -# CONFIG_MTK_MRDUMP is not set -# CONFIG_MTK_WMT_CCCI is not set -# CONFIG_MTK_VCOREFS is not set -CONFIG_MTK_EMI_MPU=y -CONFIG_MTK_EMI_BWL=y - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -CONFIG_SCSI_TGT=y -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -# CONFIG_BCACHE is not set -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=y -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_THIN_PROVISIONING is not set -# CONFIG_DM_CACHE is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_RAID is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set -# CONFIG_DM_DELAY is not set -CONFIG_DM_UEVENT=y -# CONFIG_DM_FLAKEY is not set -# CONFIG_DM_VERITY is not set -# CONFIG_TARGET_CORE is not set -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_MII is not set -CONFIG_IFB=y -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -# CONFIG_VETH is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6060 is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -# CONFIG_NET_DSA_MV88E6131 is not set -# CONFIG_NET_DSA_MV88E6123_61_65 is not set -# CONFIG_ETHERNET is not set -# CONFIG_PHYLIB is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=y -CONFIG_PPP_BSDCOMP=y -CONFIG_PPP_DEFLATE=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=y -CONFIG_PPPOLAC=y -CONFIG_PPPOPNS=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -# CONFIG_SLIP is not set -CONFIG_SLHC=y - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_RTL8152 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_IPHETH is not set -CONFIG_WLAN=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_WIFI_CONTROL_FUNC is not set -# CONFIG_ATH_CARDS is not set -# CONFIG_BRCMFMAC is not set -# CONFIG_HOSTAP is not set -# CONFIG_LIBERTAS is not set -# CONFIG_WL_TI is not set -# CONFIG_MWIFIEX is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set -# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_TOUCHSCREEN_BU21013 is not set -# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set -# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_EGALAX is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_ILI210X is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_WACOM_I2C is not set -# CONFIG_TOUCHSCREEN_MAX11801 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MMS114 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_MTK=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX is not set -CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT_SCP=y -# CONFIG_TOUCHSCREEN_MTK_GT9XX_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_GT9XXTB_HOTKNOT is not set -# CONFIG_TOUCHSCREEN_MTK_GT818B_FPGA is not set -# CONFIG_TOUCHSCREEN_S7020 is not set -# CONFIG_MTK_GT9XX is not set -# CONFIG_GT9XX_2 is not set -# CONFIG_GT9XX_HOTKNOT_FLASHLESS is not set -# CONFIG_MTK_FT5406 is not set -# CONFIG_MTK_FT5406_82 is not set -# CONFIG_MTK_FT5206 is not set -# CONFIG_MTK_MMS134 is not set -# CONFIG_MTK_MMS128 is not set -# CONFIG_MTK_S7020 is not set -# CONFIG_MTK_MIT200 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_PIXCIR is not set -# CONFIG_TOUCHSCREEN_MTK_FTS2A052 is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC_SERIO is not set -# CONFIG_TOUCHSCREEN_TSC2005 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_W90X900 is not set -# CONFIG_TOUCHSCREEN_ST1232 is not set -# CONFIG_TOUCHSCREEN_TPS6507X is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -# CONFIG_VT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -# CONFIG_DEVMEM is not set -# CONFIG_DEVKMEM is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_TIMBERDALE is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set - -# -# PCMCIA character devices -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -# CONFIG_I2C_CHARDEV is not set -# CONFIG_I2C_MUX is not set -CONFIG_I2C_HELPER_AUTO=y - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -# CONFIG_SPI_OC_TINY is not set -# CONFIG_SPI_PL022 is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -# CONFIG_PTP_1588_CLOCK_PCH is not set -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIOLIB=y -CONFIG_OF_GPIO=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO drivers: -# -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_TS5500 is not set -# CONFIG_GPIO_GRGPIO is not set - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_74X164 is not set - -# -# AC97 GPIO expanders: -# - -# -# MODULbus GPIO expanders: -# - -# -# USB GPIO expanders: -# -# CONFIG_W1 is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27x00 is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GOLDFISH is not set -CONFIG_POWER_RESET=y -# CONFIG_POWER_RESET_GPIO is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_BACKWARD_COMPATIBLE=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_CPU_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set - -# -# Graphics support -# -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_GOLDFISH is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_EXYNOS_VIDEO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_ADF is not set - -# -# Console display driver support -# -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_FB_SSD1307 is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_COMPRESS_OFFLOAD=y -CONFIG_SND_JACK=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_SEQ_DUMMY=y -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=y -CONFIG_SND_SEQ_HRTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_VERBOSE=y -CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_SND_RAWMIDI_SEQ=y -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -CONFIG_SND_SOC=y -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set -# CONFIG_MT_SND_SOC_V1 is not set -CONFIG_MT_SND_SOC_V2=y -# CONFIG_MT_SND_SOC_V3 is not set -CONFIG_MTK_SPEAKER=y -# CONFIG_MTK_NXP_TFA9890 is not set -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SIMPLE_CARD=y -CONFIG_SOUND_PRIME=y - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -CONFIG_HIDRAW=y -CONFIG_UHID=y -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_PRODIKEYS is not set -CONFIG_HID_CYPRESS=y -CONFIG_HID_DRAGONRISE=y -# CONFIG_DRAGONRISE_FF is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_KEYTOUCH is not set -CONFIG_HID_KYE=y -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -CONFIG_HID_GYRATION=y -# CONFIG_HID_ICADE is not set -CONFIG_HID_TWINHAN=y -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO_TPKBD is not set -CONFIG_HID_LOGITECH=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -CONFIG_HID_MAGICMOUSE=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -CONFIG_HID_PANTHERLORD=y -# CONFIG_PANTHERLORD_FF is not set -CONFIG_HID_PETALYNX=y -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_PS3REMOTE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -CONFIG_HID_SAMSUNG=y -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -CONFIG_HID_SUNPLUS=y -CONFIG_HID_GREENASIA=y -# CONFIG_GREENASIA_FF is not set -CONFIG_HID_SMARTJOYPLUS=y -# CONFIG_SMARTJOYPLUS_FF is not set -# CONFIG_HID_TIVO is not set -CONFIG_HID_TOPSEED=y -# CONFIG_HID_THINGM is not set -CONFIG_HID_THRUSTMASTER=y -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -CONFIG_HID_ZEROPLUS=y -# CONFIG_ZEROPLUS_FF is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_RENESAS_USBHS is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -# CONFIG_USB_STORAGE_ENE_UB6250 is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_CHIPIDEA is not set - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=y -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HSIC_USB3503 is not set -CONFIG_USB_PHY=y -# CONFIG_USB_OTG_WAKELOCK is not set -CONFIG_NOP_USB_XCEIV=y -# CONFIG_OMAP_CONTROL_USB is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_RCAR_PHY is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_R8A66597 is not set -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_DUMMY_HCD is not set -CONFIG_USB_LIBCOMPOSITE=y -CONFIG_USB_F_ACM=y -CONFIG_USB_U_SERIAL=y -CONFIG_USB_F_SERIAL=y -# CONFIG_USB_ZERO is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FUNCTIONFS is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -CONFIG_USB_G_ANDROID=y -# CONFIG_USB_ANDROID_RNDIS_DWORD_ALIGNED is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_ACM_MS is not set -# CONFIG_USB_G_MULTI is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_DBGP is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_UNSAFE_RESUME=y -# CONFIG_MMC_CLKGATE is not set -# CONFIG_MMC_EMBEDDED_SDIO is not set -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_SDHCI_PXAV3 is not set -# CONFIG_MMC_SDHCI_PXAV2 is not set -# CONFIG_MMC_SPI is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA9633 is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_RENESAS_TPU is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_OT200 is not set -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_SWITCH=y -# CONFIG_SWITCH_GPIO is not set -# CONFIG_ACCESSIBILITY is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -# CONFIG_RTC_SYSTOHC is not set -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS3232 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_RX4581 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_DS2404 is not set - -# -# on-CPU RTC drivers -# -# CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set -# CONFIG_RTC_DRV_SNVS is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -# CONFIG_USBIP_CORE is not set -# CONFIG_PRISM2_USB is not set -# CONFIG_ECHO is not set -# CONFIG_ASUS_OLED is not set -# CONFIG_R8712U is not set -# CONFIG_RTS5139 is not set -# CONFIG_TRANZPORT is not set -# CONFIG_LINE6_USB is not set -CONFIG_ZSMALLOC=y -CONFIG_ZRAM=y -CONFIG_ZRAM_DEBUG=y -# CONFIG_BCM_WIMAX is not set -# CONFIG_FT1000 is not set - -# -# Speakup console speech -# -# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -# CONFIG_STAGING_MEDIA is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ASHMEM=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y -CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -# CONFIG_MTK_LCA_RAM_OPTIMIZE is not set -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_USB_WPAN_HCD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set -# CONFIG_CED1401 is not set -# CONFIG_DGRP is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_DEBUG is not set -# CONFIG_COMMON_CLK_SI5351 is not set - -# -# Hardware Spinlock drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_ARM_ARCH_TIMER=y -# CONFIG_MAILBOX is not set -CONFIG_IOMMU_SUPPORT=y -CONFIG_OF_IOMMU=y - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -CONFIG_MTK_GIC=y -CONFIG_MTK_EIC=y -# CONFIG_IPACK_BUS is not set -# CONFIG_RESET_CONTROLLER is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_USE_FOR_EXT23=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -CONFIG_EXT4_FS_SECURITY=y -CONFIG_EXT4_DEBUG=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -CONFIG_QUOTA_TREE=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_F2FS_FS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -CONFIG_NLS_CODEPAGE_950=y -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1400 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_LOCKUP_DETECTOR is not set -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -# CONFIG_DETECT_HUNG_TASK is not set -CONFIG_SCHED_DEBUG=y -CONFIG_SCHEDSTATS=y -# CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_HAVE_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y -# CONFIG_BOOT_PRINTK_DELAY is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU_DELAY is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=60 -CONFIG_RCU_CPU_STALL_VERBOSE=y -# CONFIG_RCU_CPU_STALL_INFO is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_LKDTM is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -CONFIG_FAULT_INJECTION=y -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -# CONFIG_FUNCTION_TRACER is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set -# CONFIG_SCHED_TRACER is not set -CONFIG_ENABLE_DEFAULT_TRACERS=y -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_PROBE_EVENTS is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -CONFIG_DMA_API_DEBUG=y -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_SAMPLES is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -CONFIG_EARLY_PRINTK=y -# CONFIG_PID_IN_CONTEXTIDR is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITYFS is not set -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_LSM_MMAP_MIN_ADDR=32768 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -# CONFIG_SECURITY_SELINUX_DISABLE is not set -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_YAMA is not set -# CONFIG_IMA is not set -CONFIG_DEFAULT_SECURITY_SELINUX=y -# CONFIG_DEFAULT_SECURITY_DAC is not set -CONFIG_DEFAULT_SECURITY="selinux" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -# CONFIG_CRYPTO_CMAC is not set -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_TWOFISH_COMMON=y - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_ARM64_CRYPTO=y -# CONFIG_CRYPTO_SHA1_ARM64_CE is not set -CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_GHASH_ARM64_CE is not set -CONFIG_CRYPTO_AES_ARM64_CE=y -# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_LZ4K is not set -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=y -CONFIG_TEXTSEARCH_BM=y -CONFIG_TEXTSEARCH_FSM=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_AVERAGE is not set -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -CONFIG_GATOR_DRIVER=y -CONFIG_HW_PERF_EVENTS=y